Skip to content
runward
runward
Product
Who it is for
Trust
Documentation
News
Try it on an example Talk to us

Docs · The doctrine · 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

ComponentRecommendationWhy
Orchestrator, tool registry, use casesTypeScriptSingle stack with the interface, shared types, light model abstraction.
Cockpit and interfaceTypeScriptContinuity with the back end, unified streaming and rendering.
Capability with a specialized ecosystemPython as a sidecarMature libraries, isolated behind the tool protocol.
Component on the critical pathRust or GoLatency and throughput, exposed behind a contract.
Model gatewayAny languageCentralized governance and routing, behind the model port.

Diagram, a TypeScript core and polyglot sidecars

TYPESCRIPT CORE orchestrator · tool registry · use cases model port execution port source port Model gatewayfast, balanced, anddeep tiers Python sidecarspecialized libvia protocol Rust / Go servicecritical pathvia 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.

Talk to us

Tell us who you are, and we will get back to you.

Your details are recorded by Another Framework, publisher of runward, to get back to you. They are neither sold nor shared, and are deleted three years after our last exchange. To see or delete them: contact@runward.dev.