Go Realtime voice AI agents
agents-go runs the work around the model — it listens, thinks, and speaks — with typed tools, interruptible turns, and worker-fleet primitives. Built for large, horizontally-scaled voice.
// an agent is instructions + a model to speak with
agent, _ := agents.NewAgent(agents.AgentOptions{
Instructions: "You are a concise support agent.",
LLM: model,
})
// the session runs the turn loop — transport-independent
session := agents.NewAgentSession(agents.AgentSessionOptions{})
defer session.Close(ctx)
session.Start(ctx, agents.StartOptions{Agent: agent})
result, _ := session.Run(ctx, agents.RunOptions{
UserInput: "Reset my password",
})
fmt.Println(result.FinalOutput())The runtime for voice agents that have to listen, reason, and keep talking.
Voice-native runtime
Turns, playout, interruption, and session state live in one place. Interruptible mid-sentence, endpointing built in.
Go-native typed tools
Typed func(ctx, *In) (*Out, error) handlers. Deterministic JSON Schema derived from types at registration — no codegen.
Transport pluralism
Agents stay independent of the wire. Swap between WebSocket, LiveKit rooms, Twilio Media Streams, or a console.
Multi-agent, structured
Hand off to a specialist or delegate a sub-task and get control back. Sessions, tasks, and task groups keep async work ordered.
LiveKit-optional
The same binary runs behind its own embedded dispatcher or a LiveKit server. Bring LiveKit or a CPaaS only for media.
Built to operate
Workers, load-aware dispatch, graceful drain, and OpenTelemetry traces, metrics, and structured logs are first-class.
Three layers, and we handle the middle one. You define the others.
You bring the agent. agents-go runs the turn loop and structures the async work. Everything provider- or wire-specific lives in plugins — so the session never names a model vendor or a transport.
Read the architecture// wire up a full voice turn: STT · LLM · TTS · VAD
session := agents.NewAgentSession(agents.AgentSessionOptions{
STT: stt, LLM: llm, TTS: tts, VAD: vad,
})
// bind a transport and let the loop run
session.Start(ctx, agents.StartOptions{
Agent: agent,
Transport: roomio.Bind(room),
})Listen. Think. Speak. Interrupt. Repeat.
The session detects when a caller has finished speaking, runs the model, calls your tools, and streams TTS back — handling barge-in and handoffs as they happen. You describe the agent; the runtime drives the conversation.
See how a turn flowsShip a voice agent this afternoon.
Install the module, connect a provider, and run your first interruptible voice agent in minutes — then scale it across a worker fleet.