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
21.93k stars 3.04k forks source link

Parameters passed to building the crew using the Crew() API #913

Open simith opened 4 months ago

simith commented 4 months ago

As per the API, when building a crew a List of Tasks needs to be provided, however, tasks <--> Agent are already associated when Task is created, see below, An Agent should know what tasks it has to do,

Agent volleyball_enthusiast = Agent( role="Volleyball Enthusiast", goal="Help with general tasks related to Volleyball", backstory="An ex volleyball player with 20 years of game experience, including organising games", tools=[search_tool] )

Task rebounding_wall_building_task = Task( description="Plan for building a wall for practicing volleyball at university college", agent=volleyball_enthusiast, expected_output="provide a JSON output so that my web application can process it" )

Crew volleyball_club_crew = Crew( agents=[volleyball_enthusiast], _tasks=[rebounding_wall_buildingtask], process=Process.sequential )

Are tasks really required to be passed during a Crew creation, as a Crew is just a list of Agents or Crew members, and providing tasks in the Crew creation API does not make much sense to me? Please let me know.

theCyberTech commented 4 months ago

Which API are you referring to here?

simith commented 4 months ago

volleyball_club_crew = Crew( agents=[volleyball_enthusiast], tasks=[rebounding_wall_building_task], process=Process.sequential )

The above crew creation API, Does the above one need to be passed Tasks? As we are already passing Agent references to Tasks