Skip to main content
Agents emit events you can listen to - track progress, log activity, and extend behavior.
This page covers the AgentEventBus β€” a publish/subscribe hook system for agent lifecycle (start, message, complete, error). For the per-turn structured event stream used to render tool calls and text deltas in real time, see Streaming Events.

Quick Start

1

Simple Usage

2

With Configuration


User Interaction Flow


Configuration Levels


Event Types


API Reference

Events Module

Complete events module

AgentEventBus

Event bus class

Best Practices

Track tool calls and errors for debugging.
Subscribe to specific events for better performance.
Always listen for β€˜error’ events in production.

Hooks

Lifecycle hooks

PubSub

Publish-subscribe