durable_agent/local example is an interactive zero-infrastructure lab. The in-process runtime is durable by default via durable-go — no server, no worker, no client/worker split. Kill the agent mid-stream, restart it from the same working directory, and reconnect with GetAgentStream (no WithOffset — local’s stream only supports fromOffset 0; reconnect replays step history from the start).
Use it after In-Process runtime when you need to feel durable-by-default in action, with nothing to install. For the split worker/agent Temporal lab, see Durable Agent (Temporal); for the single-process Restate lab, see Durable Agent (Restate).
Source: examples/durable_agent/local/
Step-by-step exercises:
examples/durable_agent/local/README.md.Architecture
Everything runs in one process. The durable-go journal (
./agent_data/local-durable-agent) on local disk is the durability mechanism — there is no separate server to keep running between kill and restart.
Streaming and reconnect use the same public GetAgentStream / GetAgentRun APIs as Temporal/Restate, minus WithOffset(n>0): reconnect always replays already-completed steps as one coalesced message each, not the original token-by-token stream, and is not seekable to an arbitrary position (see Durable Execution).
State file: /tmp/durable_agent_local_runstate.json.
Before you start
Fromexamples/, after Configuration (just an LLM provider key — no runtime env vars needed):
task infra:* step, no server to start.
Durability scenarios
Full steps: README. Protocol details: Durable Execution.
Production engine
The lab uses the SDK-built engine (plaintext journal). For payload codec, journal MAC, or a step-token key that survives restart, pass a caller-owneddurable.Engine as local.LocalConfig.Engine — you own Close. Runnable example: Durable Engine. Snippet: README — Production engine. Same pattern as Temporal Client. Details: In-Process durability.
Learn more
Durable Execution
Shared reconnect protocol (local, Temporal, and Restate)
In-Process Runtime
SDK-built knobs vs caller-owned Engine
Durable Agent (Temporal)
Split worker/agent crash lab
Durable Agent (Restate)
Single-process embedded-endpoint crash lab