on • AI Agent SDK

on: Register an event handler.

on

Method

</div>

This is a method of the ObservabilityHooks class in the observability module.

Register an event handler.

Signature

python
def on(event_type: EventType, handler: Callable[[ObservabilityEvent], None]) -> Any

Parameters

ParamField EventType

Type of event to handle

ParamField Callable

Handler function

Returns

ResponseField Any

The result of the operation.

Source

View on GitHub

praisonaiagents/escalation/observability.py at line 154