Skip to content

[BUG] Strands import tools from tools/tools.py even when no tools are imported. #376

@samadwar

Description

@samadwar

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

0.2.1

Python Version

3.12.9

Operating System

Running on Amazon SageMaker AI - Code Editor - space ver 3.20

Installation Method

pip

Steps to Reproduce

  1. Install strands
  2. Have a folder structure where you have file tools\tools.py
  3. in tools.py have any number of strands tools
  4. Now if my code is:
>>> from strands import Agent
>>> from strands.models import BedrockModel
>>> model = BedrockModel(region_name="us-west-2")
>>> agent = Agent(model=model)
>>> agent("What tools do you have access to?")
I have access to the following tools:

1. `baggage_researcher` - This tool allows me to research luggage items based on an image and description. It analyzes the information to identify brand, model, age, and market value to help determine fair compensation for damaged items. It requires two parameters:
   - baggage_image_path: Path to the baggage image
   - baggage_description: Description of the baggage
.
.
.

If you check the code above, I did not import tools.py or any tools, yet my agent have the tools that I have inside tools\tools.py

Expected Behavior

Agent should not import tools by itself

Actual Behavior

Agent is automatically importing tools from a folder that it shouldn't import from

Additional Context

No response

Possible Solution

No response

Related Issues

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions