Optional agentCalled immediately before an agent starts.
Optional agentCalled after an agent produces its final output.
Optional handoffCalled when control is handed off between agents.
Optional toolCalled when an agent invokes a tool.
Optional errorCalled when an unhandled error occurs inside an agent.
Optional emergentCalled when the emergent subsystem forges a new agent.
Optional guardrailCalled after a guardrail evaluates an input or output.
Optional limitCalled when a resource limit is reached.
Optional approvalCalled when an approval request is raised.
Optional approvalCalled after an approval decision is resolved.
Optional guardrailCalled when a post-approval guardrail overrides an HITL approval. Fires after a tool call was approved but a guardrail detected a destructive pattern and vetoed the execution.
Event callbacks registered on
BaseAgentConfig.on. All handlers are fire-and-forget (returnvoid); errors thrown inside them are swallowed to prevent disrupting the main run.