Overview
Routa implements a multi-protocol architecture to enable coordination between diverse AI platforms and agents:MCP
Model Context ProtocolCoordination tools for agent collaboration (task delegation, messaging, notes)
ACP
Agent Client ProtocolSpawns and manages agent processes (Claude Code, OpenCode, Codex, Gemini)
A2A
Agent-to-Agent ProtocolExposes external federation interface for cross-platform agent communication
Each protocol serves a distinct purpose: MCP for tools, ACP for process management, and A2A for external federation.
MCP (Model Context Protocol)
Overview
MCP is Anthropic’s protocol for exposing tools and context to AI models. Routa implements an MCP server at/api/mcp that provides 12+ coordination tools.
Protocol: JSON-RPC over SSE (Server-Sent Events) or stdioServer:
src/app/api/mcp/route.tsTools:
src/core/tools/agent-tools.ts, src/core/tools/note-tools.ts, src/core/tools/workspace-tools.ts
Connection Flow
MCP Server Configuration
When spawning child agents, the orchestrator generates MCP config:MCP URL Parameters
MCP URL Parameters
wsId(workspace ID) — Scopes tool calls to a specific workspacesid(session ID) — Links tool calls to the agent’s session for context
- Route
create_notecalls to the correct workspace - Associate agent actions with the right session for real-time UI updates
Available MCP Tools
- Agent Tools (6)
- Task Tools (4)
- Note Tools (3)
- Workspace Tools (2)
- list_agents — List agents in a workspace
- read_agent_conversation — Read another agent’s conversation history
- create_agent — Create a new agent (ROUTA/CRAFTER/GATE/DEVELOPER)
- delegate_task_to_agent — Delegate task and spawn ACP process
- send_message_to_agent — Inter-agent messaging
- report_to_parent — Completion report to parent agent
Custom MCP Servers
Routa supports registering user-defined MCP servers alongside the built-in coordination server:stdio, http, sseProviders: Claude, OpenCode, Codex, Gemini, Kimi, Augment, Copilot When an ACP agent spawns, enabled custom servers are automatically merged into its MCP configuration.
Custom MCP servers extend agent capabilities with tools like filesystem access, database queries, or API integrations.
ACP (Agent Client Protocol)
Overview
ACP is a protocol for spawning and managing AI agent processes. Routa implements an ACP adapter to create sessions for multiple providers. Protocol: JSON-RPC over stdio or HTTPProcess Manager:
src/core/acp/acp-process-manager.tsAdapters:
src/core/acp/provider-adapter/
Supported Providers
| Provider | Connection | Description |
|---|---|---|
| Claude Code | JSON-RPC/SSE | Anthropic’s Claude with Code mode |
| OpenCode | stdio | OpenCode agent runtime |
| Codex | stdio | Codex agent runtime |
| Gemini | stdio | Google Gemini CLI |
| Copilot | API | GitHub Copilot |
| Augment | API | Augment Code |
| Kimi | API | Kimi agent |
ACP Session Lifecycle
Creating an ACP Session
Fromsrc/core/orchestration/orchestrator.ts:430-566:
Provider Adapters
Each provider has an adapter that normalizes its protocol to a common interface:Provider Adapter Interface
Provider Adapter Interface
src/core/acp/provider-adapter/standard-acp-adapter.ts):Handles OpenCode, Codex, Gemini — any provider following standard ACP JSON-RPC protocol. Claude Adapter (
src/core/acp/provider-adapter/claude-adapter.ts):Handles Claude-specific message formats and SSE notifications. OpenCode Adapter (
src/core/acp/provider-adapter/opencode-adapter.ts):Handles OpenCode-specific extensions and task panel updates.
ACP Registry
Routa provides an ACP registry for discovering and installing pre-configured agents:npx, uvx (Python), binaryRegistry: Community-maintained catalog of ACP agents
A2A (Agent-to-Agent Protocol)
Overview
A2A is a protocol for cross-platform agent communication. Routa exposes an A2A bridge at/api/a2a to enable external agents to interact with Routa’s coordination system.
Protocol: HTTP + JSON-RPCBridge:
src/app/api/a2a/route.ts
A2A Bridge Architecture
A2A Operations
External agents can:- Create agents in Routa workspaces
- Delegate tasks to Routa specialists
- Send messages to Routa agents
- Query agent status and conversation history
- Subscribe to workspace events
Example A2A Request
A2A enables federated multi-agent systems where agents from different platforms collaborate on shared workspaces.
Protocol Comparison
| Aspect | MCP | ACP | A2A |
|---|---|---|---|
| Purpose | Tool exposure | Process management | External federation |
| Transport | SSE, stdio | stdio, HTTP | HTTP |
| Protocol | JSON-RPC | JSON-RPC | JSON-RPC |
| Clients | AI models | Agent runtimes | External agents |
| Direction | Client → Server | Server → Process | Peer-to-Peer |
| State | Stateless tools | Stateful sessions | Stateless RPC |
Skills System
Routa implements OpenCode-compatible skill discovery for dynamic tool loading:~/.routa/skills/resources/skills/- Bundled skills
Protocol Security
MCP Security
- Session isolation: Each agent session has a unique
sidparameter - Workspace scoping:
wsIdparameter restricts operations to a workspace - No authentication: MCP server is for local coordination only (not exposed publicly)
ACP Security
- Process isolation: Each ACP session runs in a separate process
- Working directory isolation: Agents operate in their assigned
cwd - Resource cleanup: Sessions are terminated when parents complete
A2A Security
Next Steps
System Architecture
Understand the overall system design
Multi-Agent Coordination
Learn coordination patterns
Specialist Roles
Explore agent roles and behaviors
Task Orchestration
Deep dive into task delegation