@agent.events.subscribe decorator.
For a complete list of available events, see Events Reference.
Subscribing to Events
Use the@agent.events.subscribe decorator with a type hint to specify which event you want:
Common Events
| Event | When | Import |
|---|---|---|
CallSessionParticipantJoinedEvent | User joins call | vision_agents.core.events |
CallSessionParticipantLeftEvent | User leaves call | vision_agents.core.events |
CallSessionStartedEvent | Call session begins | vision_agents.core.events |
STTTranscriptEvent | Speech transcribed | vision_agents.core.stt.events |
LLMResponseCompletedEvent | LLM finishes response | vision_agents.core.llm.events |
PluginErrorEvent | Plugin encounters error | vision_agents.core.events |
ToolStartEvent / ToolEndEvent | Function calling | vision_agents.core.llm.events |
Example: Greeting Participants
Listening to Component Events
Subscribe to events from specific components using theirevents property:
Error Handling
Subscribe to error events for monitoring and recovery:Multiple Event Types
Handle related events in one handler usingUnion:

