World’s largest virtual agentic engineering & quality conference
LiveKit ships a lightweight pytest-based test layer, but it stops short of production-scale conversation testing. Learn how to test a LiveKit voice agent.

Akarshi Aggarwal
Author

Salman Khan
Reviewer
Last Updated on: July 21, 2026
The livekit/agents repository has drawn over 11,400 stars and 3,300 forks, a sign of how many teams are now assembling voice agents in code instead of configuring a hosted, no-code builder. LiveKit gives those teams a serious WebRTC foundation and, more recently, a first-party test layer for the pipelines they build on it.
That built-in testing covers real ground, and it also has real edges. It validates behavior in text mode against a test harness; it does not run your agent through adversarial personas, accented callers, or background noise, and it is not built for production monitoring.
This guide covers what LiveKit and LiveKit Agents actually are, how a LiveKit-built agent fails in production, what LiveKit's own test layer does and does not cover, and how to test the agent you build once it is deployed.
Overview
LiveKit is open source WebRTC infrastructure plus LiveKit Agents, a Python and Node.js framework for building voice agents in code: developers wire an AgentSession from STT, LLM, TTS, and turn-detection plugins, then connect it to browsers, mobile clients, or phone calls through LiveKit SIP.
What LiveKit gives you for testing:
How to close that gap:
LiveKit is both a WebRTC infrastructure project and a framework for building AI agents on top of it. The core livekit/livekit repository is a distributed WebRTC SFU (selective forwarding unit), the media server that moves audio, video, and data between participants in real time. Its data model has three parts: a room is the virtual space where a session happens, participants are the users, agents, or services in that room, and tracks are the audio, video, or data streams each participant publishes or subscribes to.
LiveKit Agents is a separate, higher-level framework that runs as a server-side participant inside a room. Its core class, AgentSession, combines a speech-to-text provider, an LLM, a text-to-speech provider, and turn-detection handling into one streaming voice pipeline. A minimal agent looks like this:
from livekit import agents
from livekit.agents import AgentSession, Agent, RoomInputOptions
from livekit.plugins import deepgram, openai, cartesia, silero
class SupportAgent(Agent):
def __init__(self):
super().__init__(
instructions="You are a customer support agent for Acme Corp. "
"Be concise, empathetic, and never invent account details."
)
async def entrypoint(ctx: agents.JobContext):
session = AgentSession(
vad=silero.VAD.load(),
stt=deepgram.STT(model="nova-3"),
llm=openai.LLM(model="gpt-4o"),
tts=cartesia.TTS(),
)
await session.start(
room=ctx.room,
agent=SupportAgent(),
room_input_options=RoomInputOptions(),
)
if __name__ == "__main__":
agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint))Phone integration works through LiveKit SIP, generally available since 2025. Inbound calls arrive through a SIP trunk and get routed into a room by dispatch rules; outbound calls are placed through LiveKit's server API. Either way, callers show up as ordinary SIP participants, so the agent interacts with them the same way it would with any other room participant. Full detail lives in the telephony integration docs.
LiveKit offers both a fully self-hosted path and a managed LiveKit Cloud tier. Cloud pricing starts with a free Build tier (1,000 agent session minutes, 5 concurrent sessions), a Ship tier from $50 a month (5,000 minutes, 20 concurrent sessions), and a Scale tier from $500 a month (50,000 minutes, up to 600 concurrent sessions), with custom Enterprise plans above that. Self-hosting the open source media server and Agents framework carries no LiveKit licensing cost, only your own infrastructure.
Because a LiveKit agent is assembled from whichever plugins the developer picked, most production issues trace back to that specific combination rather than a bug in LiveKit itself.
None of this is a defect in LiveKit's design. A framework leaves component choice to the developer, and the tradeoff is that validating those choices together, not just individually, is also the developer's job.
Every voice agent, regardless of framework, needs coverage across four dimensions: task success, conversation quality, safety, and resilience. For a LiveKit agent specifically, resilience testing has to account for the exact plugin combination in that deployment.
| Dimension | What It Checks | LiveKit-Specific Example |
|---|---|---|
| Task success | Whether the agent completes what the caller needed. | An AgentSession that transcribes a request correctly but never calls the downstream tool to complete it still fails task success. |
| Conversation quality | Hallucination, completeness, context retention, and tone across turns. | LiveKit's own text-mode judge assertion can catch a single bad response, but not a tone that drifts over ten real turns. |
| Safety | Resistance to prompt injection, PII leakage, and off-policy responses. | The agent's instructions live in your own code, so nothing in LiveKit itself screens a jailbreak attempt before it reaches your LLM call. |
| Resilience | Stability under noise, interruptions, accents, and load. | A turn-detection setting that works in a quiet browser test can misfire on a noisy call, and that only shows up if you test that condition directly. |
These four dimensions are the same ones covered in the broader AI agent testing framework, applied here to a LiveKit-specific pipeline.
Unlike some voice frameworks that ship no evaluation layer at all, LiveKit provides a first-party testing module built as a thin layer over pytest (Python) and Vitest (Node.js).
The same documentation is direct about what this does not cover: end-to-end audio-pipeline testing, and production monitoring, both of which it points developers to third-party tools for. In practice, that means the built-in layer is well suited to catching a broken tool call or a clearly wrong response during development, and not suited to catching an accent your STT mishandles, a turn-detection setting that misfires under background noise, or a tone that drifts across a real ten-turn phone call.
That gap, between unit-level text assertions and full-conversation, real-audio, multi-persona testing, is exactly where a dedicated evaluation platform earns its place alongside LiveKit's own test layer rather than instead of it.
Note: LiveKit's test layer is a strong first check during development, but it stops at text-mode, single-turn assertions. TestMu AI's Agent Testing runs full audio conversations against your deployed LiveKit agent, with adversarial personas probing for jailbreaks and data leakage before a real caller finds those gaps. Start testing free
Testing a deployed LiveKit agent means triggering real conversations against the room or phone number it answers on, capturing what happened, and scoring it against the four dimensions above.
Steps three through six are where TestMu AI's Agent Testing does the work. It treats your LiveKit agent as a black box reached through the room or phone number its AgentSession answers on: you give it the agent's role and policies once, and it generates the synthetic callers, connects to the deployment, runs each caller through a full multi-turn conversation, and grades what comes back, whichever STT, LLM, and TTS plugins sit behind it.
The Agent Testing CLI, TestMu AI's testmu-a2a-cli, drives that from the terminal, calling the deployed endpoint the way a real caller would:
# Call the room or phone number your LiveKit agent answers on
testmu-a2a call \
--number +15551234567 \
--persona confused \
--scenario "Customer wants to reschedule an appointment" \
--voice Neha
# Run a full regression suite against the same deployment
testmu-a2a suites run --project <project_id> --name "Regression"Each conversation is scored on 9 conversation-quality metrics, including hallucination, completeness, and context awareness, plus 30+ phone-specific metrics like first call resolution, containment rate, and DTMF handling accuracy. The run rolls up into a Green, Yellow, or Red readiness verdict, with the failing transcripts attached so you can see the turn that broke instead of guessing at it. When a self-hosted AgentSession runs inside private infrastructure, the platform reaches it through HyperExecute's secure tunnel, so the room or SIP endpoint under test never needs a public address.
The run above gets an agent ready for its first real call. Keeping it ready is a separate job, because a LiveKit agent's behavior drifts even when the room, dispatch rules, and pipeline wiring never change.
This ongoing discipline is the subject of voice agent regression testing in depth, and it pairs with the four-dimension approach covered in AI agent evaluation beyond pass/fail.
LiveKit gives developers real infrastructure and a real, if partial, testing layer, which puts it ahead of frameworks that ship no evaluation tooling at all. The part it leaves open is exactly the part that matters most once an agent is live: whether it holds up across real audio, real accents, and a real adversarial caller.
Start with the room or phone number you already have deployed, not a rewrite of your pipeline. Run LiveKit's own test suite for the checks it does well, then capture a baseline set of full-conversation test calls, including at least one adversarial persona, so the next plugin swap has something concrete to regress against. Follow the testing your first AI agent guide to connect your build and run the first suite.
Author
Akarshi Aggarwal is a community contributor with 2+ years of experience in marketing and growth. She specializes in automation testing and frameworks like Cypress, Playwright, Selenium, and Appium. Akarshi has written numerous technical articles, contributing valuable insights into automation testing practices. She actively engages with the tech community, sharing expertise on test automation and quality engineering. On LinkedIn, she is followed by over 7,000 QA professionals, software testers, DevOps engineers, developers, and tech enthusiasts.
Reviewer
Salman is a Test Automation Evangelist and Community Contributor at TestMu AI, with over 6 years of hands-on experience in software testing and automation. He has completed his Master of Technology in Computer Science and Engineering, demonstrating strong technical expertise in software development, testing, AI agents and LLMs. He is certified in KaneAI, Automation Testing, Selenium, Cypress, Playwright, and Appium, with deep experience in CI/CD pipelines, cross-browser testing, AI in testing, and mobile automation. Salman works closely with engineering teams to convert complex testing concepts into actionable, developer-first content. Salman has authored 120+ technical tutorials, guides, and documentation on test automation, web development, and related domains, making him a strong voice in the QA and testing community.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance