From c642ebf97e4a7fd4e1290d3a5c7a582b66b80344 Mon Sep 17 00:00:00 2001 From: Tony Kipkemboi Date: Wed, 22 Jan 2025 10:30:16 -0500 Subject: [PATCH] docs: improve formatting and clarity in CLI and Composio Tool docs (#1946) * docs: improve formatting and clarity in CLI and Composio Tool docs - Add Terminal label to shell code blocks in CLI docs - Update Composio Tool title and fix tip formatting * docs: improve installation guide with virtual environment details - Update Python version requirements and commands - Add detailed virtual environment setup instructions - Clarify project-specific environment activation steps - Streamline additional tools installation with UV * docs: simplify installation guide - Remove redundant virtual environment instructions - Simplify project creation steps - Update UV package manager description --- docs/concepts/cli.mdx | 34 ++++++++++----------- docs/installation.mdx | 60 +++++++++++++++++++++++++++++++++---- docs/tools/composiotool.mdx | 5 ++-- 3 files changed, 75 insertions(+), 24 deletions(-) diff --git a/docs/concepts/cli.mdx b/docs/concepts/cli.mdx index 19482e428..4c9f617ba 100644 --- a/docs/concepts/cli.mdx +++ b/docs/concepts/cli.mdx @@ -12,7 +12,7 @@ The CrewAI CLI provides a set of commands to interact with CrewAI, allowing you To use the CrewAI CLI, make sure you have CrewAI installed: -```shell +```shell Terminal pip install crewai ``` @@ -20,7 +20,7 @@ pip install crewai The basic structure of a CrewAI CLI command is: -```shell +```shell Terminal crewai [COMMAND] [OPTIONS] [ARGUMENTS] ``` @@ -30,7 +30,7 @@ crewai [COMMAND] [OPTIONS] [ARGUMENTS] Create a new crew or flow. -```shell +```shell Terminal crewai create [OPTIONS] TYPE NAME ``` @@ -38,7 +38,7 @@ crewai create [OPTIONS] TYPE NAME - `NAME`: Name of the crew or flow Example: -```shell +```shell Terminal crewai create crew my_new_crew crewai create flow my_new_flow ``` @@ -47,14 +47,14 @@ crewai create flow my_new_flow Show the installed version of CrewAI. -```shell +```shell Terminal crewai version [OPTIONS] ``` - `--tools`: (Optional) Show the installed version of CrewAI tools Example: -```shell +```shell Terminal crewai version crewai version --tools ``` @@ -63,7 +63,7 @@ crewai version --tools Train the crew for a specified number of iterations. -```shell +```shell Terminal crewai train [OPTIONS] ``` @@ -71,7 +71,7 @@ crewai train [OPTIONS] - `-f, --filename TEXT`: Path to a custom file for training (default: "trained_agents_data.pkl") Example: -```shell +```shell Terminal crewai train -n 10 -f my_training_data.pkl ``` @@ -79,14 +79,14 @@ crewai train -n 10 -f my_training_data.pkl Replay the crew execution from a specific task. -```shell +```shell Terminal crewai replay [OPTIONS] ``` - `-t, --task_id TEXT`: Replay the crew from this task ID, including all subsequent tasks Example: -```shell +```shell Terminal crewai replay -t task_123456 ``` @@ -94,7 +94,7 @@ crewai replay -t task_123456 Retrieve your latest crew.kickoff() task outputs. -```shell +```shell Terminal crewai log-tasks-outputs ``` @@ -102,7 +102,7 @@ crewai log-tasks-outputs Reset the crew memories (long, short, entity, latest_crew_kickoff_outputs). -```shell +```shell Terminal crewai reset-memories [OPTIONS] ``` @@ -113,7 +113,7 @@ crewai reset-memories [OPTIONS] - `-a, --all`: Reset ALL memories Example: -```shell +```shell Terminal crewai reset-memories --long --short crewai reset-memories --all ``` @@ -122,7 +122,7 @@ crewai reset-memories --all Test the crew and evaluate the results. -```shell +```shell Terminal crewai test [OPTIONS] ``` @@ -130,7 +130,7 @@ crewai test [OPTIONS] - `-m, --model TEXT`: LLM Model to run the tests on the Crew (default: "gpt-4o-mini") Example: -```shell +```shell Terminal crewai test -n 5 -m gpt-3.5-turbo ``` @@ -138,7 +138,7 @@ crewai test -n 5 -m gpt-3.5-turbo Run the crew. -```shell +```shell Terminal crewai run ``` @@ -153,7 +153,7 @@ Starting in version `0.98.0`, when you run the `crewai chat` command, you start After receiving the results, you can continue interacting with the assistant for further instructions or questions. -```shell +```shell Terminal crewai chat ``` diff --git a/docs/installation.mdx b/docs/installation.mdx index c98bce9ef..d629c4c80 100644 --- a/docs/installation.mdx +++ b/docs/installation.mdx @@ -15,10 +15,48 @@ icon: wrench If you need to update Python, visit [python.org/downloads](https://python.org/downloads) +# Setting Up Your Environment + +Before installing CrewAI, it's recommended to set up a virtual environment. This helps isolate your project dependencies and avoid conflicts. + + + + Choose your preferred method to create a virtual environment: + + **Using venv (Python's built-in tool):** + ```shell Terminal + python3 -m venv .venv + ``` + + **Using conda:** + ```shell Terminal + conda create -n crewai-env python=3.12 + ``` + + + + Activate your virtual environment based on your platform: + + **On macOS/Linux (venv):** + ```shell Terminal + source .venv/bin/activate + ``` + + **On Windows (venv):** + ```shell Terminal + .venv\Scripts\activate + ``` + + **Using conda (all platforms):** + ```shell Terminal + conda activate crewai-env + ``` + + + # Installing CrewAI -CrewAI is a flexible and powerful AI framework that enables you to create and manage AI agents, tools, and tasks efficiently. -Let's get you set up! 🚀 +Now let's get you set up! 🚀 @@ -72,9 +110,9 @@ Let's get you set up! 🚀 # Creating a New Project - + We recommend using the YAML Template scaffolding for a structured approach to defining agents and tasks. - + @@ -101,10 +139,22 @@ Let's get you set up! 🚀 │ └── __init__.py └── config/ ├── agents.yaml + ├── config.yaml └── tasks.yaml ``` - + + + + You can install additional tools using UV: + ```shell Terminal + uv add + ``` + + + UV is our preferred package manager as it's significantly faster than pip and provides better dependency resolution. + + Your project will contain these essential files: diff --git a/docs/tools/composiotool.mdx b/docs/tools/composiotool.mdx index 244a5b657..b72e09dcd 100644 --- a/docs/tools/composiotool.mdx +++ b/docs/tools/composiotool.mdx @@ -1,5 +1,5 @@ --- -title: Composio +title: Composio Tool description: Composio provides 250+ production-ready tools for AI agents with flexible authentication management. icon: gear-code --- @@ -75,7 +75,8 @@ filtered_action_enums = toolset.find_actions_by_use_case( ) tools = toolset.get_tools(actions=filtered_action_enums) -```Set `advanced` to True to get actions for complex use cases +``` +Set `advanced` to True to get actions for complex use cases - Using specific tools: