Run After Tool • AI Agent SDK
run_after_tool: Run all after_tool hooks (in reverse order).
run_after_tool
Method
</div>
This is a method of the MiddlewareManager class in the middleware module.
Run all after_tool hooks (in reverse order).
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph LR
agent["Agent"] -- "uses" --> tool["Tool: run_after_tool"]
tool -- "returns" --> result["Result"]
style tool fill:#189AB4,color:#fff
style agent fill:#8B0000,color:#fff
style result fill:#8B0000,color:#fffSignature
def run_after_tool(response: ToolResponse) -> ToolResponseParameters
ParamField
ToolResponseNo description available.
Returns
ResponseField
ToolResponseThe result of the operation.
Uses
hook
Used By
Source
View on GitHubpraisonaiagents/hooks/middleware.py at line 463