Hooks Config • AI Agent SDK
HooksConfig: Configuration for agent hooks/callbacks.
HooksConfig
Defined in the Feature Configs module.
AI Agent
Configuration for agent hooks/callbacks.
Consolidates: hooks, step_callback
%%{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:#fffProperties
ResponseField
Optional[Callable]No description available.
ResponseField
Optional[Callable]No description available.
ResponseField
List[Any]No description available.
ResponseField
OptionalNo description available.
Internal & Generic Methods
- to_dict: Convert to dictionary.
Usage
Agent(hooks=HooksConfig(
on_step=my_step_callback,
on_tool_call=my_tool_callback,
middleware=[my_middleware],
))Source
View on GitHubpraisonaiagents/config/feature_configs.py at line 1425