Skip to main content
Run commands from the examples/ directory unless noted otherwise. Complete Configuration first to set up your API key and environment.

Quick start

Credentials

Examples use LLM_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

BasicsSimple AgentToolsStream Custom tools (advanced patterns)WorkflowsCode Execution Stateful agentsConversationMemory or Retrieval Production patternsTemporal ClientAgent WorkerDurable Agent (Temporal)Durable Agent (Restate)Agent Chat IntegrationsMCP ConfigA2A ServerAG-UI

Task infrastructure

From examples/, 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

See Logs.

Multi-process examples

Configuration

Go, LLM key, env vars, Docker

Simple Agent

First example