Agent SDK for Go

Build durable Go AI agents that resume exactly where they left off after a crash or restart.

Stars
★ 68
Last updated
1d ago
FARS reviewed
Nov 23, 2026
License
Apache-2.0
Primary language
Go

At a glance

How it runs
Library / SDKFrameworkCLI
Works with
Universal · cross-platformOpenAI API · Claude API
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Go 1.26+Temporal server (optional, for distributed execution)Restate server (optional, for durable execution)Shell / CLINetwork accessLocal filesystemMCP Server
Typical use
Backend teams running long agent workflows that must not lose progress or re-pay for completed tool calls after a crash.
Not a fit if
  • Teams not building in Go
  • Users who want a ready-made GUI rather than an SDK
Website
docs.agenticenv.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-22
Source review
71/100 · Some gaps

What does this agent do, and when should you use it?

Agent SDK for Go is an open-source SDK from agenticenv for building AI agents whose state, tool calls, and execution loops survive process crashes. By default it journals in-process through durable-go with no infrastructure at all; when you need distributed, multi-process execution you switch the same agent to a Temporal or Restate runtime. Every core component is a pluggable interface, covering LLM clients, tools, memory backends, and policy. The API revolves around Run, Stream, and GetAgentStream, with AG-UI events and offset-based stream resumption after a restart. The repository also ships the agctl CLI, runnable examples, a benchmark runner, and a Promptfoo/DeepEval eval harness, all under Apache-2.0.

You create an agent with agent.NewAgent, combining a system prompt, an LLM client such as openai.NewClient, and a runtime config. a.Run returns a handle you wait on with Done or Get; a.Stream returns an event channel carrying AgentTextMessageContentEvent, AgentToolCallStartEvent, AgentCustomEvent (including tool and delegation approvals), and RunFinished. The agent can invoke built-in or custom tools, connect MCP servers over stdio or streamable HTTP, treat remote A2A agents as tools, and delegate to sub-agents that carry their own LLM, tools, and task queue. Governance is enforced during execution: an action policy allows, denies, modifies, steps up, or defers each tool call and emits signed audit receipts, while budget caps, guardrails, lifecycle hooks, fallback LLMs, a single extra-iteration grant, and per-tool circuit breakers bound failure and spend. The local runtime journals to ./agent_data/<agent_name> and is tunable via local.WithLocalConfig (data dir, auto-purge age, timeout, or durability off). The Temporal runtime separates client triggers from workers; the Restate runtime scales through registered endpoint deployments. Runs can be rejoined with a.GetAgentStream plus agent.WithOffset.

  1. Backend teams running long agent workflows that must not lose progress or re-pay for completed tool calls after a crash.
  2. Go shops that want LLM tool calling embedded in their existing services rather than adding a Python stack.
  3. Business systems where sensitive tools (payments, deletions) require a human approval gate before execution.
  4. Teams exposing internal capabilities as an A2A server, or consuming remote A2A agents as tools.
  5. Developers who need AG-UI protocol events to drive a frontend chat interface.
  6. Engineers who want Promptfoo and DeepEval quality checks wired into CI.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Environment variables
AGCTL_LLM_APIKEY
Runtime
Go 1.26

How do you install or deploy this agent?

Requires Go 1.26 or newer. Install the library through Go modules:

go get github.com/agenticenv/agent-sdk-go@latest

The agctl CLI is distributed as a binary on GitHub Releases; extract it and put it on your PATH:

export AGCTL_LLM_APIKEY=sk-your-key
agctl run --model gpt-4o --prompt "hello"

No extra services are needed for the default in-process runtime. A Temporal or Restate server is only required for distributed execution; see temporal-setup.md and restate-setup.md in the repository.

How do you use this agent?

A minimal working agent with an OpenAI model:

import (
    "context"
    "fmt"

    "github.com/agenticenv/agent-sdk-go/pkg/agent"
    "github.com/agenticenv/agent-sdk-go/pkg/llm"
    "github.com/agenticenv/agent-sdk-go/pkg/llm/openai"
)

llmClient, _ := openai.NewClient(
    llm.WithAPIKey("sk-..."),
    llm.WithModel("gpt-4o"),
)

a, _ := agent.NewAgent(
    agent.WithSystemPrompt("You are a helpful assistant."),
    agent.WithLLMClient(llmClient),
)
defer a.Close()

run, _ := a.Run(context.Background(), "Reply with a short greeting.", nil)
result, _ := run.Get(context.Background())
fmt.Println(result.Content)

To move to Temporal, import pkg/agent/runtime/temporal and pass temporal.WithTemporalConfig with Host, Port, Namespace, and TaskQueue. To resume a stream after a restart, persist stream.ID() first, then call a.GetAgentStream with agent.WithOffset(savedOffset). The local runtime only supports replay from the start, not WithOffset(n>0).

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

