Skip to main content
An orchestrator agent dynamically decides what tasks to dispatch, and worker agents execute them. The orchestrator can plan, delegate, and combine results in any order. Restate ensures the orchestrator’s plan and each worker’s result are durably persisted.

Example: research report generation

An orchestrator agent breaks a research topic into sub-tasks, dispatches them to worker agents, and combines the results into a report.
workflow-orchestrator.ts
Install Restate and launch it:
Get the example:
Export your OpenAI API key and run the agent:
Register the agents with Restate:
Send a request to the agent:
The orchestrator’s plan is persisted as a durable step. If the process crashes after two of four workers have completed, recovery replays those two results from the journal and only runs the remaining two workers.
Invocation overview