Skip to main content
Back

Anthropic Ships Official Go SDK for Claude With Full Agent Support

Anthropic's official Go SDK hits v1.50 with Managed Agents, MCP support, structured outputs, and multi-cloud deployment built in

Repo, Full Access
  • Anthropic's official Go SDK for Claude has reached v1.50, replacing all community wrappers with a stable, MIT-licensed library.
  • Supports direct API, AWS Bedrock, Google Vertex AI, and Claude Platform on AWS — all through the same client interface.
  • Recent releases added Managed Agents, multi-agent orchestration, CMA Memory (beta), and client-side model fallback middleware.
  • A toolrunner package handles the full tool-use loop automatically; MCP helpers let Claude call external tools over a standard protocol.
  • Structured outputs auto-parse API responses into typed Go structs; extended thinking and context compaction are available for long-running agentic sessions.
  • Requires Go 1.24+; install with go get github.com/anthropics/anthropic-sdk-go and see the official docs for full usage.

Go has long been the language of choice for high-performance backend services, but until recently, integrating Claude into a Go codebase meant cobbling together raw HTTP calls or relying on unofficial community wrappers. Those community wrappers have since been archived because Anthropic released an official Go SDK. That SDK, anthropic-sdk-go, has now crossed v1.50 and is one of the most feature-complete client libraries Anthropic ships.

What it is and what it covers

The SDK is an officially supported library that provides type-safe access to Anthropic's Claude AI models, abstracting the complexities of API communication, request serialization, error handling, and streaming while maintaining idiomatic Go patterns. It requires Go 1.24+ and is available under the MIT license.

Getting started takes two lines:

go get -u 'github.com/anthropics/anthropic-sdk-go@latest'
// then in code:
client := anthropic.NewClient(
    option.WithAPIKey("my-anthropic-api-key"),
)
message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
    MaxTokens: 1024,
    Messages: []anthropic.MessageParam{
        anthropic.NewUserMessage(anthropic.NewTextBlock("Explain transformers")),
    },
    Model: anthropic.ModelClaudeOpus4_6,
})

The core feature set is broad. Here is what the SDK covers out of the box:

  • Messages API , synchronous and streaming message generation, multi-turn conversations, system prompts
  • Streaming , server-sent events (SSE) with an accumulator pattern via Message.Accumulate() that reconstructs the full message from deltas
  • Tool calling , custom tool definitions with JSON schemas, tool choice strategies (