fix: Prevent manager agent from having tools assigned (#2131)

- Add model validation to prevent tool assignment to manager agent
- Improve error handling in _create_manager_agent
- Add test to verify manager agent tools validation

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-14 20:25:12 +00:00
parent 1b488b6da7
commit e4282f7c53
4 changed files with 73 additions and 19 deletions

View File

@@ -21,12 +21,14 @@ class AgentTools:
agents=self.agents,
i18n=self.i18n,
description=self.i18n.tools("delegate_work").format(coworkers=coworkers), # type: ignore
name="Delegate Work"
)
ask_tool = AskQuestionTool(
agents=self.agents,
i18n=self.i18n,
description=self.i18n.tools("ask_question").format(coworkers=coworkers), # type: ignore
name="Ask Question"
)
return [delegate_tool, ask_tool]