GO-NATIVE · v2 · MIT

The Go-native agent framework for production.

Not a Python port. Not a prototype scaffold. Beluga is a complete seven-layer framework — streaming via iter.Seq2, OpenTelemetry GenAI spans at every boundary, crash-durable execution, 110 providers.

first_agent.go
import (
    "fmt"

    "github.com/lookatitude/beluga-ai/v2/config"
    "github.com/lookatitude/beluga-ai/v2/llm"
    _ "github.com/lookatitude/beluga-ai/v2/llm/providers/anthropic"
    "github.com/lookatitude/beluga-ai/v2/schema"
)

model, err := llm.New("anthropic", config.ProviderConfig{Model: "claude-sonnet-4-6"})
if err != nil {
    return err
}

msgs := []schema.Message{schema.NewHumanMessage("explain iter.Seq2 in one sentence")}
for chunk, err := range model.Stream(ctx, msgs) {
    if err != nil {
        return err
    }
    fmt.Print(chunk.Delta)
}
core/stream.go — the Stream[T] type
ARCHITECTURE

Seven layers. One import path.

From Foundation primitives to your application code, each layer depends only on the layers below it. Downward arrows only. If you find an upward import, it's a bug.

PROOF

Built for the production side of Go.

01STREAMING

iter.Seq2, not channels.

The streaming primitive is a typed range-over-func iterator. Backpressure is free. Goroutine leaks are impossible. Invoke() is the convenience wrapper around Stream() + collect — the stream path is the real contract.

Read how Stream[T] works →
02PLANNERS

Eight strategies, one interface.

ReAct, Reflexion, Self-Discover, Mind-Map, Tree-of-Thought, Graph-of-Thought, LATS, Mixture-of-Agents — all implement the same Planner interface. Switching strategies is a one-line change. Build your own in the same slot.

Swap planners in one line →
03OBSERVABILITY

OTel GenAI spans at every boundary.

Seventeen extensible packages ship WithTracing() middleware that emits gen_ai.* spans. Works with Jaeger, Grafana Tempo, Honeycomb, Arize, and Langfuse out of the box. No custom instrumentation required.

Observability in production →
04DURABILITY

Crash-durable without checkpointing.

The workflow/ package replays from an event log. Temporal, Inngest, Dapr, NATS, Kafka — or in-process for tests. Agents survive process restarts without application-level checkpointing.

Workflow durability →
Resilience + observability compose as middleware on the same interface as your LLM call.
// Middleware is func(ChatModel) ChatModel. Guard checks, tracing,
// rate limiting and fallback compose around the same model instance.
guards := guard.NewPipeline(guard.Input(guard.NewPromptInjectionDetector()))

model := llm.ApplyMiddleware(base,
    llm.WithHooks(llm.Hooks{BeforeGenerate: func(ctx context.Context, msgs []schema.Message) error {
        _, err := guards.ValidateInput(ctx, lastUserText(msgs))
        return err
    }}),
    llm.WithTracing(),
    llm.WithProviderLimits(llm.ProviderLimits{RPM: 60, MaxConcurrent: 8}),
    llm.WithFallback(backup),
)
A planner swap is a config change. Every strategy implements the same interface.
// Swap reasoning strategies with one line.
// Eight planners share the same interface, from ReAct to LATS.
researcher := agent.New("researcher",
    agent.WithLLM(model),
    agent.WithPlannerName("lats"), // was "react"
    agent.WithTools(tools),
)
110 PROVIDERS · 19 CATEGORIES

One import. Fully wired.

Every provider registers itself in init(). Import for side-effect, call llm.New or vectorstore.New, and compose middleware, hooks, and tracing on the result with one ApplyMiddleware call.

main.go
// 110 providers across 19 categories. Every provider
// registers itself in init(). Import for side-effect, and
// call <pkg>.New, then compose middleware and hooks.
import (
    _ "github.com/lookatitude/beluga-ai/v2/llm/providers/anthropic"
    _ "github.com/lookatitude/beluga-ai/v2/rag/vectorstore/providers/pgvector"
    _ "github.com/lookatitude/beluga-ai/v2/voice/stt/providers/deepgram"
    _ "github.com/lookatitude/beluga-ai/v2/workflow/providers/temporal"
)
Category Count Providers
LLM 22 providers anthropic · openai · bedrock · google · groq · cohere · mistral · deepseek · xai · openrouter · ollama · fireworks · together · perplexity · azure · cerebras · huggingface · qwen · llama · sambanova · bifrost · litellm
Vector stores 13 providers pgvector · pinecone · qdrant · weaviate · milvus · chroma · redis · elasticsearch · mongodb · vespa · turbopuffer · sqlitevec · inmemory
Embedding 9 providers openai · cohere · google · jina · voyage · mistral · sentence-transformers · ollama · inmemory
Memory stores 8 providers postgres · redis · mongodb · sqlite · dragonfly · neo4j · memgraph · inmemory
Document loaders 8 providers gdrive · github · notion · confluence · s3/gcs/azure · firecrawl · docling · unstructured
STT · TTS · S2S 16 providers deepgram · whisper · assemblyai · gladia · elevenlabs (stt+tts) · groq (stt+tts) · cartesia · fish · lmnt · playht · smallest · openai-realtime · gemini-live · amazon-nova
Voice transport · VAD 5 providers livekit · daily · pipecat · silero · webrtc
Workflow engines 6 providers temporal · inngest · dapr · kafka · nats · inmemory
Guard 5 providers lakera · llmguard · guardrailsai · nemo · azuresafety
Observability exporters 4 providers langfuse · langsmith · opik · phoenix
CRASH-DURABLE

Agents that survive restarts.

Durable workflows are a first-class concern, not a plugin. Replay from an event log so a redeploy, a pod restart, or a machine failure does not lose progress.

workflow/durable.go
import (
    "github.com/lookatitude/beluga-ai/v2/workflow"
    _ "github.com/lookatitude/beluga-ai/v2/workflow/providers/temporal"
)

executor, err := workflow.New("temporal", workflow.Config{
    Extra: map[string]any{"client": temporalClient, "task_queue": "agents"},
})
if err != nil {
    return err
}

// Agents survive restarts. Temporal replays the workflow from its
// event history — no application-level checkpointing.
handle, err := executor.Execute(ctx, researchWorkflow, workflow.WorkflowOptions{
    ID:    runID,
    Input: question,
})
if err != nil {
    return err
}
result, err := handle.Result(ctx)
Workflow durability guide

Start with the quickstart.

Build a streaming agent, wire a tool, read the architecture. No account required.