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
20.86k stars 2.89k forks source link

Manger agent not working as expected #979

Open pradeepdev-1995 opened 3 months ago

pradeepdev-1995 commented 3 months ago

I have the crew in the following format Agents

from crewai import Agent
llm_object = <Azurechatopenai llm object langchain>
agent_1 = Agent(
    role = <role>,
    goal=<goal>,
    backstory=<backstory>,
    llm = llm_object,
    max_iter = 1,
    allow_delegation=False,
)
agent_2 = Agent(
    role = <role>,
    goal=<goal>,
    backstory=<backstory>,
    llm = llm_object,
    max_iter = 1,
    allow_delegation=False,
)
manager = Agent(
    role = <role>,
    goal=<goal>,
    backstory=<backstory>,
    llm = llm_object,
    max_iter = 1,
    allow_delegation=True,
)

Tasks

from crewai import Task
task_1= Task(
    description = "<description>",
    expected_output=<expected_output>,
    agent = agent_1
)
task_2= Task(
    description = "<description>",
    expected_output=<expected_output>,
    agent = agent_2
)

crew file

from crewai import Crew
crew = Crew(
    agents = [agent_1,agent_2],
    tasks = [task_1,task_2],
    process = Process.hierarchical,
    max_rpm = 1,
    manager_agent = manager
    cache=True
)

What I am expecting is the out put of task1 and task2 is the 2 numerical values and manger agent can get the response from task_1 and task_2 and generate the final answer (another numerical value based on two indidual task output) using some calculations. But what I could see from the console that task_1 and task_2 is getting executed and numerical values are generating. But the manager agent is not involving next and the final numerical value is not generating(even I put allow_delegation=True for manager agent) . What is wrong in my configuration?

theCyberTech commented 3 months ago

Hi @pradeepdev-1995

Is this still an issue for you on latest version:

crewai 0.41.1 crewai-tools 0.4.26

Srajangpt1 commented 1 week ago

@theCyberTech this is still an issue for me with the latest version of crewai.