Restate lets you easily build reliable applications that work consistently in production. Restate's capabilities and programming model work very well for implementing agentic workflows. Move beyond fragile demos by giving your agents innate resilience—persistent memory, fault-tolerant tool/LLM calls, and robust handling of long-running tasks. Focus on your agent's intelligence, not the infrastructure complexity tax.
Restate provides the following capabilities:
- 🚀 Move fast and far - Innate resiliency and control from your first LLM-SDK-based app to low-level, customized multi-agent applications.
- ✅ Resilience where it matters most – Automatically recover from failures in your agentic workflows and tools.
- 🎮 Task control - Cancel tasks, query status, re-subscribe to ongoing tasks, and track progress across failures, time, and processes.
- 🤖 Reliable multi-agent - Flexible and reliable communication patterns including RPC, scheduled tasks, events, human-in-the-loop and parallel execution.
- 👀 Full observability – Line-by-line execution tracking with a built-in audit trail and UI. Seamless integration with OpenTelemetry.
- 🔁 Orchestrate long-running processes – Coordinate durable and stateful agentic processes for millis or months.
- 🔧 Rich primitives – Leverage workflows, durable promises, communication, and persistent state.
- 🧠 Exactly-once execution - Automatic deduplication of hand-offs and tool executions via idempotency keys.
- 💾 Persistent memory - Maintain consistent agent memory across infrastructure events.
- 🌍 Deploy anywhere – Whether it's AWS Lambda, CloudRun, Fly.io, Cloudflare, Kubernetes, Deno Deploy,...
- ☁️ Easy to self-host – Single-binary self-hosted deployments or connect to Restate Cloud.
Restate can also be used for other use cases, such as: workflows, microservice orchestration, async tasks, and event processing. Or check out the Restate examples repository.
This repository contains examples of how to use Restate for AI / Agent use cases.
-
DIY patterns: Patterns for hardening custom LLM orchestration logic.
-
Agents: Using Restate (optionally with Agent SDKs) for resilient agentic workflows.
-
MCP: Using Restate for exposing tools and resilient orchestration of tool calls.
-
A2A: Implement Google's Agent-to-Agent protocol with Restate as resilient, scalable task orchestrator.
-
- Interruptible agents: A customized agent with different operational modes to process new inputs: interrupting, incorporating, queueing.
- Insurance claims: Filing insurance claims by parsing PDF receipts with LLMs.
Restate 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.
Clone the repository and consult the README of the example you want to run for further instructions.
git clone git@github.com:restatedev/restate-ai-examples.git
- vs. DIY (Basic Loops + DB/Queue): Eliminates vast amounts of boilerplate code for retries, state management, consistency checks, and failure recovery that developers would otherwise need to build manually.
- vs. Basic Agent Frameworks (focused on prompts/reasoning): Provides the crucial missing layer of execution reliability, state persistence, and robust async operation management needed for production. Restate complements these frameworks by providing a reliable runtime beneath the agent's reasoning logic.
- vs. Heavy Workflow Engines: Offers similar strong execution guarantees but with a lighter footprint, lower latency, simpler programming model, native serverless integration, and easier self-hosting/operational story—often a better fit for the potentially high-volume, interactive nature of agent applications.
- Documentation
- Quickstart
- Tour of Restate: a tutorial including the most important features
- Examples on workflows, microservice orchestration, async tasks, event processing
- Restate Cloud
- Discord / Slack
Disclaimer 1: The implementations of the agent loops in this repo are heavily inspired by the OpenAI Agents SDK. We therefore want to give credit to the developers of this SDK for the great work they have done. This repo builds further on their work to make it benefit from Restate's programming model and capabilities.
Disclaimer 2: Many of the DIY patterns have been based on Anthropic's agents cookbook.
Disclaimer 3: Some of the A2A examples in this repo are based on the examples included in the Google A2A repo.