Skip to main content
Many agent systems need a router that decides which specialist agent should handle a request. Restate makes these routing decisions durable: if the process crashes after the LLM picks an agent but before that agent responds, recovery skips the routing step and resumes the agent call.

How it works

  1. A router agent receives the request
  2. An LLM decides which specialist to delegate to (persisted as a durable step)
  3. The specialist agent processes the request
  4. The router returns the result
Routing decisions, agent calls, and results are all recorded in the journal.

Example: routing to specialist agents

Define specialist agents within the same process. The LLM picks the right one, and Restate ensures the decision sticks.

Handing off to remote agents

When agents need to scale independently, run on different platforms, or be developed by different teams, you can deploy them as separate Restate services. Restate makes cross-service calls look like local function calls while providing end-to-end durability and failure recovery. See the guide on calling remote agents implementation guide for full examples of remote agent routing.