Open rawzone opened 1 week ago
You cannot directly pass self.project_manager as a parameter. In your case, you can try changing the code
@crew
def crew(self) -> Crew:
"""Creates the Mornings crew"""
return Crew(
manager_agent=self.project_manager,
agents=self.agents,
tasks=self.tasks,
# process=Process.sequential,
process=Process.hierarchical,
verbose=True,
)
to the following
@crew
def crew(self) -> Crew:
"""Creates the Mornings crew"""
return Crew(
manager_agent=self.agents[-1],
agents=self.agents[:-1],
tasks=self.tasks,
process=Process.hierarchical,
verbose=True,
)
Description
Having problems getting a agent manage to work.
Using the
crewai create crew
command to setup a project.Which uses different syntax than all the documentations, which is a bit strange in it self?
Just using the "supplied" agents and tasks while setting up the manager agent. So not many changes to the code beside changing for using local Ollama host and LLM models (See code in
crew.py
.Steps to Reproduce
crewai create crew <crew_name>
.crewai run
command.Expected behavior
Run the crew and have the manager agent managing other agents,
Screenshots/Code snippets
main.py:
crew.py:
agents.yaml:
tasks.yaml:
Operating System
Ubuntu 22.04
Python Version
3.10
crewAI Version
0.70.1
crewAI Tools Version
0.12.1
Virtual Environment
Venv
Evidence
Output from running the crew with
crewai run
:Have also tried to add configuration of the manager directly in the
crew.py
file like this:Which also is not working.
Possible Solution
None
Additional context
If i run the crew without the
manager_agent
attribute and just usesmanager_llm
the crew runs, but without any manager agent configuration I guess?This results in a lot of "errors" in the communications between the agents like:
And in the end the "final answer" is almost always useless fx.: