Skip to main content
Set OnEvent on RunOptions or ContinueOptions to receive structured lifecycle events without coupling your application to the model transport.
Useful event families include run start/completion/failure, model attempts, output text and reasoning deltas, tool start/progress/completion/failure, and human checkpoints. Keep handlers fast and non-blocking. Send events to your own queue or telemetry layer when persistence may take time, and redact sensitive tool inputs before forwarding them externally.
Last modified on July 26, 2026