CopilotKit / Developer guideIntelligence runtimes

Connect your application to Intelligence

Five languages.
One Intelligence Runner.

Run your agents in TypeScript, Python, Go, Ruby, or C#. Intelligence stores their events and sends updates to your frontend.

TypeScript / NodePython / ASGIGo / net/httpRuby / Rack & RailsC# / ASP.NET Core
Start with your language

Standalone SDK calls and frontend Runtime routes.

01 / Architecture

The runtime runs in your application.

The Intelligence SDK works without mounted Runtime routes. Use it from scripts, background jobs, and application services to read threads, use Memory, and record annotations.

Use the standalone SDK

Your server authenticates the app user. The runtime finds the thread and joins the Intelligence gateway. Then the runtime runs your agent.

The browser receives credentials for the realtime connection. The runtime does not send its platform API key to the browser.

A browser connects to the runtime. The runtime calls the Intelligence API and sends agent events to the realtime gateway.
The runtime runs the agent. Intelligence stores the events and sends them to the browser.

Use your application’s language

Mount the runtime in your Node, ASGI, net/http, Rails, or ASP.NET Core server. Your host supplies authentication and agents.

Intelligence stores the data

Intelligence stores threads, memories, locks, and run events. Your frontend can reconnect and read the stored event history.

02 / Durable runs

An HTTP response does not prove that the gateway stored an event.

The runtime joins the gateway before it returns run credentials. Each event has a stable ID and sequence number.

If the runtime does not receive an acknowledgment, it sends the same event again. It does not start the agent again.

The gateway stores an event, but the runtime does not receive the acknowledgment. The runtime sends the same event again. The gateway does not store a second copy.
The tests simulate a lost acknowledgment. They check that the gateway stores only one copy of the event.
03 / Agent interfaces

Intelligence stores UI events too.

A2UI validates the component tree before it sends a UI snapshot. A snapshot contains the components and their data.

MCP Apps finds UI tools on configured MCP servers. MCP Apps runs tool calls. It sends resource requests from the iframe to those servers.

All five implementations passed the shared UI tests. The tests cover A2UI output, MCP tool calls, and iframe access rules.

04 / The test factory

One test suite checks every language.

The shared test harness starts each runtime. AIMock simulates the agent and MCP servers. A platform fixture simulates the Intelligence API and WebSocket gateway.

Each driver configures only its runtime library. The library handles the requests and sends the events. The harness inspects the results through real HTTP and WebSocket connections.

The same tests run against TypeScript, Python, Go, Ruby, and C#. The tests inspect HTTP responses, stored events, and telemetry.
The shared suite contains 100 cases. Each language uses the same case IDs and expected results.
05 / Compatibility

The same Intelligence APIs in five languages.

Each library provides multi-route Intelligence APIs, A2UI, MCP Apps, and telemetry. The TypeScript runner class is IntelligenceAgentRunner.

Choose the library that fits your server. Your agent produces AG-UI events. Intelligence Runner delivers those events to the platform.

Read pull request #6967
Detailed chapters

Build with your runtime