FARS trust-control audit

Verified present in source (3/3)
  • confirmation before acting

What are this agent's strengths and limitations?

Pros
  • Durability works out of the box with zero infrastructure: the local runtime journals to ./agent_data/<agent_name>.
  • Runtime portability is real: the same Run/Stream/GetAgentStream surface moves between local, Temporal, and Restate without rewriting agent code.
  • Governance primitives ship in the framework itself: action policy with signed audit receipts, budget caps, guardrails, and per-tool circuit breakers.
  • Broad protocol coverage is documented, with MCP, A2A, and AG-UI each backed by concrete feature descriptions and examples.
  • Provider neutral: OpenAI, Anthropic, Gemini, DeepSeek, Ollama, plus custom clients via interfaces.LLMClient.
Limitations
  • Hard requirement on Go 1.26+, so Python or TypeScript teams cannot reuse their existing agent code.
  • Local runtime is a weaker platform for stream recovery: no WithOffset(n>0), and replay coalesces completed steps into one message each instead of the token-level stream.
  • Temporal and Restate are mutually exclusive, and both add server infrastructure and operational overhead compared with the default local mode.
  • The project describes itself as an independent community library with no affiliation to Temporal Technologies or Restate, so vendor support is on you.
  • agctl installation relies on prebuilt release binaries; the README does not show how to build it locally or list supported platforms.

How does this agent compare with similar options?

The README frames the local runtime as one of three interchangeable execution backends: local mode needs no infrastructure but has limited reconnect, Temporal decouples client triggers from worker execution across processes, and Restate scales through registered endpoint deployments. Because the agent API is identical across them, switching is a runtime-config change rather than a rewrite.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Agent SDK for Go This agent 71 · Some gaps Library / SDKFree + model costs ★ 68 1d ago Go OpenAI API · Claude API
Deuz SDK 76 · Good Library / SDKFree + model costs ★ 508 1mo ago TypeScript OpenAI API · Claude API
AgentLoom 69 · Some gaps — ★ 168 10d ago Python OpenAI API
Synapse AI — Multi-Agent Orchestration Platform 58 · Major gaps CLIFree + model costs ★ 343 2d ago Python OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
71/ 100 5-point scale 3.6 / 5
Trust 19/29
Reliability 9/14
Adaptability 14/18
Convention 14/18
Effectiveness 10/13
Verifiability 5/8
Why each dimension lost points
Trust19 / 29 · 3.3/5

Approval evidence is strong: default RequireAllToolApprovalPolicy, Allowlist and Auto policies, Run via Respond and Stream via Approve, with ErrApprovalAlreadyResolved handling for timeout/duplicate, so user_confirmation scores 3. least_privilege is only 2: AutoToolApprovalPolicy and the README streaming example that auto-approves weaken least privilege, and MCP stdio spawns local processes with only documentary trust guidance. data_flow_transparency and sensitive_data_handling are 2: SECURITY.md covers API keys not persisted, prompt-caching residency, and MCP trust, but there is no concrete redaction evidence for logs/telemetry. dependency_security is 2: Dependabot, govulncheck, CodeQL and a Release hard-fail exist, but the dependency surface is very broad (Temporal, Restate, Weaviate, pgvector) with no pinned audit results. external_effects and rollback are 2: local Close cancels all in-flight runs irreversibly and only kill -9 leaves runs resumable, so rollback semantics are limited. source_attribution is 1: README states it is an independent community library not affiliated with Temporal/Restate, but publisher identity is unverified and attribution is thin.

Reliability9 / 14 · 3.2/5

self_consistency is 2: README, quickstart and approvals docs agree on Run/Stream/Close semantics and distinguish local vs Temporal/Restate Close behavior; however Go 1.26+ in docs vs go 1.26.11 in go.mod is a minor mismatch and some API detail lives only on the external docs site. dependency_availability is 2: dependencies are public and versioned, but the list is large and includes recent majors (openai-go/v3, a2a-go/v2) not verified in-packet. failure_messages is 2: docs give ErrApprovalAlreadyResolved, ErrBudgetExceeded, LLMError classification and errors.As guidance, but the source sample does not show full error-path implementation.

Adaptability14 / 18 · 3.9/5

audience_and_scenarios is 3: covers quickstart, tools, MCP, A2A, sub-agents, approvals, budget, observability, three runtimes and a CLI. capability_boundaries is 2: SKILL.md lists capabilities and workflows but does not systematically state unsupported cases or boundary conditions. trigger_precision is 2: the SKILL.md description trigger is broad (config, tools, runtimes) and may over-trigger. environment_fit is 2: Go 1.26+, API key, Docker/Task/Node optional deps are stated, but Go 1.26 is a high bar.

