Integrations
Use VoiceAI SDK with agent frameworks (AI SDK, Mastra, OpenAI Agents SDK, MCP) and audio transports (Twilio, LiveKit). Each page shows the wiring and where keys stay.
VoiceAI SDK is a server-side library with no framework dependency. A session is an object you create, use and close, so it runs in any Node or Bun process: a route handler, a WebSocket server, or an agent worker. An integration is the few lines that connect a session to something you already use.
Every integration follows the same rules. Provider keys stay on the server, and the browser or phone only sends and receives audio. A session that should outlive a connection gets a key, so a caller who reconnects finds it again. A session you're done with is closed, with await using or session.close(). Sessions and keys explains both.
Agent frameworks
Each framework gets voiceTools(session) from its own subpath. The tools are identical across frameworks: speak, listen, transcribe and end_call, in the format that framework expects. The model decides when to talk, when to wait for the caller, and when to hang up.
AI SDK
Voice tools for generateText and streamText.
Mastra
A tool map for a Mastra agent.
OpenAI Agents
A tool array for the OpenAI Agents SDK.
MCP
The voice tools over MCP, from the CLI or your own server.
Using another framework? Anything that can call a function can drive a session. Agent tools lists each tool's input and output, so you can wrap them in that framework's tool format.
Transports
A transport carries audio between the caller and the session. You attach one with session.connect, and the session listens to it and speaks into it.
For anything else that streams audio over a WebSocket, such as your own browser client, use webSocketAudio(ws) from voiceai-sdk/ws. The Quickstart uses it to hold a conversation.
Providers
The provider is a separate choice from the framework. Every integration works with every provider, so you can pick each one on its own and change either later by changing an import. When a transport needs an audio format the provider can't take, createSession fails with unsupported; see Capabilities.