Realtime Events
Session Events
Event Types
Agent Events
Audio Events
Triggered when the agent generates new audio to be played.
Source code in src/agents/realtime/events.py
Triggered when the agent is interrupted. Can be listened to by the user to stop audio playback or give visual indicators to the user.
Source code in src/agents/realtime/events.py
Tool Events
An agent has ended a tool call.
Source code in src/agents/realtime/events.py
Handoff Events
An agent has handed off to another agent.
Source code in src/agents/realtime/events.py
Guardrail Events
A guardrail has been tripped and the agent has been interrupted.
Source code in src/agents/realtime/events.py
guardrail_results
instance-attribute
guardrail_results: list[OutputGuardrailResult]
The results from all triggered guardrails.
message
instance-attribute
The message that was being generated when the guardrail was triggered.
History Events
The history has been updated. Contains the full history of the session.