Get Hook Type • AI Agent SDK
get_hook_type: Get the hook type of a decorated function.
get_hook_type
Function
</div>
This function is defined in the middleware module.
Get the hook type of a decorated function.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph TD
event["Event Trigger"] --> hook["Hook: get_hook_type"]
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:#fffSignature
def get_hook_type(func: Callable) -> Optional[str]Parameters
ParamField
CallableNo description available.
Returns
ResponseField
Optional[str]The result of the operation.
Used By
Source
View on GitHubpraisonaiagents/hooks/middleware.py at line 377