Skip to content

Commit

Permalink
Merge branch 'main' into devin/1737481336-fix-task-evaluator-keyerror
Browse files Browse the repository at this point in the history
  • Loading branch information
bhancockio authored Jan 22, 2025
2 parents ea12543 + c642ebf commit f2d3d03
Show file tree
Hide file tree
Showing 137 changed files with 17,156 additions and 38,236 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ crew_tasks_output.json
.mypy_cache
.ruff_cache
.venv
agentops.log
175 changes: 163 additions & 12 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/concepts/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ from crewai_tools import SerperDevTool
class LatestAiDevelopmentCrew():
"""LatestAiDevelopment crew"""
agents_config = "config/agents.yaml"
@agent
def researcher(self) -> Agent:
return Agent(
Expand Down
64 changes: 47 additions & 17 deletions docs/concepts/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ 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
```

## Basic Usage

The basic structure of a CrewAI CLI command is:

```shell
```shell Terminal
crewai [COMMAND] [OPTIONS] [ARGUMENTS]
```

Expand All @@ -30,15 +30,15 @@ crewai [COMMAND] [OPTIONS] [ARGUMENTS]

Create a new crew or flow.

```shell
```shell Terminal
crewai create [OPTIONS] TYPE NAME
```

- `TYPE`: Choose between "crew" or "flow"
- `NAME`: Name of the crew or flow

Example:
```shell
```shell Terminal
crewai create crew my_new_crew
crewai create flow my_new_flow
```
Expand All @@ -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
```
Expand All @@ -63,46 +63,46 @@ crewai version --tools

Train the crew for a specified number of iterations.

```shell
```shell Terminal
crewai train [OPTIONS]
```

- `-n, --n_iterations INTEGER`: Number of iterations to train the crew (default: 5)
- `-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
```

### 4. Replay

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
```

### 5. Log-tasks-outputs

Retrieve your latest crew.kickoff() task outputs.

```shell
```shell Terminal
crewai log-tasks-outputs
```

### 6. Reset-memories

Reset the crew memories (long, short, entity, latest_crew_kickoff_outputs).

```shell
```shell Terminal
crewai reset-memories [OPTIONS]
```

Expand All @@ -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
```
Expand All @@ -122,23 +122,23 @@ crewai reset-memories --all

Test the crew and evaluate the results.

```shell
```shell Terminal
crewai test [OPTIONS]
```

- `-n, --n_iterations INTEGER`: Number of iterations to test the crew (default: 3)
- `-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
```

### 8. Run

Run the crew.

```shell
```shell Terminal
crewai run
```
<Note>
Expand All @@ -147,7 +147,36 @@ Some commands may require additional configuration or setup within your project
</Note>


### 9. API Keys
### 9. Chat

Starting in version `0.98.0`, when you run the `crewai chat` command, you start an interactive session with your crew. The AI assistant will guide you by asking for necessary inputs to execute the crew. Once all inputs are provided, the crew will execute its tasks.

After receiving the results, you can continue interacting with the assistant for further instructions or questions.

```shell Terminal
crewai chat
```
<Note>
Ensure you execute these commands from your CrewAI project's root directory.
</Note>
<Note>
IMPORTANT: Set the `chat_llm` property in your `crew.py` file to enable this command.

```python
@crew
def crew(self) -> Crew:
return Crew(
agents=self.agents,
tasks=self.tasks,
process=Process.sequential,
verbose=True,
chat_llm="gpt-4o", # LLM for chat orchestration
)
```
</Note>


### 10. API Keys

When running ```crewai create crew``` command, the CLI will first show you the top 5 most common LLM providers and ask you to select one.

Expand All @@ -161,6 +190,7 @@ The CLI will initially prompt for API keys for the following services:
* Groq
* Anthropic
* Google Gemini
* SambaNova

When you select a provider, the CLI will prompt you to enter your API key.

Expand Down
Loading

0 comments on commit f2d3d03

Please sign in to comment.