Optional llmReadonly optionsReadonly sessionOptional sttOptional ttsOptional turnOptional vadConnection options for STT, LLM, and TTS.
The effective keyterms (user-defined + auto-detected) currently applied to the STT.
Returns usage summaries for this session, one per model/provider combination.
Optional options: { Optional allowOptional chatOptional inputThe input modality used for generating the reply. Defaults to "text".
Optional instructions?: string | InstructionsOptional toolOptional userRun a test with user input and return a result for assertions.
This method is primarily used for testing agent behavior without requiring a real room connection.
Run options including user input and optional output type.
When outputType is set and the turn ends without structured output, the
run re-prompts the model up to outputOptions.maxRetries times (default 2)
before rejecting with UnexpectedModelBehavior. Pass outputOptions: null
to disable retries entirely.
Optional inputOptional outputOptional outputA RunResult that resolves when the agent finishes responding
const result = await session.run({ userInput: 'Hello' });
result.expect.nextEvent().isMessage({ role: 'assistant' });
result.expect.noMoreEvents();
Optional options: { Optional addOptional allowOptional audio?: ReadableStream<AudioFrame>Optional inputOptional outputOptional record?: boolean | RecordingOptionsOptional room?: Room
Deprecated
use sessionOptions instead