Skip to main content
Temporal runtime. NewAgentWorker and DisableLocalWorker apply to the Temporal runtime. For Restate durability labs, see Durable Agent (Restate).
Minimal agent + worker split: worker polls the task queue; agent process starts runs with DisableLocalWorker. Source: examples/agent_with_worker/

What it demonstrates

  • NewAgentWorker with the same options as NewAgent
  • DisableLocalWorker on the client process
  • Stream from the remote agent process
  • Foundation pattern for production distributed agents

Run

From examples/ with Temporal running:
For interactive durability scenarios (kill/restart), see Durable Agent (Temporal).

Key code

worker/main.go — polls Temporal, executes workflows and activities:
agent/main.go — starts runs, consumes stream without a local worker:
Both processes use identical agent options so the SDK fingerprint matches.

Expected output

Terminal 1 (worker) shows Temporal polling logs at LOG_LEVEL=info. Terminal 2 (agent) prints the streamed reply:
See Distributed Execution and Temporal Runtime for production context.

Learn more

Distributed Execution

Production split-process guide

Durable Agent (Temporal)

Advanced durability scenarios