crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
19k stars 2.62k forks source link

IMPORTANT: How to use manager_agent and hierarchical mode correctly? #1056

Closed ckgithub2019 closed 2 weeks ago

ckgithub2019 commented 1 month ago

Are the conditions for using manager_agent and hierarchical mode correct? Couldn't find out the official detailed explanations.

  1. MUST customize manager_agent and manager_task?
  2. only manager_agent could be set as "allow_delegation = True" and the other agents are "allow_delegation = False"?
  3. MUST define the attribute "context" of Task?
  4. MUST call Crew like this? """ crew = Crew( agents=[ researcher_agent, ... ], tasks=[ research_task, ... manager_task ], verbose=2, process=Process.hierarchical, manager_agent=manager_agent, }
theCyberTech commented 1 month ago

Hi @ckgithub2019

1) Manager Agent: Optional: You can create a custom manager agent with specific skills for task management and delegation. If you don't provide one, CrewAI will create a default manager. 2)Tasks: Optional: Define your tasks as you would for a sequential process. The manager will handle the delegation and execution order. 3)Agent Delegation: OptionalWhile it's common for the manager to handle most delegation, you can allow other agents to delegate if it fits your use case.

ckgithub2019 commented 1 month ago

Hi @ckgithub2019

  1. Manager Agent: Optional: You can create a custom manager agent with specific skills for task management and delegation. If you don't provide one, CrewAI will create a default manager. 2)Tasks: Optional: Define your tasks as you would for a sequential process. The manager will handle the delegation and execution order. 3)Agent Delegation: OptionalWhile it's common for the manager to handle most delegation, you can allow other agents to delegate if it fits your use case.

Thanks.

  1. the default manager created by CrewAI is only based on OpenAI API model? I have to configure it in agent setup?
  2. About "The manager will handle the delegation and execution order" you said, is it automatic internally like a black box? Could I control the execution order of manager delegation?
  3. you mean "allow_delegation" is not relevant to manager agent and hierarchical mode? it's flexible and could be used anytime, no limitation or dependancy, right?