diff --git a/README.md b/README.md index 01e08821e..b4782f418 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,7 @@ pip install dist/*.tar.gz CrewAI uses anonymous telemetry to collect usage data with the main purpose of helping us improve the library by focusing our efforts on the most used features, integrations and tools. -There is NO data being collected on the prompts, tasks descriptions agents backstories or goals nor tools usage, no API calls, nor responses nor any data that is being processed by the agents, nor any secrets and env vars. +It's pivotal to understand that **NO data is collected** concerning prompts, task descriptions, agents' backstories or goals, usage of tools, API calls, responses, any data processed by the agents, or secrets and environment variables, with the exception of the conditions mentioned. When the `share_crew` feature is enabled, detailed data including task descriptions, agents' backstories or goals, and other specific attributes are collected to provide deeper insights while respecting user privacy. We don't offer a way to disable it now, but we will in the future. Data collected includes: @@ -279,7 +279,7 @@ Data collected includes: - Tools names available - Understand out of the publically available tools, which ones are being used the most so we can improve them -Users can opt-in sharing the complete telemetry data by setting the `share_crew` attribute to `True` on their Crews. +Users can opt-in to Further Telemetry, sharing the complete telemetry data by setting the `share_crew` attribute to `True` on their Crews. Enabling `share_crew` results in the collection of detailed crew and task execution data, including `goal`, `backstory`, `context`, and `output` of tasks. This enables a deeper insight into usage patterns while respecting the user's choice to share. ## License diff --git a/docs/core-concepts/Agents.md b/docs/core-concepts/Agents.md index bb054f8b9..7b93fdde7 100644 --- a/docs/core-concepts/Agents.md +++ b/docs/core-concepts/Agents.md @@ -114,7 +114,7 @@ from langchain.agents import load_tools langchain_tools = load_tools(["google-serper"], llm=llm) agent1 = CustomAgent( - role="backstory agent", + role="agent role", goal="who is {input}?", backstory="agent backstory", verbose=True, @@ -127,7 +127,7 @@ task1 = Task( ) agent2 = Agent( - role="bio agent", + role="agent role", goal="summarize the short bio for {input} and if needed do more research", backstory="agent backstory", verbose=True, diff --git a/docs/core-concepts/Crews.md b/docs/core-concepts/Crews.md index 62c3da657..56cd2a19d 100644 --- a/docs/core-concepts/Crews.md +++ b/docs/core-concepts/Crews.md @@ -137,7 +137,7 @@ crew = Crew( verbose=2 ) -result = crew.kickoff() +crew_output = crew.kickoff() # Accessing the crew output print(f"Raw Output: {crew_output.raw}") diff --git a/docs/how-to/Installing-CrewAI.md b/docs/getting-started/Installing-CrewAI.md similarity index 91% rename from docs/how-to/Installing-CrewAI.md rename to docs/getting-started/Installing-CrewAI.md index 5a347df32..8bf58ee01 100644 --- a/docs/how-to/Installing-CrewAI.md +++ b/docs/getting-started/Installing-CrewAI.md @@ -18,4 +18,7 @@ pip install crewai # Install the main crewAI package and the tools package # that includes a series of helpful tools for your agents pip install 'crewai[tools]' + +# Alternatively, you can also use: +pip install crewai crewai-tools ``` \ No newline at end of file diff --git a/docs/how-to/Start-a-New-CrewAI-Project.md b/docs/getting-started/Start-a-New-CrewAI-Project-Template-Method.md similarity index 65% rename from docs/how-to/Start-a-New-CrewAI-Project.md rename to docs/getting-started/Start-a-New-CrewAI-Project-Template-Method.md index 9fb5cb63c..71b0129c3 100644 --- a/docs/how-to/Start-a-New-CrewAI-Project.md +++ b/docs/getting-started/Start-a-New-CrewAI-Project-Template-Method.md @@ -1,5 +1,5 @@ --- -title: Starting a New CrewAI Project +title: Starting a New CrewAI Project - Using Template description: A comprehensive guide to starting a new CrewAI project, including the latest updates and project setup methods. --- @@ -7,13 +7,62 @@ description: A comprehensive guide to starting a new CrewAI project, including t Welcome to the ultimate guide for starting a new CrewAI project. This document will walk you through the steps to create, customize, and run your CrewAI project, ensuring you have everything you need to get started. +Beforre we start there are a couple of things to note: + +1. CrewAI is a Python package and requires Python >=3.10 and <=3.13 to run. +2. The preferred way of setting up CrewAI is using the `crewai create` command.This will create a new project folder and install a skeleton template for you to work on. + ## Prerequisites -We assume you have already installed CrewAI. If not, please refer to the [installation guide](https://docs.crewai.com/how-to/Installing-CrewAI/) to install CrewAI and its dependencies. +Before getting started with CrewAI, make sure that you have installed it via pip: + +```shell +$ pip install crewai crewai-tools +``` + +### Virtual Environemnts +It is highly recommended that you use virtual environments to ensure that your CrewAI project is isolated from other projects and dependencies. Virtual environments provide a clean, separate workspace for each project, preventing conflicts between different versions of packages and libraries. This isolation is crucial for maintaining consistency and reproducibility in your development process. You have multiple options for setting up virtual environments depending on your operating system and Python version: + +1. Use venv (Python's built-in virtual environment tool): + venv is included with Python 3.3 and later, making it a convenient choice for many developers. It's lightweight and easy to use, perfect for simple project setups. + + To set up virtual environments with venv, refer to the official [Python documentation](https://docs.python.org/3/tutorial/venv.html). + +2. Use Conda (A Python virtual environment manager): + Conda is an open-source package manager and environment management system for Python. It's widely used by data scientists, developers, and researchers to manage dependencies and environments in a reproducible way. + + To set up virtual environments with Conda, refer to the official [Conda documentation](https://docs.conda.io/projects/conda/en/stable/user-guide/getting-started.html). + +3. Use Poetry (A Python package manager and dependency management tool): + Poetry is an open-source Python package manager that simplifies the installation of packages and their dependencies. Poetry offers a convenient way to manage virtual environments and dependencies. + Poetry is CrewAI's prefered tool for package / dependancy management in CrewAI. + +### Code IDEs + +Most users of CrewAI a Code Editor / Integrated Development Environment (IDE) for building there Crews. You can use any code IDE of your choice. Seee below for some popular options for Code Editors / Integrated Development Environments (IDE): + +- [Visual Studio Code](https://code.visualstudio.com/) - Most popular +- [PyCharm](https://www.jetbrains.com/pycharm/) +- [Cursor AI](https://cursor.com) + +Pick one that suits your style and needs. ## Creating a New Project +In this example we will be using Venv as our virtual environment manager. -To create a new project, run the following CLI command: +To setup a virtual environment, run the following CLI command: + +```shell +$ python3 -m venv +``` + +Activate your virtual environment by running the following CLI command: + +```shell +$ source /bin/activate +``` + +Now, to create a new CrewAI project, run the following CLI command: ```shell $ crewai create 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 deleted file mode 100644 index 7200d75d4..000000000 --- a/docs/how-to/Creating-a-Crew-and-kick-it-off.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Assembling and Activating Your CrewAI Team -description: A comprehensive guide to creating a dynamic CrewAI team for your projects, with updated functionalities including verbose mode, memory capabilities, asynchronous execution, output customization, language model configuration, code execution, integration with third-party agents, and improved task management. ---- - -## Introduction -Embark on your CrewAI journey by setting up your environment and initiating your AI crew with the latest features. This guide ensures a smooth start, incorporating all recent updates for an enhanced experience, including code execution capabilities, integration with third-party agents, and advanced task management. - -## Step 0: Installation -Install CrewAI and any necessary packages for your project. CrewAI is compatible with Python >=3.10,<=3.13. - -```shell -pip install crewai -pip install 'crewai[tools]' -``` - -## Step 1: Assemble Your Agents -Define your agents with distinct roles, backstories, and enhanced capabilities. The Agent class now supports a wide range of attributes for fine-tuned control over agent behavior and interactions, including code execution and integration with third-party agents. - -```python -import os -from langchain.llms import OpenAI -from crewai import Agent -from crewai_tools import SerperDevTool, BrowserbaseLoadTool, EXASearchTool - -os.environ["OPENAI_API_KEY"] = "Your OpenAI Key" -os.environ["SERPER_API_KEY"] = "Your Serper Key" -os.environ["BROWSERBASE_API_KEY"] = "Your BrowserBase Key" -os.environ["BROWSERBASE_PROJECT_ID"] = "Your BrowserBase Project Id" - -search_tool = SerperDevTool() -browser_tool = BrowserbaseLoadTool() -exa_search_tool = EXASearchTool() - -# Creating a senior researcher agent with advanced configurations -researcher = Agent( - role='Senior Researcher', - goal='Uncover groundbreaking technologies in {topic}', - backstory=("Driven by curiosity, you're at the forefront of innovation, " - "eager to explore and share knowledge that could change the world."), - memory=True, - verbose=True, - allow_delegation=False, - tools=[search_tool, browser_tool], - allow_code_execution=False, # New attribute for enabling code execution - max_iter=15, # Maximum number of iterations for task execution - max_rpm=100, # Maximum requests per minute - max_execution_time=3600, # Maximum execution time in seconds - system_template="Your custom system template here", # Custom system template - prompt_template="Your custom prompt template here", # Custom prompt template - response_template="Your custom response template here", # Custom response template -) - -# Creating a writer agent with custom tools and specific configurations -writer = Agent( - role='Writer', - goal='Narrate compelling tech stories about {topic}', - backstory=("With a flair for simplifying complex topics, you craft engaging " - "narratives that captivate and educate, bringing new discoveries to light."), - verbose=True, - allow_delegation=False, - memory=True, - tools=[exa_search_tool], - function_calling_llm=OpenAI(model_name="gpt-3.5-turbo"), # Separate LLM for function calling -) - -# Setting a specific manager agent -manager = Agent( - role='Manager', - goal='Ensure the smooth operation and coordination of the team', - verbose=True, - backstory=( - "As a seasoned project manager, you excel in organizing " - "tasks, managing timelines, and ensuring the team stays on track." - ), - allow_code_execution=True, # Enable code execution for the manager -) -``` - -### New Agent Attributes and Features - -1. `allow_code_execution`: Enable or disable code execution capabilities for the agent (default is False). -2. `max_execution_time`: Set a maximum execution time (in seconds) for the agent to complete a task. -3. `function_calling_llm`: Specify a separate language model for function calling. \ No newline at end of file diff --git a/docs/how-to/Force-Tool-Ouput-as-Result.md b/docs/how-to/Force-Tool-Ouput-as-Result.md index c40d0af29..15c60f80b 100644 --- a/docs/how-to/Force-Tool-Ouput-as-Result.md +++ b/docs/how-to/Force-Tool-Ouput-as-Result.md @@ -7,7 +7,7 @@ description: Learn how to force tool output as the result in of an Agent's task In CrewAI, you can force the output of a tool as the result of an agent's task. This feature is useful when you want to ensure that the tool output is captured and returned as the task result, and avoid the agent modifying the output during the task execution. ## Forcing Tool Output as Result -To force the tool output as the result of an agent's task, you can set the `force_tool_output` parameter to `True` when creating the task. This parameter ensures that the tool output is captured and returned as the task result, without any modifications by the agent. +To force the tool output as the result of an agent's task, you can set the `result_as_answer` parameter to `True` when creating the agent. This parameter ensures that the tool output is captured and returned as the task result, without any modifications by the agent. Here's an example of how to force the tool output as the result of an agent's task: diff --git a/docs/index.md b/docs/index.md index 77cdd9852..54dfd59aa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,6 +5,19 @@ Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
+
+

Getting Started

+ +

Core Concepts