> ## Documentation Index
> Fetch the complete documentation index at: https://docs.restate.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI / Agents with Restate

> Build durable AI agents and workflows that recover from failures, maintain state, and scale to production.

Restate makes AI agents and workflows innately resilient. It provides the reliability infrastructure you need to run AI workloads in production, from simple LLM chains to complex multi-agent systems.

![Restate in the AI stack](https://mintcdn.com/restate-6d46e1dc/QOW3KcM7hjgq2v8d/img/ai/restate-ai-stack.png?fit=max\&auto=format\&n=QOW3KcM7hjgq2v8d\&q=85\&s=69b4fc6d9b793501b8c8538e80941528)

> [card] [AI Agent Quickstart](https://docs.restate.dev/ai-quickstart.md)
>
> Build and run your first durable AI agent in minutes.

> [card] [Agent Reference Architecture](https://github.com/restatedev/agent)
>
> Build on a complete TypeScript agent with human approvals, sandboxed tools, subagents, memory, and schedules. Explore how these features fit together on Restate.

## Why Restate?

Restate is the foundation for AI workflows, agents, and agentic platforms, written as plain code in your language of choice:

* ✅ **Durable Execution**: Retry and recover from failures without repeating completed steps.
* ✅ **State & session coordination**: Built-in multi-turn, persistent sessions. Scale out to thousands of concurrent sessions with built-in concurrency control
* ✅ **Communication & flow control**: Route tasks between distributed agents, humans, and MCP servers, and shape traffic with concurrency control
* ✅ **Observability & control**: Inspect detailed execution journals, and pause, cancel, kill, or roll back stuck agents
* ✅ **Production safety**: Approvals, timeouts, rollbacks, and escalation without callback plumbing

Restate handles the complexity of distributed execution so you can focus on your AI logic.

## SDK integrations

**Any LLM SDK** — write the agent loop yourself with OpenAI, Anthropic, Vercel AI SDK, Google Gen AI, LiteLLM, or any other SDK. Wrap LLM calls in `ctx.run()` for durability.

> [card] [Vercel AI SDK](https://docs.restate.dev/ai/sdk-integrations/vercel-ai-sdk.md)

> [card] [LiteLLM](https://docs.restate.dev/ai/sdk-integrations/litellm.md)

> [card] Any other SDK

**Agent frameworks** — higher-level APIs for a faster start.

> [card] [Vercel AI SDK](https://docs.restate.dev/ai/sdk-integrations/vercel-ai-sdk.md)

> [card] [OpenAI Agents SDK](https://docs.restate.dev/ai/sdk-integrations/openai-agents-sdk.md)

> [card] [Google ADK](https://docs.restate.dev/ai/sdk-integrations/google-adk.md)

> [card] [Pydantic AI](https://docs.restate.dev/ai/sdk-integrations/pydantic-ai.md)

> [card] [LangChain](https://docs.restate.dev/ai/sdk-integrations/langchain.md)

> [card] [Integrating with other SDKs](https://docs.restate.dev/ai/sdk-integrations/integration-guide.md)

Want another integration? Reach out on [Discord](https://discord.restate.dev) or [Slack](https://slack.restate.dev).

## Getting Started

The following pages give you a tour of how to build durable AI agents and workflows with Restate:

> [card] [1. Durable Agents](https://docs.restate.dev/ai/patterns/durable-agents.md)
>
> Implement agents that survive crashes and recover automatically. Every LLM call and tool execution is durably persisted.

> [card] [2. Durable Sessions](https://docs.restate.dev/ai/patterns/sessions.md)
>
> Add persistent sessions keyed by ID with built-in concurrency control. Conversation state survives crashes and restarts.

> [card] [3. Approvals with Pause & Resume](https://docs.restate.dev/ai/patterns/human-in-the-loop.md)
>
> Add resilient human approvals that pause the agent and resume when the response arrives, even across restarts.

> [card] [4. Multi-Agent Orchestration](https://docs.restate.dev/ai/patterns/multi-agent.md)
>
> Route tasks between specialized agents with durable routing decisions. Coordinate via handoffs, tools, or remote calls.

> [card] [5. Observability & Control](https://docs.restate.dev/ai/patterns/observability-control.md)
>
> Inspect agent execution step by step, export traces, and cancel or kill stuck agents.

## Implementation Guides

The following pages provide detailed implementation guides for common AI patterns:

> [card] [Parallel Tool Calls](https://docs.restate.dev/ai/patterns/parallelization.md)

> [card] [Workflows](https://docs.restate.dev/ai/patterns/workflow-sequential.md)

> [card] [Workflows as Tools](https://docs.restate.dev/ai/patterns/tools.md)

> [card] [Remote Agents](https://docs.restate.dev/ai/patterns/remote-agents.md)

> [card] [Racing Agents](https://docs.restate.dev/ai/patterns/competitive-racing.md)

> [card] [Interrupt & Regenerate](https://docs.restate.dev/ai/patterns/interrupt-regenerate.md)

> [card] [Retries & Error Handling](https://docs.restate.dev/ai/patterns/error-handling.md)

> [card] [Rollback on Failures](https://docs.restate.dev/ai/patterns/rollback.md)

> [card] [Chat UI Integration](https://docs.restate.dev/ai/patterns/chat-ui-integration.md)

> [card] [Streaming Responses](https://docs.restate.dev/ai/patterns/streaming-responses.md)

> [card] [Notify when ready](https://docs.restate.dev/ai/patterns/notify-when-ready.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.