Hook Event • Rust AI Agent SDK
HookEvent: Event names for the hook system
HookEvent
Defined in the hooks module.
Rust AI Agent SDK
Event names for the hook system
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph TD
event["Event Trigger"] --> hook["Hook: HookEvent"]
hook --> decision{"Decision"}
decision -- "Allow" --> proc["Process"]
decision -- "Deny" --> block["Block"]
style hook fill:#189AB4,color:#fff
style event fill:#8B0000,color:#fff
style proc fill:#8B0000,color:#fff
style block fill:#8B0000,color:#fffFields
| Name | Type | Description |
|---|---|---|
Before | variant | – |
tool | variant | – |
execution | variant | – |
BeforeTool | variant | Before tool execution |
After | variant | – |
tool | variant | – |
execution | variant | – |
AfterTool | variant | After tool execution |
Before | variant | – |
agent | variant | – |
processes | variant | – |
a | variant | – |
message | variant | – |
BeforeAgent | variant | Before agent processes a message |
After | variant | – |
agent | variant | – |
processes | variant | – |
a | variant | – |
message | variant | – |
AfterAgent | variant | After agent processes a message |
Before | variant | – |
LLM | variant | – |
call | variant | – |
BeforeLlm | variant | Before LLM call |
After | variant | – |
LLM | variant | – |
call | variant | – |
AfterLlm | variant | After LLM call |
Session | variant | – |
start | variant | – |
SessionStart | variant | Session start |
Session | variant | – |
end | variant | – |
SessionEnd | variant | Session end |
On | variant | – |
error | variant | – |
OnError | variant | On error |
On | variant | – |
retry | variant | – |
OnRetry | variant | On retry |
On | variant | – |
initialization | variant | – |
OnInit | variant | On initialization |
On | variant | – |
shutdown | variant | – |
OnShutdown | variant | On shutdown |
Source
View on GitHubpraisonai/src/hooks/mod.rs at line 0