Open
Description
Proposed Content
Callouts on how to create class-based tools which enable customizing the behavior of the tool + dynamically changing properties.
Location
https://strandsagents.com/latest/user-guide/concepts/tools/python-tools/
Rationale
A proposed use case:
I'd like to have a file_read tool and want to dynamically change various restrictions like file extensions, directories, basically to pass in variables that the LLM can't mess with
Using modules or @tool decorator, the tool is basically a singleton
Users can already:
- Derive from
PythonAgentTool
(not preferred) or create a class in which @tool methods are exposed as tools (preferred), but we don't document this anywhere.
Content Outline (Optional)
No response
References
No response