Introducing Redpanda AI SDK for Go

A production-grade, provider-agnostic SDK for building AI agents in idiomatic Go

March 18, 2026
Last modified on
TL;DR Takeaways:
No items found.
Learn more at Redpanda University

Most of today’s Go AI tooling falls into one of a few buckets: thin wrappers around a single provider API, ports of Python frameworks that never quite feel native, or early-stage libraries that still haven’t settled on their core abstractions. You can get something working, sure. But getting something reliable, testable, and easy to maintain is another story.

At Redpanda, we’re building managed and self-hosted AI agents as part of our Agentic Data Plane (ADP). These agents need to work in production, not just in demos. That means they need to be observable, resilient, flexible across providers, and easy to test without crossing your fingers before every deploy.

We evaluated the existing Go options and found useful pieces, but not the full package. So we built one.

Today, we’re open-sourcing it: Redpanda AI SDK for Go.

Why we built it

Our requirements were pretty specific, but they’re also the same ones many teams hit once they move past toy examples.

We needed:

  • Real provider portability. We wanted to switch between OpenAI, Anthropic, Google Gemini, and AWS Bedrock without rewriting application logic.
  • Streaming that feels like Go. Not bolted-on callbacks or channel spaghetti. Just clean, idiomatic streaming with properly designed events, error handling, and cleanup.
  • Composable middleware. We wanted hooks around model calls, tool execution, and agent turns for observability, retries, authorization, and guardrails.
  • A2A Adapter. We always support open standards, and exposing our agents via A2A is the standard we wanted to adopt for our managed agents.
  • Flexible tool system. We support local functions, built-in tools, agents as tools, and most importantly MCP—all packaged behind a single tool registry interface with support for retries, reconnect, and hot reloading tool definitions as they change.
  • A testing story that doesn’t waste your time. We needed deterministic tests for agent behavior without real API calls, complicated mocks, or piles of YAML.

Many libraries solved one or two of those problems. None gave us all of them in a way that felt production-ready and idiomatic in Go. So we built an SDK that does.

A few design choices that matter

Rather than exposing a pile of provider-specific clients, the SDK uses a shared interface for model interaction. That keeps application logic stable even when you swap providers.

It also includes a layered interceptor system, so you can hook into agent turns, model calls, and tool execution independently. In practice, that makes it much easier to add observability and controls without turning your code into a ball of middleware.

Another important design choice is the SDK’s adapter architecture. Internally, agents are separated from the protocols used to expose or connect them. That means the same agent runtime can be surfaced through different external formats without changing the core agent implementation. Today, the only adapter we’ve implemented is A2A, which we use in our own systems, but the architecture is intentionally ready for future protocols as the ecosystem evolves.

That separation gives us flexibility without baking protocol assumptions into the heart of the SDK.

Built for real systems, not just demos

This SDK powers the managed agents in Redpanda’s Agentic Data Plane, and we also use it for internal and self-hosted agent systems.

That matters because this is not a side project or a thin wrapper we published and walked away from. It is the infrastructure we rely on ourselves. We have a direct reason to keep it maintained, tested, and useful in production.

The SDK also includes support for Model Context Protocol (MCP), plus a simulated LLM framework for deterministic testing of multi-turn and tool-calling workflows, without burning through your token budget. So the focus is not just “Can this generate text,” but “Can this support the full lifecycle of building and operating agents?”

Getting started

You can install it with:

go get github.com/redpanda-data/ai-sdk-go

package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/redpanda-data/ai-sdk-go/llm"
	"github.com/redpanda-data/ai-sdk-go/providers/openai"
)

func main() {
	provider, err := openai.NewProvider(os.Getenv("OPENAI_API_KEY"))
	if err != nil {
		log.Fatal(err)
	}
	model, err := provider.NewModel(openai.ModelGPT5_2)
	if err != nil {
		log.Fatal(err)
	}
	resp, err := model.Generate(context.Background(), &llm.Request{
		Messages: []llm.Message{
			llm.NewMessage(llm.RoleUser, llm.NewTextPart("Explain Go interfaces in two sentences.")),
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.TextContent())
}

Try it yourself

We built this because we needed it ourselves. We’re open-sourcing it because we think Go developers should have AI tooling that feels native to Go and is ready for production.

Check out the repo: github.com/redpanda-data/ai-sdk-go

We’d love to hear what you build with it. Tell us in the Redpanda Community on Slack. 

No items found.

Related articles

View all posts
Travis Downs
,
Peter Corless
,
&
Mar 16, 2026

Redpanda pushes the envelope on NVIDIA Vera

Benchmark shows Vera provides 5.5x lower latencies and up to 73% higher throughputs than other leading CPU models

Read more
Text Link
David Yu
,
Sarah Haskins
,
&
Mar 11, 2026

Redpanda Cloud’s BYOVPC for AWS is now Generally Available

Take full control of your networking with Redpanda Cloud’s BYOVPC model—now GA on AWS.

Read more
Text Link
Grzegorz Dudek
,
,
&
Jan 27, 2026

Engineering Den: implementing a new query manager (demo)

A look into our refactored scheduler and executor

Read more
Text Link
PANDA MAIL

Stay in the loop

Subscribe to our VIP (very important panda) mailing list to pounce on the latest blogs, surprise announcements, and community events!
Opt out anytime.