This repo contains a set of runnable examples of AI workflows and agents, using Durable Execution and Orchestration via Restate (Github)
The goal is to show how you can easily add production-grade resilience, state persistence, retries, suspend/resume, human-in-the-loop, and observability to agentic workflows. So you can ship agents that stay alive and consistent without sprinkling retry-code everywhere and without building heavyweight infra yourself.
The Restate approach works independent of specific SDKs but integrates easily with popular SDKs, like the Vercel AI SDK, the OpenAI Agent SDK, and Google ADK. You can also use without any Agent SDK (roll your own loop) or for more traditional workflows.
| Use Case | What it solves |
|---|---|
| Durable Execution | Crash-safe model and tool calls, idempotent retries, agents that resume at the last successful step. |
| Detailed Observability | Auto-captured trace of every step, retry, and message for easy debugging and auditing. |
| Human-in-the-loop & long waits | Suspend while waiting for user approval or slow jobs; pay for compute, not wall-clock time. |
| Stateful sessions / memory | Keep multi-turn conversations and other state isolated and consistent. |
| Multi-agent orchestration | Reliable RPC, queuing, and scheduling between agents running in separate processes. |
Restate UI showing an agent execution with parallel tool calls
| Integration | Quickstart | Template |
|---|---|---|
| Vercel AI SDK | π | |
| OpenAI Agents SDK | π | |
| Google ADK | π | |
| Restate - Python - no agent SDK | π | |
| Restate - TS - no agent SDK | π |
| Pattern | Description | Docs | Restate | Vercel AI | OpenAI | ADK |
|---|---|---|---|---|---|---|
| Durable agents | Build AI agents that survive crashes and recover automatically | π | ||||
| Durable Sessions | Persistent, isolated agent sessions | π | ||||
| Human approvals with pause/resume | Human approval steps that suspend execution | π | ||||
| Multi-agent orchestration | Route requests to specialized agents | π |
| Pattern | Description | Docs | Restate | Vercel AI | OpenAI | ADK |
|---|---|---|---|---|---|---|
| Parallel tool calls | Run multiple tools in parallel with recovery and coordination | π | ||||
| Workflows: Sequential pipeline | Chain agents in multi-step pipelines | π | ||||
| Workflows: Parallel agents | Executing multiple agents in parallel | π | ||||
| Workflows: Orchestrator-worker | Break tasks into specialized subtasks | π | ||||
| Workflows: Evaluator-optimizer | Generate, evaluate, improve loop | π | ||||
| Workflows as tools | Complex tool logic as separate durable services | π | ||||
| Remote agents | Deploy/scale agents separately with resilient RPC and queuing | π | ||||
| Competitive racing agents | Run parallel agents, use the fastest response, cancel others | π | - | - | - |
| Pattern | Description | Docs | Restate | Vercel AI | OpenAI | ADK |
|---|---|---|---|---|---|---|
| Error handling | Retries and error handling for agents | π | - | |||
| Rollback | Saga pattern for compensating failed operations | π | - | - |
| Pattern | Description | Docs | Restate | Vercel AI | OpenAI | ADK |
|---|---|---|---|---|---|---|
| Chat UI integration | Integrate agents with chat UIs | π | - | - | - | |
| Streaming responses | Stream agent responses to clients | π | - | - | - | |
| Notify when ready | Callback when agent completes | π | - | - | - |
Restate currently supports 6 languages:
The examples can be translated to any of the supported languages. Join our Discord/Slack to get help with translating an examples to your language of choice.
