# Go AI Client Library

A multi-provider Go library, split into about fifty per-vendor modules, that covers chat, embeddings, image generation, speech and an agent framework with handoffs, memory and Model Context Protocol tooling.

This Go library covers large-language-model chat, embeddings, image generation, text-to-speech, speech-to-text, reranking and fill-in-the-middle completion, each as its own modality module with a separate per-vendor sub-module, so a project imports only the vendor SDKs it actually uses. Supported vendors include OpenAI, Anthropic, Google, xAI, ElevenLabs, Azure Speech, Deepgram, AssemblyAI, Voyage AI and Cohere, among others.

An agent framework layer adds sub-agents, handoffs, fan-out, sessions and persistent memory, plus a low-latency voice-agent pipeline that chains streaming speech-to-text, an LLM and text-to-speech with barge-in and tool-call sounds. Other features include native batch processing for OpenAI, Anthropic and Gemini, Model Context Protocol tool integration, OpenTelemetry tracing using GenAI semantic conventions, and token and cost tracking. The library is organized into five tiers, from vendor-free leaf packages up to an agent runtime and a persistence tier backed by pgvector, Postgres or SQLite.

Website: https://github.com/JoakimCarlsson/ai
