examples/ directory unless noted otherwise. Complete Configuration first to set up your API key and environment.
Quick start
Credentials
Examples useLLM_APIKEY, LLM_PROVIDER, and LLM_MODEL from examples/.env (loaded with .env.defaults). The Quickstart uses provider-native names such as OPENAI_API_KEY in your own module. The CLI uses AGENT_LLM_* prefixes. Same SDK — different env conventions per entry point.
Local vs Temporal vs Restate
Most examples accept all three via
config.RuntimeOption. Temporal labs (durable_agent/temporal, agent_with_worker, agent_with_temporal_client) use Temporal-specific APIs (WithTemporalClient, NewAgentWorker). Durable reconnect (agent_with_reconnect) works on Temporal or Restate. Restate durability lab: durable_agent/restate. See Restate runtime and restate-setup.md.
Example index
Suggested order
Basics — Simple Agent → Tools → Stream Custom tools (advanced patterns) — Workflows → Code Execution Stateful agents — Conversation → Memory or Retrieval Production patterns — Temporal Client → Agent Worker → Durable Agent (Temporal) → Durable Agent (Restate) → Agent Chat Integrations — MCP Config → A2A Server → AG-UITask infrastructure
Fromexamples/, use Taskfile.yml for Docker-backed dependencies:
From the repository root:
task examples:local, task examples:temporal, task examples:restate, or task examples:all.
Logging
Multi-process examples
Related
Configuration
Go, LLM key, env vars, Docker
Simple Agent
First example