# Section 03 · Language choice, full TypeScript or polyglot The question is not one language for everything, but the right language in the right place, behind contracts. Here is the recommended position, grounded in systems already built. ## 1 TypeScript for orchestration and the interface For the agentic core (orchestrator, tool registry, use cases) and the cockpit, a single language across server and interface avoids doubling the stack and multiplying maintenance surfaces. Types are shared between the back end and the front end. The model abstraction stays light: a direct SDK, not a heavyweight chaining framework, to keep control of prompts, events, and token cost. ## 2 A specialized language as a sidecar when the library demands it When a capability depends on a mature ecosystem in another language (browser automation, scientific computing, specialized models), it is isolated in a sidecar exposed through the tool protocol. This is the case, for example, of an execution engine driven from a dedicated sidecar. The core consumes it as a tool provider, without absorbing its stack. ## 3 Rust or Go for performance-sensitive components For a component on the critical path (a high-throughput gateway, intensive parallel processing, a tight-latency service), a compiled language is justified. It is then exposed as an adapter or a service behind a contract, without contaminating the rest. ## Language decision matrix | Component | Recommendation | Why | | --- | --- | --- | | Orchestrator, tool registry, use cases | TypeScript | Single stack with the interface, shared types, light model abstraction. | | Cockpit and interface | TypeScript | Continuity with the back end, unified streaming and rendering. | | Capability with a specialized ecosystem | Python as a sidecar | Mature libraries, isolated behind the tool protocol. | | Component on the critical path | Rust or Go | Latency and throughput, exposed behind a contract. | | Model gateway | Any language | Centralized governance and routing, behind the model port. | ## Diagram, a TypeScript core and polyglot sidecars > Diagram : TYPESCRIPT CORE · orchestrator · tool registry · use cases · model port · execution port · source port · Model gateway · fast, balanced, and · deep tiers · Python sidecar · specialized lib · via protocol · Rust / Go service · critical path · via contract · The language of each building block is a local choice, not an architecture decision. > Anti-pattern to avoid: doubling the stack by default (a back end in one language, an interface in another) without necessity. Going polyglot is justified by a library or a performance constraint, not by habit. When it is justified, it goes through a sidecar or a service, never through a mix inside the core. **Key takeaways** - TypeScript for orchestration and the interface, a single stack and a light model abstraction. - Python as a sidecar when a specialized library demands it, isolated through the tool protocol. - Rust or Go for a component on the critical path, behind a contract. - Going polyglot is justified by a technical reason, never by default, and always behind a boundary. --- © Thibault Souris, 2026 · Creative Commons BY-ND 4.0 (https://creativecommons.org/licenses/by-nd/4.0/) · the work’s text unaltered, as plain text for this page; the PDF version is the reference: https://runward.dev/docs/en/reference/doctrine/Designing-and-Running-Agentic-Systems-2026.pdf