diff --git a/.cache/plugin/social/e580fe32a1d3f15fc89057d053ae3e52.png b/.cache/plugin/social/e580fe32a1d3f15fc89057d053ae3e52.png new file mode 100644 index 000000000..bef89c53f Binary files /dev/null and b/.cache/plugin/social/e580fe32a1d3f15fc89057d053ae3e52.png differ diff --git a/docs/getting-started.md b/docs/getting-started.md deleted file mode 100644 index d7a11a451..000000000 --- a/docs/getting-started.md +++ /dev/null @@ -1,95 +0,0 @@ -# Getting Started - -To get started with CrewAI, follow these simple steps: - -1. **Installation**: - -```shell -pip install crewai -``` - -The example below also uses duckduckgo, so also install that -```shell -pip install duckduckgo-search -``` - -2. **Setting Up Your Crew**: - -```python -import os -from crewai import Agent, Task, Crew, Process - -os.environ["OPENAI_API_KEY"] = "YOUR KEY" - -# You can choose to use a local model through Ollama for example. See ./docs/llm-connections.md for more information. -# from langchain.llms import Ollama -# ollama_llm = Ollama(model="openhermes") - -# Install duckduckgo-search for this example: -# !pip install -U duckduckgo-search - -from langchain_community.tools import DuckDuckGoSearchRun -search_tool = DuckDuckGoSearchRun() - -# Define your agents with roles and goals -researcher = Agent( - role='Senior Research Analyst', - goal='Uncover cutting-edge developments in AI and data science', - backstory="""You work at a leading tech think tank. - Your expertise lies in identifying emerging trends. - You have a knack for dissecting complex data and presenting - actionable insights.""", - verbose=True, - allow_delegation=False, - tools=[search_tool] - # You can pass an optional llm attribute specifying what mode you wanna use. - # It can be a local model through Ollama / LM Studio or a remote - # model like OpenAI, Mistral, Antrophic of others (https://python.langchain.com/docs/integrations/llms/) - # - # Examples: - # llm=ollama_llm # was defined above in the file - # llm=ChatOpenAI(model_name="gpt-3.5", temperature=0.7) -) -writer = Agent( - role='Tech Content Strategist', - goal='Craft compelling content on tech advancements', - backstory="""You are a renowned Content Strategist, known for - your insightful and engaging articles. - You transform complex concepts into compelling narratives.""", - verbose=True, - allow_delegation=True, - # (optional) llm=ollama_llm -) - -# Create tasks for your agents -task1 = Task( - description="""Conduct a comprehensive analysis of the latest advancements in AI in 2024. - Identify key trends, breakthrough technologies, and potential industry impacts. - Your final answer MUST be a full analysis report""", - agent=researcher -) - -task2 = Task( - description="""Using the insights provided, develop an engaging blog - post that highlights the most significant AI advancements. - Your post should be informative yet accessible, catering to a tech-savvy audience. - Make it sound cool, avoid complex words so it doesn't sound like AI. - Your final answer MUST be the full blog post of at least 4 paragraphs.""", - agent=writer -) - -# Instantiate your crew with a sequential process -crew = Crew( - agents=[researcher, writer], - tasks=[task1, task2], - verbose=2, # You can set it to 1 or 2 to different logging levels -) - -# Get your crew to work! -result = crew.kickoff() - -print("######################") -print(result) -``` - -Currently the only supported process is `Process.sequential`, where one task is executed after the other and the outcome of one is passed as extra content into this next. diff --git a/docs/how-to/Creating-a-Crew-and-kick-it-off.md b/docs/how-to/Creating-a-Crew-and-kick-it-off.md index f2c4757d0..f0b4c423f 100644 --- a/docs/how-to/Creating-a-Crew-and-kick-it-off.md +++ b/docs/how-to/Creating-a-Crew-and-kick-it-off.md @@ -4,7 +4,15 @@ description: A step-by-step guide to creating a cohesive CrewAI team for your pr --- ## Introduction -Assembling a crew in CrewAI is akin to casting for a play, where each agent plays a unique role. This guide walks you through creating a crew, assigning roles and tasks, and activating them to work in harmony. +Embarking on your CrewAI journey involves a few straightforward steps to set up your environment and initiate your AI crew. This guide ensures a seamless start. + +## Step 0: Installation +Begin by installing CrewAI and any additional packages required for your project. For instance, the `duckduckgo-search` package is used in this example for enhanced search capabilities. + +```shell +pip install crewai +pip install duckduckgo-search +``` ## Step 1: Assemble Your Agents Begin by defining your agents with distinct roles and backstories. These elements not only add depth but also guide their task execution and interaction within the crew. diff --git a/docs/how-to/Hierarchical.md b/docs/how-to/Hierarchical.md index e6e65c168..525c299b1 100644 --- a/docs/how-to/Hierarchical.md +++ b/docs/how-to/Hierarchical.md @@ -23,7 +23,11 @@ To utilize the hierarchical process, you must define a crew with a designated ma !!! note "Tools on the hierarchical process" For tools when using the hierarchical process, you want to make sure to assign them to the agents instead of the tasks, as the manager will be the one delegating the tasks and the agents will be the ones executing them. +!!! note "Manager LLM" + A manager will be automatically set for the crew, you don't need to define it. You do need to set the `manager_llm` parameter in the crew though. + ```python +from langchain_openai import ChatOpenAI from crewai import Crew, Process, Agent # Define your agents, no need to define a manager @@ -42,6 +46,7 @@ writer = Agent( project_crew = Crew( tasks=[...], # Tasks that that manager will figure out how to complete agents=[researcher, writer], + manager_llm=ChatOpenAI(temperature=0, model="gpt-4"), # The manager's LLM that will be used internally process=Process.hierarchical # Designating the hierarchical approach ) ``` diff --git a/docs/index.md b/docs/index.md index f5dfaad44..221b83956 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,6 +33,21 @@ Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By