Use Restate’s parallelization primitives
Agent SDKs natively support parallel tool calls, but this is disabled when integrating with Restate. Instead, you use Restate’s durable execution primitives (RestatePromise.all() in TypeScript, restate.gather() in Python) to parallelize work. There are two patterns for this:
- With Agent SDK: use orchestrator tool: Create a single tool that internally fans out multiple steps in parallel using Restate. The agent SDK sees one tool call, but that tool runs work concurrently.
- With only Restate: Custom agent loop: Manage the agentic loop yourself with the Restate SDK directly. You control the tool execution step and can run all tool calls in parallel.
With Agent SDK: Use orchestrator tool
- Vercel AI
- OpenAI Agents
- Google ADK
- Pydantic AI
- LangChain
⚠️To ensure deterministic replay when using the Vercel AI with Restate, you need to set
providerOptions: { openai: { parallelToolCalls: false } } for all your AI SDK Agents.To use parallel tool calls with the Vercel AI SDK, create a tool that runs multiple analyses in parallel. The LLM calls one tool, and that tool fans out work internally using durable execution primitives.Restate makes sure that all parallel tasks are retried and recovered until they succeed. If one step fails, only that step is retried while the successful results are preserved.parallel-tools-agent.ts