Testing utilities for agent evaluation.
import { AgentSession, Agent, voice } from '@livekit/agents';const session = new AgentSession({ llm });await session.start(agent);const result = await session.run({ userInput: 'Hello' });result.expect.nextEvent().isMessage({ role: 'assistant' });result.expect.noMoreEvents(); Copy
import { AgentSession, Agent, voice } from '@livekit/agents';const session = new AgentSession({ llm });await session.start(agent);const result = await session.run({ userInput: 'Hello' });result.expect.nextEvent().isMessage({ role: 'assistant' });result.expect.noMoreEvents();
Testing utilities for agent evaluation.
Example