feat: load Tool from Agent repository by their own module

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-03 11:25:08 -03:00
parent 66b7628972
commit 9c2e8e2471
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: