Cooragent: An Open-Source AI Agent Collaboration Community — Create Agents with One Sentence 46

小编 ·

Cooragent: An Open-Source AI Agent Collaboration Community — Create Agents with One Sentence

Cooragent is a tool that lets you create an agent with just one sentence and supports collaboration with other agents to handle complex tasks, while being compatible with the MCP protocol. It features two working modes:

Cooragent: An Open-Source AI Agent Collaboration Community — Create Agents with One Sentence

What is Cooragent?

Cooragent is a tool that allows you to create an AI agent with just a single sentence. It also supports collaboration with other agents to complete complex tasks and is compatible with the MCP protocol. It offers two working modes:

Agent Factory: Users only need to describe their requirements, and Cooragent will automatically analyze them. Through memory and extension, it deeply understands user intent, selects appropriate tools, automatically optimizes prompts, and gradually builds the agent.

Agent Workflow: Users only need to describe the target task, and Cooragent will automatically analyze the task requirements and select suitable agents for collaboration.

In addition, Cooragent also provides a CLI tool that supports quickly creating, editing, and deleting agents.

Cooragent: An open-source AI agent collaboration community, create an agent with just one sentence.webp

Cooragent Features

Agent Factory

  • Automated Building: Users only need to describe the agent's requirements, and the system will automatically analyze and generate the corresponding agent.

  • Automatic Tool Selection: The Planner selects appropriate tools based on user needs.

  • Automatic Prompt Optimization: Automatically refines prompts to gradually complete the agent's construction.

  • Editability: After construction is complete, users can still edit and optimize the agent.

Agent Workflow

  • Task Analysis: After the user describes the target task, the system automatically analyzes the task requirements.

  • Agent Selection: Select appropriate agents for collaboration based on task requirements.

  • Task Planning: The planner combines agents based on their specialties, planning task steps and completion order.

  • Task Distribution: Distribute tasks to the publish module for task publishing, with each agent collaborating to complete the tasks.

Cooragent Use Cases

  • Stock Analysis: Create agents to analyze stock trends, hot news, and predict stock prices.

  • Travel Planning: Use multiple agents to collaboratively plan travel itineraries, generate reports, and save them as PDFs.

  • Enterprise-level Applications: Support cross-department collaboration, such as an HR agent automatically syncing attendance data with the finance system.

Cooragent: An open-source AI agent collaboration community, create an agent with just one sentence.webp

Cooragent Installation

The project supports installation using both conda and venv:

Install using conda

git clone https://github.com/LeapLabTHU/cooragent.git
cd cooragent
conda create -n cooragent python=3.12
conda activate cooragent
pip install -e .
# Optional: if you need to use the browser tool
playwright install
# Configure the environment
cp .env.example .env
# Edit the .env file and fill in the API keys
python cli.py

Install using venv

git clone https://github.com/LeapLabTHU/cooragent.git
cd cooragent
uv python install 3.12
uv venv --python 3.12
source .venv/bin/activate   # For Windows: .venv\Scripts\activate
uv sync
# Optional: if you need to use the browser tool
playwright install
# Configure the environment
cp .env.example .env
# Edit the .env file and fill in the API keys
# Run the project
uv run cli.py

Configuration

Create a .env file in the project root directory and configure the following environment variables:

# Note: The browser tool has a long wait time and is disabled by default. You can enable it by setting `USE_BROWSER=True`
cp .env.example .env

By providing Agent Factory and Agent Workflow modes, cooragent offers users a powerful and practical agent collaboration platform. Whether you are a developer or an ordinary user, you can easily create and manage agents through this project to achieve collaborative completion of complex tasks.

Github: https://github.com/LeapLabTHU/cooragent