Set Tool Budget • AI Agent SDK
set_tool_budget: Set token budget for a specific tool.
set_tool_budget
Method
</div>
This is a method of the ContextManager class in the manager module.
Set token budget for a specific tool.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph LR
agent["Agent"] -- "uses" --> tool["Tool: set_tool_budget"]
tool -- "returns" --> result["Result"]
style tool fill:#189AB4,color:#fff
style agent fill:#8B0000,color:#fff
style result fill:#8B0000,color:#fffSignature
def set_tool_budget(tool_name: str, max_tokens: int, protected: bool) -> NoneParameters
ParamField
strNo description available.
ParamField
intNo description available.
ParamField
boolNo description available.
Uses
PerToolBudget
Source
View on GitHubpraisonaiagents/context/manager.py at line 721