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
22.04k stars 3.06k forks source link

[FEATURE] Questions on the code design as shown in documentation #1673

Open xtfocus opened 6 days ago

xtfocus commented 6 days ago

Feature Area

Documentation

Is your feature request related to a an existing bug? Please link it here.

No

Describe the solution you'd like

I was studying the example code at https://docs.crewai.com/concepts/tasks. I have two questions:

  1. It bugs me a little here:
# Example task
task = Task(
    description='Find and summarize the latest AI news',
    expected_output='A bullet list summary of the top 5 most important AI news',
    agent=research_agent,
    tools=[search_tool]
)

# Execute the crew
crew = Crew(
    agents=[research_agent],
    tasks=[task],
    verbose=True
)

research_agent is repeatedly referred in task and crew. Is this intentional or a design flaw (redundancy)?

  1. Also, from the Task Attribute table, it seems that each Task can only have one Agent, but in here it's noted

    Tasks within CrewAI can be collaborative, requiring multiple agents to work together

which seems conflicting to me.

Describe alternatives you've considered

No response

Additional context

No response

Willingness to Contribute

Yes, I'd be happy to submit a pull request

theCyberTech commented 6 days ago

Hi, was the intention to submit a feature request? I am assuming not?

Can you please expand on what your actual issue is and how we can help you with it

xtfocus commented 6 days ago

Hi, was the intention to submit a feature request? I am assuming not?

Can you please expand on what your actual issue is and how we can help you with it

It's not a feature request per se, but could turn into one. It's more of a question on the code design. I could not find the appropriate label for my curiosity-driven question. Sorry about that.