For an overview of how events are dispatched and patterns for using them, see the Event System Guide.
agent.simple_response(..., interrupt=...), agent.say(..., interrupt=...), and agent.metrics over wiring up low-level events.
Base Event Structure
All events inherit fromBaseEvent:
Plugin-emitted events extend
PluginBaseEvent, which adds two fields:
Agent Lifecycle Events
High-level events emitted by the agent itself as a call progresses through user and agent turns. Import:from vision_agents.core.agents.events import ...
UserTranscriptEvent
Emitted with the final user transcript that triggers an LLM turn. This is the event most apps should listen to for “what did the user say” — it fires in both classic STT and realtime modes.UserTurnStartedEvent
Emitted when the user starts speaking.UserTurnEndedEvent
Emitted when the user stops speaking.AgentTurnStartedEvent
Emitted when the agent starts speaking (first audio chunk leaving the pipeline). Carries only theBaseEvent fields.
AgentTurnEndedEvent
Emitted when the agent stops speaking. Useinterrupted to tell barge-in from natural completion.
AgentJoinedCallEvent
Emitted after the agent has joined a call.AgentLeftCallEvent
Emitted when the agent leaves a call.AgentFinishEvent
Emitted whenagent.finish() has completed. Carries only the BaseEvent fields.
Edge / Call Events
Events emitted by the edge transport for participant and track activity on the call. Import:from vision_agents.core.edge.events import ...
ParticipantJoinedEvent
Emitted when a participant (other than the agent) joins the call.ParticipantLeftEvent
Emitted when a participant (other than the agent) leaves the call.CallEndedEvent
Emitted when a call ends.TrackAddedEvent
Emitted when a track is added to the call.TrackRemovedEvent
Emitted when a track is removed from the call.AudioReceivedEvent
Emitted when audio is received from a participant. High-volume — silence it withagent.events.silent(AudioReceivedEvent) if you don’t need it.
LLM Events
Events from non-realtime LLM interactions. Import:from vision_agents.core.llm.events import ...
LLMResponseFinalEvent
Emitted when a final LLM response is received.LLMResponseCompletedEvent and LLMResponseChunkEvent were removed in v0.6.2 along with the heygen plugin that was their only consumer. Subscribe to LLMResponseFinalEvent instead for completion notifications.LLMErrorEvent
Emitted when a non-realtime LLM error occurs.Realtime LLM Events
Events specific to realtime LLM connections (e.g. OpenAI Realtime, Gemini Live). Import:from vision_agents.core.llm.events import ...
RealtimeConnectedEvent
Emitted when a realtime connection is established.RealtimeDisconnectedEvent
Emitted when the realtime connection closes.For conversation content in a realtime session, subscribe to
UserTranscriptEvent (see Agent Lifecycle Events) — it fires for both realtime and classic STT modes.Tool Events
Events for function calling / tool use. Import:from vision_agents.core.llm.events import ...
ToolStartEvent
Emitted when tool execution begins.ToolEndEvent
Emitted when tool execution completes.STT Events
Connection-state and error events from the speech-to-text plugin. Transcripts themselves surface asUserTranscriptEvent (see Agent Lifecycle Events).
Import: from vision_agents.core.stt.events import ...
STTConnectedEvent
Emitted when an STT connection is established. Carries only thePluginBaseEvent fields.
STTDisconnectedEvent
Emitted when an STT connection is closed.STTErrorEvent
Emitted when STT encounters an error.TTS Events
Events from speech synthesis. Import:from vision_agents.core.tts.events import ...
TTSSynthesisStartEvent
Emitted when TTS synthesis begins.TTSSynthesisCompleteEvent
Emitted when TTS synthesis finishes.TTSConnectedEvent
Emitted when a TTS connection is established. Carries only thePluginBaseEvent fields.
TTSDisconnectedEvent
Emitted when a TTS connection is closed.TTSErrorEvent
Emitted when TTS encounters an error.Video Processor Events
Vision plugins (Roboflow, Ultralytics, Huggingface, etc.) emit subclasses ofVideoProcessorDetectionEvent whenever they finish processing a frame.
Import: from vision_agents.core.events import VideoProcessorDetectionEvent
VideoProcessorDetectionEvent
Base class for detection events from any video processor plugin. Plugins extend it with their own fields (detected objects, bounding boxes, raw provider output).
To subscribe, import the plugin-specific subclass (for example
roboflow.DetectionCompletedEvent). See Create your own plugin for the conventions plugin events follow.
This event is used by
MetricsCollector to record video processing metrics. See Telemetry for details.ExceptionEvent
Wraps any unhandled exception raised by a subscriber. The event system catches handler failures and re-emits them asExceptionEvent so that other handlers and the agent itself keep running. Subscribe if you want a single place to log handler errors.
Subscribing to Events
All events can be subscribed to using the@agent.events.subscribe decorator: