Input Events
Input events are received by your agent from the Cartesia harness. All input events include an optionalhistory field containing the complete conversation history. When history is None, the event is being used within a history list; when history contains a list, the event has the full conversation context attached.
Call Lifecycle
User Turn Events
Agent Turn Events (in history)
Handoff Event
Custom Event
Received when your client application sends a
custom WebSocket event to the call stream. The event carries a metadata dict with whatever key-value pairs the client included:
Output Events
Output events are yielded by your agent to control the conversation.Speech
You can choose to send messages withAgentSendText.
interruptible flag as false.
Call Control
Dynamic Configuration
Update call settings (voice, pronunciation, language) mid-conversation usingAgentUpdateCall:
All fields are optional—only set fields are updated.
Tool Events
These are emitted byLlmAgent to track tool execution:
Logging
Custom Events
Send arbitrary metadata from your agent to the harness:UserCustomSent for bidirectional metadata exchange.
Voice & Language Control
Change voice or speech recognition language mid-call:language field sets the ASR (speech recognition) language. Pass any language code supported by Ink STT, or "multilingual" for automatic language detection.
Event History
All input events include an optionalhistory field containing the conversation history. When history is None, the event is inside a history list; when it contains a list, full conversation context is attached. LlmAgent handles this automatically—you only need to understand history if building custom agents.
Accessing History
Event types in history
Event types in history
Events in the history list have
history=None to avoid redundant nesting. The event types are the same as regular input events:How LlmAgent processes history
How LlmAgent processes history
LlmAgent automatically converts the event history to LLM messages:- User messages: From
UserTextSentevents - Assistant messages: From
AgentTextSentevents - Tool calls: From
AgentToolCalledandAgentToolReturnedevents
Custom agents: Using history
Custom agents: Using history
If building a custom agent (not using
LlmAgent), you can use history for context, summarization, or pattern detection: