Overview
Pipecat provides an event system that lets you hook into lifecycle changes across the framework — pipeline state transitions, service connections, transport activity, conversation turns, errors, and more. Events are available on most Pipecat objects (anything that inherits fromBaseObject). You register handlers using the @event_handler decorator, and Pipecat calls them automatically when things happen.
Registering Event Handlers
Use the@event_handler decorator on the object that emits the event:
async or synchronous functions — Pipecat detects which and calls them appropriately.
Multiple Handlers
You can register multiple handlers for the same event. They execute in the order they were registered:Synchronous vs Asynchronous Events
Events are either synchronous or asynchronous, depending on how the component registered them internally:-
Synchronous events (
sync=True) run the handler inline — the caller waits for the handler to complete before continuing. These are used for events that must complete immediately, such as frame processing hooks and error handling. Synchronous event handlers should execute fast to avoid blocking the pipeline. -
Asynchronous events (default) run the handler in a background
asyncio.Task. The caller continues immediately. These are used for events where you might do I/O, logging, or other work that shouldn’t block the pipeline.
You don’t need to choose — the sync/async behavior is determined by the
component, not by your handler. Your handler can be an
async def or a
regular def regardless.Events Reference
The table below lists all events available in Pipecat, grouped by component. Click through to the linked documentation for full details including handler signatures and usage examples.Pipeline
Events onPipelineWorker.
Frame Processor
Events on everyFrameProcessor. Since all services, transports, and processors inherit from FrameProcessor, these events are available on any processor in your pipeline.
Turn Management
Events on context aggregators fromLLMContextAggregatorPair.
STT Services
Events on STT service instances. Available on all WebSocket-based STT services. See Service Events for details.
Some STT services have additional events:
Deepgram STT:
Deepgram Flux STT:
Speechmatics STT:
Sarvam STT:
TTS Services
Events on TTS service instances. Available on all WebSocket-based TTS services. See Service Events for details.LLM Services
Events on LLM service instances. See Service Events for details.
OpenAI Realtime / Grok Realtime:
Daily Transport
Events onDailyTransport instances.
LiveKit Transport
Events onLiveKitTransport instances.
WebSocket Transports
Events on WebSocket transport instances. WebSocketServerTransport:
FastAPIWebsocketTransport:
WebSocketClientTransport:
Other Transports
SmallWebRTCTransport:
HeyGenTransport / TavusTransport:
Utilities
ContextSummarizer:
ServiceSwitcher:
TranscriptProcessor:
AudioBufferProcessor:
RTVIProcessor:
Observers
TurnTrackingObserver:
UserBotLatencyObserver:
Extensions
VoicemailDetector:
IVRNavigator: