mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 00:02:36 +00:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user