generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 496
Closed
Labels
bugSomething isn't workingSomething isn't workingready for contributionPull requests welcomePull requests welcome
Description
Checks
- I have updated to the lastest minor and patch version of Strands
- I have checked the documentation and this is not expected behavior
- I have searched ./issues and there are no duplicates of my issue
Strands Version
1.3.0
Python Version
3.11.13
Operating System
Linux
Installation Method
pip
Steps to Reproduce
Create a file called multiple_tools.py with multiple unique @tool definitions
Pass tool as file path to Agent:
agent = Agent(
tools=['/tools/multiple_tools.py']
)
Expected Behavior
The agent should have access to all the tools defined in multiple_tools.py
Actual Behavior
The agent only has access to the last defined @tool in the file - the rest are ignored.
Additional Context
If you create a file called multiple_tools.py with multiple @tool definitions and use load_tools_from_directory=True
agent = Agent(load_tools_from_directory=True)
All tools defined by @tool are loaded into the agent.
If you instead pass the file path only the last tool is loaded.
Possible Solution
N/A
Related Issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingready for contributionPull requests welcomePull requests welcome