What Restate offers for multi-agent systems
At the core of every multi-agent system is a routing mechanism that decides which agent should handle each request. Restate makes this routing resilient by ensuring all decisions and agent interactions are durably logged and automatically retried.Two routing approaches
Local Agent Routing- Route to different specialized prompts within the same service
- Best for: Simple agent specialization with shared context and without infrastructure complexity
- Use when: You want different AI personalities/expertise but don’t need separate deployments
- Route to independent services running across different infrastructure
- Best for: Systems requiring independent scaling, isolation, or different technology stacks
- Use when: You need agents in different languages/SDKs, separate scaling, or team ownership boundaries
How Restate ensures resilience
Durable routing decisions: When your LLM decides to route to an agent, that decision is automatically persisted. If anything fails, Restate resumes from exactly where it left off—no duplicate work, no lost context. Failure-resistant communication: Whether calling local or remote agents, all interactions are wrapped in Restate’s durable execution. Network failures, service restarts, and timeouts are handled automatically with retries and recovery. End-to-end observability: The Restate UI shows the complete execution trace across all agent calls, making it easy to debug complex multi-agent workflows and understand routing decisions. Works with any LLM SDK (Vercel AI, LangChain, LiteLLM, etc.) and any programming language supported by Restate (TypeScript, Python, Go, etc.).Routing to local agents
Local agent routing lets you create specialized AI assistants within a single service by using different prompts and personalities. The LLM first decides which specialist is needed, then you call the LLM again with a specialized prompt for that agent. This approach is perfect when you want to create focused expertise areas (like billing, technical support, or sales) without the complexity of separate services.
Run the example
Run the example
1
Requirements
- AI SDK of your choice (e.g., OpenAI, LangChain, Pydantic AI, LiteLLM, etc.) to make LLM calls.
- API key for your model provider.
2
Download the example
3
Start the Restate Server
4
Start the Service
Export the API key of your model provider as an environment variable and then start the agent. For example, for OpenAI:
5
Register the services
- UI
- CLI

6
Send a request
In the UI (
http://localhost:9070), click on the answer handler of the AgentRouter service to open the playground and send a default request:
7
Check the Restate UI
In the UI, you can see how the LLM decides to forward the request to the specialized support agents, and how the response is processed:

Routing to remote agents
Deploy specialized agents as separate services when you need independent scaling, isolation, or different technology stacks. Remote agents run as independent services that communicate over HTTP. Restate makes these calls look like local function calls while providing end-to-end durability and failure recovery. The example below shows dynamic routing where the LLM’s decision determines which remote service to call. Each specialist agent runs as its own service with a standardrun handler.
Billing Agent implementation
Billing Agent implementation

Run the example
Run the example
1
Requirements
- AI SDK of your choice (e.g., OpenAI, LangChain, Pydantic AI, LiteLLM, etc.) to make LLM calls.
- API key for your model provider.
2
Download the example
3
Start the Restate Server
4
Start the Service
Export the API key of your model provider as an environment variable and then start the agent. For example, for OpenAI:
5
Register the services
- UI
- CLI

6
Send a request
In the UI (
http://localhost:9070), click on the answer handler of the RemoteAgentRouter service to open the playground and send a default request:
7
Check the Restate UI
In the UI, you can see how the LLM decides to forward the request to the specialized support agents, and the nested execution trace of the remote calls:
