Hooks Config • Rust AI Agent SDK
HooksConfig: Hooks configuration for before/after tool execution
HooksConfig
Defined in the config module.
Rust AI Agent SDK
Hooks configuration for before/after tool execution
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph TD
event["Event Trigger"] --> hook["Hook: HooksConfig"]
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 |
|---|---|---|
enabled | bool | Enable hooks |
Methods
new
fn new() -> SelfCreate a new hooks config
enabled
fn enabled(mut self) -> SelfEnable hooks
Source
View on GitHubpraisonai/src/config.rs at line 93