Voice Agent

LiveKit clients

Join Voice Agent calls from iOS, Android, Flutter, React Native, or LiveKit's React components using the session token your backend returns.

Voice Agent calls run on LiveKit. The session response follows LiveKit's standard token-endpoint format (server_url plus participant_token), so any LiveKit client SDK can join, and LiveKit's agent UI components work without changes. Use @humain-voice/agent in the browser unless you already build on LiveKit.

Connect with the token

Your backend route returns { "server_url": "…", "participant_token": "…" }, as in the quickstart. Fetch it right before connecting, then connect and turn on the microphone:

import { Room } from 'livekit-client';

const { server_url, participant_token } = await fetch('/agent-session', { method: 'POST' }).then((res) => res.json());
const room = new Room();
await room.connect(server_url, participant_token);
await room.localParticipant.setMicrophoneEnabled(true);

LiveKit's session helpers can call your route for you: point TokenSource.endpoint at it. The token already sends the agent to the call, so you don't pass an agent name; any room_config the helper sends to your route can be ignored.

Platforms

PlatformLiveKit SDKNotes
Web, Reactlivekit-client, @livekit/components-reactAgents UI components such as the control bar, audio visualizer, and chat transcript work as they are.
iOS, macOSLiveKit Swift SDKAdd NSMicrophoneUsageDescription to Info.plist.
AndroidLiveKit Android SDKRequest the RECORD_AUDIO permission before connecting.
Flutterlivekit_clientRequest microphone permission on both platforms.
React Native@livekit/react-nativeNeeds a development build, not Expo Go.

Audio, agent mode, transcripts, and typed messages come built in from LiveKit. Client tools, warnings, the end reason, and context updates use the signals in Without the SDK.

On this page