1.0.1 • Published 10 months ago

crewai v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Logo of crewAI, two people rowing on a boat

crewAI

šŸ¤– crewAI: Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

Homepage | Documentation | Chat with Docs | Examples | Discord

GitHub Repo stars License: MIT

Table of contents

Why CrewAI?

The power of AI collaboration has too much to offer. CrewAI is designed to enable AI agents to assume roles, share goals, and operate in a cohesive unit - much like a well-oiled crew. Whether you're building a smart assistant platform, an automated customer service ensemble, or a multi-agent research team, CrewAI provides the backbone for sophisticated multi-agent interactions.

Getting Started

To get started with CrewAI, follow these simple steps:

1. Installation

npm install crewai

2. Basic Usage

Here's a simple example of how to use CrewAI:

import { Crew, Agent, Task } from 'crewai';

// Create agents
const researcher = new Agent('Researcher', {...});
const writer = new Agent('Writer', {...});

// Create tasks
const researchTask = new Task('Research the topic', {...});
const writeTask = new Task('Write the article', {...});

// Create a crew
const crew = new Crew({
  agents: [researcher, writer],
  tasks: [researchTask, writeTask],
});

// Run the crew
const result = crew.run();
console.log(result);

CLI Commands

CrewAI comes with a set of CLI commands to help you manage your crew:

  1. Create a new crew or pipeline:

    crewai create <type> <name> [--router]
  2. Train the crew:

    crewai train [-n <iterations>] [-f <filename>]
  3. Reset memories:

    crewai reset-memories [-l] [-s] [-e] [-k] [-a]
  4. Run the crew:

    crewai run
  5. Replay a task:

    crewai replay <task_id>

For more details on each command, use crewai <command> --help.