Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add planning feature to crew #919

Merged
merged 7 commits into from
Jul 18, 2024
Merged

feat: Add planning feature to crew #919

merged 7 commits into from
Jul 18, 2024

Conversation

pythonbyte
Copy link
Collaborator

This PR aims to add the Plan and Execution ability to the Crew.

With Crew(planning=True) before the Crew runs an AgentPlanner will be responsible for creating a step-by-step plan for each task on the crew and that plan is added to each task description to guide and improve the output

@pythonbyte pythonbyte requested a review from joaomdmoura July 11, 2024 20:05
@joaomdmoura
Copy link
Collaborator

@pythonbyte could you add docs and link them in docs/index.md and mkdocs.yml?
Also jsut ot double check, dos this works on crews using the new yaml format?

@pythonbyte
Copy link
Collaborator Author

@pythonbyte could you add docs and link them in docs/index.md and mkdocs.yml? Also jsut ot double check, dos this works on crews using the new yaml format?

Nice catch @joaomdmoura thanks for reminding me.
Added the docs and tested them on yaml and worked nicely.

@@ -326,9 +328,14 @@ def get_agent_by_role(role: str) -> Union["BaseAgent", None]:

def _create_converter(self, *args, **kwargs) -> Converter:
"""Create a converter instance."""
converter = self.agent.get_output_converter(*args, **kwargs)
if self.converter_cls:
if self.agent and not self.converter_cls:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added to fix the Type Checking issue that was before this task.

@joaomdmoura On a second note, I was talking with @bhancockio, and we realized that the "if sef.converter_cls" was added by this PR #800

The issue with this overall function is that based on the typed return it should return a Converter, but both self.agent.get_output_converter and self.converter_cls could be None. So for now I'm raising the exception, but do you think is there something better that we can do it here or if its relevant to have this "converter_cls"?

Copy link
Collaborator

@joaomdmoura joaomdmoura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joaomdmoura joaomdmoura merged commit 61a1963 into main Jul 18, 2024
2 of 3 checks passed
@joaomdmoura joaomdmoura deleted the feat/plan-execute branch July 18, 2024 16:15
charl3sj pushed a commit to rnadigital/crewAI that referenced this pull request Aug 12, 2024
* feat: add planning feature to crew

* feat: add test to planning handler and change to execute_async method

* docs: add planning parameter to the Core documentation

* docs: add planning docs

* fix: fix type checking issue

* fix: test and logic
charl3sj pushed a commit to rnadigital/crewAI that referenced this pull request Aug 12, 2024
* feat: add planning feature to crew

* feat: add test to planning handler and change to execute_async method

* docs: add planning parameter to the Core documentation

* docs: add planning docs

* fix: fix type checking issue

* fix: test and logic
bhancockio pushed a commit that referenced this pull request Jan 2, 2025
* feat: add planning feature to crew

* feat: add test to planning handler and change to execute_async method

* docs: add planning parameter to the Core documentation

* docs: add planning docs

* fix: fix type checking issue

* fix: test and logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants