Categorize Hooks • AI Agent SDK

categorize_hooks: Categorize hooks by their type.

categorize_hooks

Function

</div>

This function is defined in the middleware module.

Categorize hooks by their type.

Diagram

Allow

Deny

Event Trigger

Hook: categorize_hooks

Decision

Process

Block

Signature

python
def categorize_hooks(hooks: List[Callable]) -> Dict[str, List[Callable]]

Parameters

ParamField List[Callable]

No description available.

Returns

ResponseField Dict[str, List[Callable]]

before_model, after_model, wrap_model_call, before_tool, after_tool, wrap_tool_call

Uses

  • get_hook_type

Source

View on GitHub

praisonaiagents/hooks/middleware.py at line 388


Related Documentation