Temporal runtime.
NewAgentWorker and DisableLocalWorker apply to the Temporal runtime. For Restate’s ingress + embedded endpoint topology, see Restate runtime.Architecture
See Temporal runtime for the full architecture diagram.
Setup
Worker process — polls the task queue and executes runs:NewAgentWorker is a Temporal API — use it with the Temporal runtime.
Configuration alignment
Both processes must share identical agent configuration:
The SDK uses a fingerprint check to detect config drift between the client that started a run and the worker that executes it. Mismatches fail the run with a clear error.
WithDisableFingerprintCheck bypasses the check on the agent process only — not allowed on NewAgentWorker. Use as break-glass only.
Streaming and approvals across processes
DisableLocalWorker works with streaming and approvals with no extra configuration:
- Events are durable. Each event is published to the workflow’s Temporal Workflow Stream — a durable ordered log. The workflow and event log survive worker crashes and restarts.
- Live delivery is not automatic backfill. Tokens and events are forwarded to your subscriber process as they are published. If the subscriber disconnects mid-stream, it misses the gap. Call
GetAgentStreamwith the last savedrunIDand offset to resume from exactly where you left off. - Approvals degrade gracefully. If an approval event cannot be delivered, the run continues rather than hanging — the tool is skipped with a clear message. This is intentional for autonomous agents; for interactive scenarios, design your UX so users are not silently blocked.
Distributed conversation and memory
In-memory conversation fails at build time with remote workers. Use Redis or another distributed backend on both processes:Crash and restart behavior
Because every agent run is a Temporal workflow, the worker process can crash and restart without losing a single step. Tool calls already made are not replayed, approvals already given are not re-requested — the run resumes exactly where it left off from Temporal’s recorded history. This means:- You do not need a single process alive for the entire run duration
- Workers can be deployed, updated, or horizontally scaled while runs are in-flight
- Kubernetes restarts and process crashes are safe — keep workers supervised and restarting
If the agent process serving
Stream crashes, the run continues on the server but your subscriber loses the connection. Use GetAgentStream to resubscribe from the last saved offset — the durable event log retains all events from that offset onward. Persist runID (stream.ID()) and the last event offset before processing each event; on restart:Sub-agents
Each sub-agent typically has its own worker. PairNewAgentWorker with the same options (including WithName) as the NewAgent that runs that sub-agent.
Example: Agent Worker · Durable Agent (Temporal).
Example
Agent Worker
Minimal split client and worker
Durable Agent (Temporal)
Crash and restart walkthrough with split processes
Related
Durable Execution
Server-side durability and client-side stream recovery
Temporal Runtime
Durable execution architecture and fingerprint alignment
Multiple Agents
Several agents in one process