- Session Events
- Event Types
- Agent Events
- RealtimeAgentStartEvent
- agent
- info
- RealtimeAgentEndEvent
- agent
- info
- Audio Events
- RealtimeAudio
- audio
- item_id
- content_index
- info
- RealtimeAudioEnd
- info
- item_id
- content_index
- RealtimeAudioInterrupted
- info
- item_id
- content_index
- Tool Events
- RealtimeToolStart
- agent
- tool
- arguments
- info
- RealtimeToolEnd
- agent
- tool
- arguments
- output
- info
- Handoff Events
- RealtimeHandoffEvent
- from_agent
- to_agent
- info
- Guardrail Events
- RealtimeGuardrailTripped
- guardrail_results
- message
- info
- History Events
- RealtimeHistoryAdded
- item
- info
- RealtimeHistoryUpdated
- history
- info
- Error Events
- RealtimeError
- error
- info
- Raw Model Events
- RealtimeRawModelEvent
- data
- info
Realtime Events
Session Events
Event Types
Agent Events
Audio Events
Triggered when the agent generates new audio to be played.
Source code insrc/agents/realtime/events.py
Triggered when the agent stops generating audio.
Source code insrc/agents/realtime/events.py
Triggered when the agent is interrupted. Can be listened to by the user to stop audioplayback or give visual indicators to the user.
Source code insrc/agents/realtime/events.py
Tool Events
An agent is starting a tool call.
Source code insrc/agents/realtime/events.py
An agent has ended a tool call.
Source code insrc/agents/realtime/events.py
Handoff Events
An agent has handed off to another agent.
Source code insrc/agents/realtime/events.py
Guardrail Events
A guardrail has been tripped and the agent has been interrupted.
Source code insrc/agents/realtime/events.py
guardrail_resultsinstance-attribute
guardrail_results:list[OutputGuardrailResult]The results from all triggered guardrails.
messageinstance-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.