crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

IMPORTANT: How to use manager_agent and hierarchical mode correctly?

Open ckgithub2019 opened this issue 1 year ago • 2 comments

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, }

ckgithub2019 avatar Aug 04 '24 17:08 ckgithub2019

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.

theCyberTech avatar Aug 05 '24 01:08 theCyberTech

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?

ckgithub2019 avatar Aug 05 '24 01:08 ckgithub2019