Hey everyone! I am building automated tests for our LiveKit voice agent and wanted to sanity-check the approach before going too far
I have two layers of tests:
1) Roomless conversation tests
I intend to use AgentSession.run(user_input=...) to validate the agent’s conversational behavior without a room, STT, TTS, or VAD
The idea:
- Spin up sessions
- Send text input
- Inspect
RunResult.eventsfor messages, tool calls, and outputs
Our Agent subclass uses @function_tool decorators and custom skills that internally call CommandSender methods.
2) Browser UI tests
From the browser we send text via:
room.localParticipant.sendText(text, { topic: "lk.chat" })
Then we verify rendering and behavior using Playwright
Our understanding is that RoomIO automatically handles lk.chat and routes it through the same LLM pipeline as voice
Questions
- Is
session.run(user_input=...)the recommended way to test Agent subclasses without a room? Any pitfalls? - Does
lk.chattext follow the exact same pipeline as voice (including function tools), or are there differences?
Does this overall strategy make sense, or would you approach testing differently?