crewai
v1.0.1
Published
JavaScript implementation of the Crew AI Framework
Downloads
198
Readme
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
Table of contents
- Why CrewAI?
- Getting Started
- Key Features
- CLI Commands
- Examples
- Connecting Your Crew to a Model
- How CrewAI Compares
- Contribution
- Telemetry
- License
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:
Create a new crew or pipeline:
crewai create <type> <name> [--router]
Train the crew:
crewai train [-n <iterations>] [-f <filename>]
Reset memories:
crewai reset-memories [-l] [-s] [-e] [-k] [-a]
Run the crew:
crewai run
Replay a task:
crewai replay <task_id>
For more details on each command, use crewai <command> --help
.