Remove Hook • AI Agent SDK
remove_hook: Remove a hook by ID. Simplified API.
remove_hook
Function
</div>
This function is defined in the registry module.
Remove a hook by ID. Simplified API.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph TD
event["Event Trigger"] --> hook["Hook: remove_hook"]
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 remove_hook(hook_id: str) -> boolParameters
ParamField
strThe hook ID returned by add_hook()
Returns
ResponseField
boolTrue if hook was found and removed, False otherwise
Uses
unregisterget_default_registry
Source
View on GitHubpraisonaiagents/hooks/registry.py at line 451