Your First Agent
Install
Why Agent SDK for Go
- Idiomatic Go — functional options, typed interfaces, no reflection magic. Swap any component (LLM client, memory backend, approval policy) by passing a different option.
- Same code, three runtimes — run in-process for development with no infrastructure, then add
temporal.WithTemporalConfig(frompkg/agent/runtime/temporal) orrestate.WithRestateConfig(frompkg/agent/runtime/restate) for crash-proof durable execution in production. Nothing else changes. - Concurrent by default — one
Agentinstance handles parallelRunandStreamcalls; durable runtimes issue each a unique run automatically. - Protocol-native integrations — MCP tool servers, A2A agent-to-agent delegation, and AG-UI streaming events are first-class, not adapters bolted on after the fact.
- Middleware hooks — intercept LLM calls, tool use, retrieval, and memory at any lifecycle point for logging, PII scrubbing, and guardrails without touching agent logic.
- Cache-aware requests — LLM requests are structured for provider caching, with Anthropic prompt-cache breakpoints to reduce cost on multi-turn runs.
Runtimes
Run agents locally for development, or with Temporal or Restate for production-grade durability and fault tolerance.
Add
temporal.WithTemporalConfig or restate.WithRestateConfig to switch. See Runtimes.
Start here
Quickstart
Your first agent, step by step — under 5 minutes
Architecture
How the agent loop maps to capabilities and runtimes