Voice Agents — Real-Time Voice Conversations
Voice Agents let users talk to any FleetQ Agent in real time over WebRTC. A browser client captures audio, a server-side worker streams it through speech-to-text, dispatches the transcript to the agent's LLM, speaks the response via text-to-speech, and sends the audio back — all with full-duplex streaming and sub-second latency.
Scenario: A customer calls a FleetQ-powered support line from the web. The "Tier-1 Support" agent answers, looks up the caller's account in a connected CRM via MCP, walks them through a password reset, and logs a transcript for QA review — all without human involvement.
voice_agent
feature flag on your plan, the voice-worker Docker service,
and a LiveKit Cloud project. Get in touch with support to enable it on your team.
Architecture
Voice sessions combine four moving parts:
1. Browser client
Uses @livekit/client to open a WebRTC connection to LiveKit Cloud,
publish the user's microphone track, and play the agent's audio track back. The client runs
entirely in the page — no additional SDK needed.
2. LiveKit room
A short-lived room is created per session. FleetQ issues scoped JWTs to both the user and the voice worker. Rooms auto-destruct when the session ends or times out.
3. Voice worker (Python)
A Docker service (profile: voice) runs a Python
LiveKit Agents process. It connects to the room, pipes audio through
Deepgram/Whisper STT, sends the transcript to a FleetQ agent via the internal
LLM gateway, and returns the response via ElevenLabs/OpenAI TTS.
4. Redis dispatch
FleetQ publishes a job to Redis when a session is requested; the voice worker subscribes and picks it up. This keeps the Laravel request/response cycle decoupled from the long-lived audio session.
Session lifecycle
- Client calls
voice_session_createwith anagent_id. - FleetQ creates a LiveKit room, issues JWTs, dispatches a job to the voice worker, and returns the connection details to the browser.
- Browser joins the room. The voice worker joins in parallel and connects STT, TTS, and the agent LLM.
- Real-time audio flows in both directions. Each user turn is transcribed, fed to the agent, and the response spoken back.
- Session ends automatically (user disconnect, idle timeout) or explicitly via
voice_session_end. - The worker writes a full transcript to the
VoiceSessionrecord, retrievable viavoice_session_get_transcript.
MCP tools
Voice session lifecycle is fully controllable via the MCP server. The VoiceSession
tool group is registered in AgentFleetServer when the
voice_agent feature flag is active for the calling team.
| Tool | Description |
|---|---|
| voice_session_create | Start a voice session with a specified agent. Returns LiveKit connection details and a session UUID. |
| voice_session_list | List voice sessions for the team (active + historical). |
| voice_session_end | End an active voice session cleanly (the worker flushes the transcript on exit). |
| voice_session_get_transcript | Retrieve the full transcript of a completed session, including per-turn timings. |
Configuration
Enabling voice requires the following:
| Requirement | Details |
|---|---|
| Feature flag | voice_agent must be enabled on the team's plan (Enterprise). |
| Docker service | Start the stack with profile voice: docker compose --profile voice up -d voice-worker |
| LiveKit project | Provide LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET in .env. |
| STT / TTS credentials | Deepgram or OpenAI Whisper for STT; ElevenLabs or OpenAI TTS for speech synthesis. Store as team-scoped credentials. |
| Agent | Any FleetQ agent can back a voice session — the usual role/goal/backstory, tools, and skills apply. |
Related concepts
- Agents — the underlying worker for every voice session.
- Chatbots & Telegram — text-based equivalents of voice sessions.
- Tools — agents called from voice can use any attached tool, including MCP servers and bash.