Skip to main content
Agent runtimes Copass connects through the Agent Router. In Copass, context and agents are decoupled. Your sandbox holds the data, the integrations, the memory, and the end users. Agent runtimes — Anthropic, Google, whatever ships next — are interchangeable backends. The Agent Router is the hosted surface that connects the two. Point a sandbox at any provider, swap on a per-call flag, and your context stays exactly where it is. Pick a use case on the left. Every call uses the SDK — router.run({...}) or router.integrations.connect(...). Flip a provider flag to swap Claude and Gemini.

copass-harness on GitHub

Source for @copass/agent-router (TypeScript) and copass-agent-router (Python).

What you just unlocked

One API, every provider

Flip provider: 'anthropic' to provider: 'google' — memory, tools, and user data stay.

User integrations, one line

router.integrations.connect('github', …) runs the whole OAuth dance. Tools light up for every run.

Hosted runtime

No agent server to deploy, no SSE plumbing, no tool schemas to wire. Your code is the client.

The API in two calls

CallWhat it does
router.run({ provider, model, system, message, endUserId })Streams an agent turn. Returns an async iterator of text, tool_call, tool_result, finish, error events.
router.integrations.connect(app, { onConnectUrl })Runs OAuth end-to-end. Mints a Connect URL, opens the browser, catches the webhook, returns the live connection.
Everything else (list, disconnect, reconcile, catalog) is a convenience wrapper on the integrations surface.

Working recipes

See Cookbooks for copy-pasteable multi-integration builds — decision archaeology (why does this code exist?), shipping a feature across 3 repos, standup killer, customer health radar, post-mortem draft.

Learn more

Integrations

3,000+ OAuth apps via Pipedream + your own custom data sources.

Providers

Anthropic + Google, supported models, Google’s one-time ADK deploy.

Events

The full event stream — text, tool_call, tool_result, finish, error.

Multi-turn

Thread session_id across turns. Window-aware retrieval keeps context sharp.

How it connects to the rest of Copass

  • Multi-tenancy — one sandbox holds every end user of your app; endUserId isolates them.
  • Sandbox lifecycle — tenancy, keys, quotas, vault.
  • Portable Context — why provider swap is a flag, not a migration.
  • Window-Aware Retrieval — how memory stays sharp across providers and turns.
  • SDK — want to own the runtime instead of routing to a hosted one? Use a framework adapter.