# Agent SDK for Go ## Docs - [Dynamic Capabilities](https://docs.agenticenv.ai/advanced/dynamic-capabilities.md): Add or remove tools, MCP servers, A2A agents, and sub-agents at runtime via registries - [Multiple Agents](https://docs.agenticenv.ai/advanced/multiple-agents.md): Run several agents in one process or deployment with unique task queues and instance IDs - [Timeouts and Agent Modes](https://docs.agenticenv.ai/advanced/timeouts-and-modes.md): Configure run duration, approval timeouts, and interactive vs autonomous agent behavior - [Worker Separation](https://docs.agenticenv.ai/advanced/worker-separation.md): Run the agent client and Temporal worker in separate processes for production deployments - [A2A Client](https://docs.agenticenv.ai/examples/a2a-client.md): Build an explicit A2A client with a2aclient.NewClient and register it via WithA2AClients - [A2A Config](https://docs.agenticenv.ai/examples/a2a-config.md): Connect to a remote A2A agent using WithA2AConfig and call its skills as tools - [A2A Server](https://docs.agenticenv.ai/examples/a2a-server.md): Run an inbound A2A HTTP server with an agent card and JSON-RPC endpoint via RunA2A - [Agent Worker](https://docs.agenticenv.ai/examples/agent-worker.md): Split the agent client and Temporal worker into separate processes using DisableLocalWorker and NewAgentWorker - [AG-UI](https://docs.agenticenv.ai/examples/agui.md): Build a Go SSE server and connect it to a CopilotKit UI via AG-UI events - [Concurrent Runs](https://docs.agenticenv.ai/examples/concurrent-runs.md): Run multiple prompts concurrently on one Agent instance using RunAsync and sync.WaitGroup - [Configuration](https://docs.agenticenv.ai/examples/configuration.md): Configure Go, LLM credentials, Docker dependencies, and env vars before running any example - [Conversation](https://docs.agenticenv.ai/examples/conversation.md): Persist multi-turn conversation history in Redis using WithConversation and a session ID - [Durable Agent](https://docs.agenticenv.ai/examples/durable-agent.md): Test Temporal durability with worker crashes, process restarts, and mid-run recovery scenarios - [Hooks](https://docs.agenticenv.ai/examples/hooks.md): Implement lifecycle hooks for PII scrubbing, retrieval filtering, and memory tenant access checks - [JSON Response](https://docs.agenticenv.ai/examples/json-response.md): Configure ResponseFormat with a JSONSchema to get structured machine-parseable output from the agent - [Logs](https://docs.agenticenv.ai/examples/logs.md): Control stdout and stderr output routing and set LOG_LEVEL across any example - [MCP Client](https://docs.agenticenv.ai/examples/mcp-client.md): Build explicit MCP clients with mcpclient.NewClient and register them via WithMCPClients - [MCP Config](https://docs.agenticenv.ai/examples/mcp-config.md): Connect MCP servers using WithMCPConfig over stdio or streamable HTTP via env variables - [Memory](https://docs.agenticenv.ai/examples/memory.md): Store and recall long-term memories across runs using Weaviate or pgvector backends - [Multiple Agents](https://docs.agenticenv.ai/examples/multiple-agents.md): Run two root agents concurrently in one process using WithInstanceId and distinct Temporal task queues - [Observability](https://docs.agenticenv.ai/examples/observability.md): Export OTLP traces, metrics, and logs using WithObservabilityConfig or manually injected clients - [Reasoning](https://docs.agenticenv.ai/examples/reasoning.md): Enable extended thinking with WithLLMSampling and stream provider-specific reasoning deltas - [Retrieval (RAG)](https://docs.agenticenv.ai/examples/retrieval.md): Ground agent responses with Weaviate or pgvector using agentic, prefetch, or hybrid retriever modes - [Run Async](https://docs.agenticenv.ai/examples/run-async.md): Run an agent asynchronously with RunAsync and handle tool approvals via a result channel - [Running Examples](https://docs.agenticenv.ai/examples/running-examples.md): Run examples with go run or Task — example index, infra setup, suggested order, and multi-process commands - [Simple Agent](https://docs.agenticenv.ai/examples/simple-agent.md): Run a minimal agent with Run() using the in-process runtime and no extra setup - [Stream](https://docs.agenticenv.ai/examples/stream.md): Enable streaming and handle text deltas and tool lifecycle events on an AgentEvent channel - [Stream + Conversation](https://docs.agenticenv.ai/examples/stream-conversation.md): Stream with conversation history and handle TEXT_MESSAGE deltas without duplicating RUN_FINISHED content - [Sub-agents](https://docs.agenticenv.ai/examples/subagents.md): Delegate tasks to a specialist sub-agent with its own task queue and approval flow - [Temporal Client](https://docs.agenticenv.ai/examples/temporal-client.md): Build a caller-owned Temporal client connection for TLS, API keys, and Temporal Cloud - [Tools](https://docs.agenticenv.ai/examples/tools.md): Register built-in and custom tools with approval handlers, authorizers, and dynamic registry patterns - [A2A](https://docs.agenticenv.ai/features/a2a.md): Expose agents as A2A HTTP servers or connect to remote A2A agents as tools - [AG-UI Protocol](https://docs.agenticenv.ai/features/ag-ui-protocol.md): Enable AG-UI event streaming for CopilotKit and other AG-UI-compatible web frontends - [Approvals](https://docs.agenticenv.ai/features/approvals.md): Configure human-in-the-loop approval for tool calls, MCP invocations, and sub-agent delegation - [Conversation](https://docs.agenticenv.ai/features/conversation.md): Persist message history across turns in the same session using in-memory or Redis backends - [Hooks](https://docs.agenticenv.ai/features/hooks.md): Implement middleware hooks at LLM, tool, retrieval, and memory lifecycle points for guardrails and auditing - [MCP](https://docs.agenticenv.ai/features/mcp.md): Connect Model Context Protocol servers as first-class agent tools over stdio or streamable HTTP - [Memory](https://docs.agenticenv.ai/features/memory.md): Store and recall long-term memories scoped by user or tenant using Weaviate, pgvector, or custom backends - [Reasoning](https://docs.agenticenv.ai/features/reasoning.md): Configure extended thinking per provider via WithLLMSampling and LLMReasoning - [Response Format](https://docs.agenticenv.ai/features/response-format.md): Configure plain-text or JSON schema structured output from the LLM using ResponseFormat - [Retrieval (RAG)](https://docs.agenticenv.ai/features/retrieval.md): Connect agents to external knowledge bases with agentic, prefetch, or hybrid retriever modes - [Sub-agents](https://docs.agenticenv.ai/features/sub-agents.md): Register specialist sub-agents and configure delegation depth, approval policies, and task queue routing - [Token Usage](https://docs.agenticenv.ai/features/token-usage.md): Aggregate prompt, completion, and reasoning token counts across LLM rounds in a run - [Tools](https://docs.agenticenv.ai/features/tools.md): Register built-in or custom tools and control parallel vs sequential execution per turn - [CLI](https://docs.agenticenv.ai/getting-started/cli.md): Run agents interactively from the terminal using agentctl with a YAML config file - [Configuration](https://docs.agenticenv.ai/getting-started/configuration.md): Configure NewAgent options — runtime, LLM, streaming, approvals, timeouts and workers - [LLM Providers](https://docs.agenticenv.ai/getting-started/llm-providers.md): Configure OpenAI, Anthropic, or Gemini — or bring your own LLM client - [Quickstart](https://docs.agenticenv.ai/getting-started/quickstart.md): Create your first agent and run it in under 5 minutes - [Streaming](https://docs.agenticenv.ai/getting-started/streaming.md): Enable token streaming and handle lifecycle events with Stream() and the AgentEvent channel - [Logs](https://docs.agenticenv.ai/observability/logs.md): Configure structured SDK logging with slog, set log levels, and export logs via OTLP - [Metrics](https://docs.agenticenv.ai/observability/metrics.md): Export OpenTelemetry counters and histograms for LLM latency, token usage, and tool calls - [Telemetry](https://docs.agenticenv.ai/observability/telemetry.md): Enable OpenTelemetry export and access run-level agent telemetry data - [Tracing](https://docs.agenticenv.ai/observability/tracing.md): Enable distributed tracing for agent runs, LLM calls, tool invocations, and memory operations via OTLP - [Architecture](https://docs.agenticenv.ai/overview/architecture.md): How Agent, Runtime, Tools, Memory, MCP, and A2A fit together as an orchestration system - [Introduction](https://docs.agenticenv.ai/overview/introduction.md): Build production-grade AI agents in Go with Temporal durability, MCP, A2A, and full observability - [Readiness Checklist](https://docs.agenticenv.ai/production/readiness.md): Deploy agents to production with a checklist for timeouts, secrets, LLM fallback, and observability setup - [Agent Chat](https://docs.agenticenv.ai/reference-apps/agent-chat.md): Build a durable chat app with streaming, Postgres conversation, SSE, and split worker deployment - [In-Process Runtime](https://docs.agenticenv.ai/runtimes/in-process.md): Run the full agent loop in-process with no external infrastructure or Temporal required - [Runtimes Overview](https://docs.agenticenv.ai/runtimes/overview.md): Choose between in-process and Temporal runtimes based on your durability and infrastructure requirements - [Temporal Runtime](https://docs.agenticenv.ai/runtimes/temporal.md): Run agents as durable Temporal workflows that survive crashes, restarts, and arbitrary delays - [Benchmarks](https://docs.agenticenv.ai/testing/benchmarks.md): Run config-driven benchmarks to measure agent latency, throughput, and token usage under load - [Eval Harness](https://docs.agenticenv.ai/testing/eval-harness.md): Run behavioral regression evals to verify tool calls, completion quality, and telemetry without a live LLM