Convention14 / 18 · 3.9/5

information_architecture is 3: README, docs tree, features/examples/getting-started layering and SKILL.md index are clear. install_notes is 3: go get, env vars, .env load order and optional dependency table are complete. naming_stability is 2: With* option naming is consistent, but v2/v3 dependency majors and module replace limit stability evidence. examples_and_faq is 3: many runnable examples with expected output. known_limitations is 2: docs mention local lacking WithOffset(n>0) and Close cancelling in-flight runs, but limitations are not centrally listed. license is 3: full Apache-2.0 text present and consistent with README. versioning_changelog is 2: SemVer and release notes are claimed, but no in-packet CHANGELOG. maintenance_responsibility is 1: SECURITY.md gives supported versions and response times, but the publisher is unverified and the maintaining entity is unclear.

Effectiveness10 / 13 · 3.8/5

output_usability is 3: example code is complete, copyable, with expected output and error handling. marginal_value is 2: a durable Go agent framework has clear value, but Temporal/Restate ecosystems already offer similar options and incremental value needs verification. cost_benefit is 2: broad dependencies, high Go version requirement, LLM key and optional infrastructure make adoption costly, with benefit scenario-dependent.

Verifiability5 / 8 · 3.1/5

claim_traceability is 2: most README features map to docs and examples, but claims like crash recovery and distributed execution are documentary assertions without in-packet test evidence. cross_source_corroboration is 2: README, quickstart, approvals and configuration corroborate each other, but the source sample is only cli/main.go and eval-harness/runner/main.go, not core implementation. fact_inference_separation is 2: SECURITY.md separates SDK-provided hooks from caller responsibility, but some capability descriptions and implementation boundaries are not clearly separated.

Risks and how to mitigate them
  • Publisher identity is unverified; the maintaining entity and update path are unclear, so verify provenance before production adoption.
  • Default RequireAll approval is safe, but AutoToolApprovalPolicy and the README streaming auto-approve example weaken least privilege; use with care.
  • Local runtime Close cancels all in-flight runs irreversibly and only kill -9 leaves runs resumable, so rollback semantics are limited.
  • The dependency surface is very broad with recent majors; run govulncheck and audit the supply chain yourself.
  • Go 1.26+ is a high bar, and docs vs go.mod versions show a minor mismatch.
  • Core implementation is not in the packet; crash-recovery and distributed claims are documentary only and not execution-verified.
Evidence confidence: Low Reviewed Nov 23, 2026 Reviewed revision a9bcce1f0f79
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/agent-sdk-go.svg)](https://followagents.com/en/agents/agent-sdk-go)
<a href="https://followagents.com/en/agents/agent-sdk-go"><img src="https://followagents.com/badge/agent-sdk-go.svg" alt="FARS review"></a>

FAQ

Do I get crash recovery without running Temporal or Restate?
Yes. The local runtime journals execution to ./agent_data/<agent_name> by default with no extra service. The limitation is that it has no WithOffset(n>0) and replays from the start, coalescing completed steps into one message each.
Can I enable Temporal and Restate at the same time?
No. The README states the Restate runtime is mutually exclusive with Temporal; pick one runtime per agent.
Who pays for the model calls?
The SDK is Apache-2.0 licensed; costs come from the API keys you supply to your chosen provider. The framework offers budget control so you can cap token and cost spend per run and stop or require human approval at the limit.
Which model providers are supported?
Built-in clients cover OpenAI, Anthropic, Gemini, DeepSeek, and Ollama for local models, and you can add others by implementing interfaces.LLMClient. Model selection can be routed per run or per individual LLM call.
How do I stop a misbehaving tool from causing damage?
An action policy can allow, deny, modify, step up, or defer each tool call. Combined with a fallback LLM after classified failures, one extra-iteration grant, and per-tool circuit breakers, runaway behaviour is bounded.
Is Agent SDK for Go free?
The software is free, but Agent SDK for Go calls an AI model, and you pay that model provider for usage (or run a local model).
Is Agent SDK for Go open source?
Yes. The source code is on GitHub (agenticenv/agent-sdk-go) under the Apache-2.0 licence.
Is Agent SDK for Go safe to use?
FollowAgents' FARS review (Nov 23, 2026) scored Agent SDK for Go 19/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Agent SDK for Go still maintained?
Yes. The latest commit on GitHub is from 2026-11-22, within the last 30 days.
Who makes Agent SDK for Go?
Agent SDK for Go is published on GitHub by the account agenticenv. FollowAgents has not verified which person or company is behind that account.
What is Agent SDK for Go's official website?
The project's GitHub repository lists https://docs.agenticenv.ai/ as its website. That link is set by the repository owner; the source code itself is on GitHub (agenticenv/agent-sdk-go).
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts