/restatedev:building-restate-servicesfrom restatedev
Designs, builds, runs, and tests Restate durable services, virtual objects, workflows, and AI agents across TypeScript, Python, Java, and Go. Activates when Restate dependencies are detected or when discussing durable execution.
Ships in restatedev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Restate is a durable execution runtime. It records every step of a handler in a journal, so if the process crashes, the handler replays from the journal and resumes exactly where it left off. Services are regular applications using the Restate SDK (TypeScript, Python, Java, Go) that run behind a Restate Server (a single Rust binary on ports 8080 for ingress and 9070 for admin UI).
Scan the project to determine the SDK and context:
Detect SDK:
package.json with @restatedev/restate-sdk-gen -> TypeScript Durable Coroutines; load both references/ts/api-and-pitfalls.md and references/ts/durable-coroutines.mdpackage.json with @restatedev/restate-sdk -> TypeScriptrequirements.txt or pyproject.toml with restate-sdk -> Pythonpom.xml or build.gradle with dev.restate -> Javago.mod with github.com/restatedev/sdk-go -> GoDetect existing Restate code: Grep for @restatedev, restate-sdk, dev.restate.sdk, github.com/restatedev
Detect AI frameworks: @ai-sdk/, openai-agents, google-adk, pydantic-ai, langchain, langgraph
Detect workflow orchestrators: temporalio, @temporalio, aws-cdk/aws-stepfunctions, etc.
After detecting the SDK, always load the SDK reference:
references/<sdk>/api-and-pitfalls.md - Setup, API patterns, determinism rules, error handling, and pitfalls for the detected SDK| Context | Reference |
|---|---|
| Durable Coroutines or concurrent routines with multiple durable steps in one invocation | references/ts/durable-coroutines.md |
| Design a new application, choose service types | references/design-and-architecture.md |
| Add concurrency limits, multi-tenant fairness, cost controls, scopes, or limit keys | references/flow-control-and-scopes.md |
| Convert from a workflow orchestrator or existing app | references/translate-to-restate.md |
| Invoking services, interacting with invocations (cancel, attach, idempotency, sends, Kafka) | references/invocation-lifecycle.md |
| Design an AI agent, choose a durability boundary, or use an unsupported LLM / agent SDK | references/ai-agents.md |
| Build AI agent with Vercel AI SDK | references/ts/restate-vercel-ai-agents.md |
| Build AI agent with OpenAI Agents SDK | references/python/restate-openai-agents-agents.md |
| Build AI agent with Google ADK | references/python/restate-google-adk-agents.md |
| Build AI agent with Pydantic AI | references/python/restate-pydantic-ai-agents.md |
| Build AI agent with LangChain or LangGraph | references/python/restate-langchain-agents.md |
| Debug errors, stuck invocations, journal mismatches | references/debug-applications.md |
| Register deployments, inspect or manage invocations, read or edit state, query the server | Restate CLI |
| Testing, deployment, server config, Kafka, advanced topics | Use the bundled restate-docs MCP server |
| Code examples and templates | restate example --list --json, github.com/restatedev/examples, github.com/restatedev/ai-examples |
| Complete TypeScript agent reference architecture | restatedev/agent |
Use the restate CLI to operate a running Restate Server: register deployments, inspect and manage invocations, read and edit state, and query the server's internals with SQL.
The CLI describes itself, so ask it what to run instead of guessing commands or flags:
restate --help explains how agents should use the CLI. restate <command> --help shows the flags of a command, with examples.restate search <what you want to do> finds the command, flag or SQL table for a task, e.g. restate search retry a failed invocation.restate sql --help lists the SQL introspection tables, restate sql describe <table> shows their columns.restate openapi prints the Admin API spec, for anything the commands don't cover.When running it:
--json. The output, errors included, is a single JSON document on stdout, and the command never prompts. Errors carry a kind and often next_steps with the commands to run next.--json alone: they print the planned changes with "applied": false and an apply_command, and exit with code 3. Show the plan to the user, and only then run it again with --yes. Use --dry-run to preview without applying.restate whoami --json to check which server the CLI talks to. By default it's the local server (admin API on localhost:9070).These features require CLI version 1.8 or later. If restate search doesn't exist, ask the user to upgrade the CLI.
Before designing any Restate service architecture, check:
| Question | Consult |
|---|---|
| Restate service types, stateful entities, keying, concurrency? | references/design-and-architecture.md |
| Concurrency limits, tenant isolation, or downstream protection? | references/flow-control-and-scopes.md |
| Non-Restate orchestrator in the project? | references/translate-to-restate.md |
| Invoking, cancelling, deduplicating, or attaching to invocations? | references/invocation-lifecycle.md |
| Error handling, compensation, sagas? | Error handling guide, Sagas guide |
| AI agent or LLM calls? | references/ai-agents.md, then the relevant framework reference |
All checks below are mandatory.
ctx.run() or coroutine run)RestatePromise for standard TypeScript or coroutine combinators for coroutines; no native Promise.all, asyncio.gather/wait, CompletableFuture, or Go goroutines/channels/selectctx.run() or coroutine run callbacksTerminalError raised for non-retryable failuresexcept:references/ai-agents.md, journal every LLM call and tool side effect, and set bounded retry policiesAny change to handler business logic (new ctx operations, reordered steps, new ctx.run() blocks, coroutine operations, new branches) must be covered by a Testcontainers test with always-replay enabled, and that test must pass before declaring the work done. Always-replay forces every journaled step to replay on every invocation, so non-determinism fails the test instead of failing in production on retry.
alwaysReplay: true in RestateTestEnvironment.startalways_replay=True in restate.create_test_harnessRESTATE_WORKER__INVOKER__INACTIVITY_TIMEOUT=0m on the Restate containerSee the Testing section of references/<sdk>/api-and-pitfalls.md for the working scaffold.
references/ai-agents.md (opens in a new tab)references/debug-applications.md (opens in a new tab)references/design-and-architecture.md (opens in a new tab)references/flow-control-and-scopes.md (opens in a new tab)references/go/api-and-pitfalls.md (opens in a new tab)references/invocation-lifecycle.md (opens in a new tab)references/java/api-and-pitfalls.md (opens in a new tab)references/python/api-and-pitfalls.md (opens in a new tab)references/python/restate-google-adk-agents.md (opens in a new tab)references/python/restate-langchain-agents.md (opens in a new tab)references/python/restate-openai-agents-agents.md (opens in a new tab)references/python/restate-pydantic-ai-agents.md (opens in a new tab)references/translate-to-restate.md (opens in a new tab)references/ts/api-and-pitfalls.md (opens in a new tab)references/ts/durable-coroutines.md (opens in a new tab)references/ts/restate-vercel-ai-agents.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
TypeScript, Python, Java, Go
npx claudepluginhub restatedev/skills --plugin restatedevOther plugins' skills for the same job