diff --git a/docs/core-concepts/Crews.md b/docs/core-concepts/Crews.md index 1896c6a38..62c3da657 100644 --- a/docs/core-concepts/Crews.md +++ b/docs/core-concepts/Crews.md @@ -33,6 +33,7 @@ A crew in crewAI represents a collaborative group of agents working together to | **Manager Callbacks** _(optional)_ | `manager_callbacks` | `manager_callbacks` takes a list of callback handlers to be executed by the manager agent when a hierarchical process is used. | | **Prompt File** _(optional)_ | `prompt_file` | Path to the prompt JSON file to be used for the crew. | | **Planning** *(optional)* | `planning` | Adds planning ability to the Crew. When activated before each Crew iteration, all Crew data is sent to an AgentPlanner that will plan the tasks and this plan will be added to each task description. +| **Planning LLM** *(optional)* | `planning_llm` | The language model used by the AgentPlanner in a planning process. | !!! note "Crew Max RPM" The `max_rpm` attribute sets the maximum number of requests per minute the crew can perform to avoid rate limits and will override individual agents' `max_rpm` settings if you set it. diff --git a/docs/core-concepts/Planning.md b/docs/core-concepts/Planning.md index 810309703..5b0aba8c0 100644 --- a/docs/core-concepts/Planning.md +++ b/docs/core-concepts/Planning.md @@ -23,6 +23,25 @@ my_crew = Crew( From this point on, your crew will have planning enabled, and the tasks will be planned before each iteration. +#### Planning LLM + +Now you can define the LLM that will be used to plan the tasks. The default LLM is `gpt-4o-mini`, but you can change it to any other LLM as long as it is compatible. + +```python +from crewai import Crew, Agent, Task, Process +from langchain_openai import ChatOpenAI + +# Assemble your crew with planning capabilities and custom LLM +my_crew = Crew( + agents=self.agents, + tasks=self.tasks, + process=Process.sequential, + planning=True, + planning_llm=ChatOpenAI(model="gpt-4o") +) +``` + + ### Example When running the base case example, you will see something like the following output, which represents the output of the AgentPlanner responsible for creating the step-by-step logic to add to the Agents tasks.