Hook Event • AI Agent SDK
HookEvent: Event names for the hook system.
HookEvent
Defined in the types module.
AI Agent
Event names for the hook system.
This enum is also aliased as PluginHook for backward compatibility. All plugin lifecycle events are included here for DRY compliance.
Invariant: every member declared here must have a real emission site, or be an explicit alias of a member that does. A member that is neither makes `registry.on(HookEvent.X) succeed and then never fire -- silence on a plausible-looking registration. BEFORE_MESSAGE, AFTER_MESSAGE and TOOL_RESULT_PERSIST are aliases (same value => same member); everything else is emitted somewhere in the monorepo, which tests/unit/hooks/test_dead_hook_events.py` enforces.
Source
View on GitHubpraisonaiagents/hooks/types.py at line 13