agents-go
Getting Started

Installation

Add the module and a provider plugin to a Go project.

agents-go is a standard Go module. Add the SDK, then add a provider plugin for the models you'll speak with. It requires Go 1.26+.

Add the SDK

go get github.com/webdeveloperben/agents-go@latest

The core packages you'll import most:

import (
    "github.com/webdeveloperben/agents-go/agents" // AgentSession, Agent, AgentTask
    "github.com/webdeveloperben/agents-go/tool"   // typed function tools
    "github.com/webdeveloperben/agents-go/llm"    // LLM / ChatContext types
)

The core never names a concrete provider — agents depends only on the llm / stt / tts / vad interfaces.

Add a provider plugin

Models come from plugin subpackages, so heavy provider SDKs stay out of the core. For example, OpenAI (STT + LLM + TTS) and Anthropic (LLM):

import (
    "github.com/webdeveloperben/agents-go/plugins/openai"
    "github.com/webdeveloperben/agents-go/plugins/anthropic"
)

Provider plugins read credentials from the environment by default (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY) unless you pass them explicitly.

Build tags

Most of the SDK builds with no tags. The WebRTC/LiveKit media transport is the exception:

plugins/livekit/roomio requires the livekit build tag and native audio libraries (Opus / SoXR). Build it with go build -tags livekit ./.... Everything else — including the WebSocket, Twilio, and console transports — needs no tags.

Verify

go build ./...

Then head to the Quickstart.

On this page