Event listeners
CrewAI announces everything it does on an event bus. Write a listener that logs a newsroom crew's start, agent work and finish, and see why a listener that is never created stays silent.
10 minPro
Checking your access…
Inside this lesson
- An animation you play, pause and step through, with each part saying what it is doing.
- The real code beside it, with the lines for each step lit up.
- Practice mode, where you route each message yourself, and a short quiz.
- About 10 minutes.
Written from the official documentation
In this module: Streaming, events and hooks
- StreamingStreamFrame, channels and reading a run as it happens.Pro
- Event listenersSubscribing to the event bus for logging and monitoring.Pro
- Execution hooksThe @on decorator around runs, steps, LLM calls and tools.Pro
- Checkpointing and replaySaving run state, resuming after a failure, replaying a task.Pro