feat: load Tool from Agent repository by their own module (#2940)

Previously, we only supported tools from the crewai-tools open-source repository. Now, we're introducing improved support for private tool repositories.
This commit is contained in:
Lucas Gomide
2025-06-04 10:53:25 -03:00
committed by GitHub
parent 372874fb3a
commit 552921cf83
2 changed files with 10 additions and 6 deletions

View File

@@ -464,7 +464,7 @@ def load_agent_from_repository(from_repository: str) -> Dict[str, Any]:
attributes[key] = []
for tool in value:
try:
module = importlib.import_module("crewai_tools")
module = importlib.import_module(tool["module"])
tool_class = getattr(module, tool["name"])
attributes[key].append(tool_class())
except Exception as e: