Skip to content

JennyMa11/agentflow

🤖 AgentFlow

Modular multi-agent collaboration platform — Agent.md-driven agents, skill package manager, YAML workflow engine.

模块化多 Agent 协作平台 — 让每个 Agent 成为独立个体,通过 Skill 扩展能力,通过 Workflow 定义协作

Python 3.10+ License: MIT CI


✨ Features / 特性

  • 🧩 Modular design — Agent, Skill, and Workflow are independent, composable modules
  • 📝 Agent.md driven — Each agent defined by a Markdown file (persona, skills, collaboration)
  • 📦 Package manager — Install skills from local, URL, Git, or npm
  • 🔄 Workflow engine — YAML-defined multi-agent collaboration flows
  • 🌐 Web GUI — Dark theme UI with real-time pipeline visualization
  • 🛠️ CLI — Full command-line interface for agent, skill, and workflow management
  • 🐳 Docker ready — One-command deployment with Docker Compose

🚀 Quick Start / 快速开始

Prerequisites / 前置条件

  • Python 3.10+
  • An OpenAI-compatible API key (OpenAI, Xiaomi MiMo, etc.)

Option 1: pip install

git clone https://github.com/JennyMa11/agentflow.git
cd agentflow
pip install -e .

Option 2: Docker

git clone https://github.com/JennyMa11/agentflow.git
cd agentflow
docker compose up

Run / 启动

# Start the web server
agentflow run

# Or specify port
agentflow run --port 9000

Visit http://localhost:8765

CLI Usage / 命令行

# Agent management
agentflow agent list
agentflow agent info brain
agentflow agent create my_agent --role worker --icon "🔧"

# Skill management
agentflow skill list
agentflow skill create my_skill
agentflow skill install ./skills/my_skill --agent coder

# Workflow management
agentflow workflow list
agentflow workflow run default_pipeline -d "Implement a calculator"

📁 Project Structure / 项目结构

agentflow/
├── agentflow/                   # Core engine / 核心引擎
│   ├── agent.py                 # LLM runtime + tool loop
│   ├── agent_loader.py          # Agent.md parser
│   ├── cli.py                   # Unified CLI entry point
│   ├── config.py                # Configuration system
│   ├── models.py                # Data models (Message, Task, Session, ...)
│   ├── package_manager.py       # Skill package manager
│   ├── pipeline.py              # Multi-agent pipeline engine
│   ├── session.py               # Session persistence
│   ├── skill_loader.py          # Skill tool loader
│   ├── skill_manager.py         # Skill CRUD operations
│   ├── workflow_engine.py       # YAML workflow engine
│   └── workspace.py             # File ops & shell commands
│
├── agents/                      # Agent definitions / Agent 定义
│   ├── brain/Agent.md           # 🧠 Orchestrator
│   ├── coder/Agent.md           # 💻 Coder
│   ├── tester/Agent.md          # 🧪 Tester
│   ├── reviewer/Agent.md        # 🔍 Reviewer
│   ├── debater/Agent.md         # ⚔️ Debater
│   └── researcher/Agent.md      # 📚 Researcher
│
├── skills/                      # Skill packages / 技能包
│   ├── code_review/
│   ├── security_scan/
│   └── tdd/
│
├── workflows/                   # Workflow definitions / 工作流
│   └── default_pipeline.yaml
│
├── web/                         # Web GUI / Web 界面
│   ├── server.py
│   └── static/index.html
│
├── tests/                       # Test suite / 测试套件
├── Dockerfile
├── docker-compose.yml
├── agentflow.yaml.example       # Config template
└── pyproject.toml

🧠 Agent System / Agent 系统

Each Agent is a directory with an Agent.md:

# Agent: Coder

## Identity
- id: coder
- name: 代码工匠
- icon: 💻
- role: worker

## Model
- provider: xiaomi
- model: mimo-v2.5-pro
- temperature: 0.3

## System Prompt

You are Coder, a senior software engineer.

## Skills
- tdd
- code_generation@1.2.0

## Collaboration

### Can Call
- tester: "写完代码后请Tester测试"

### Can Be Called By
- brain: "Brain分配编码任务给我"

Built-in Agents

Agent Role Description
🧠 Brain orchestrator Task planning & decomposition
💻 Coder worker Code implementation
🧪 Tester worker Test writing
🔍 Reviewer worker Code review
⚔️ Debater worker Solution debate
📚 Researcher worker Technical research

📦 Skill System / 技能系统

# Install from local
agentflow skill install ./my_skill/

# Install from URL
agentflow skill install https://example.com/skill.zip

# Install from Git
agentflow skill install github:agentflow-skills/tdd

# Install to specific agent
agentflow skill install ./skills/tdd --agent coder

⚙️ Configuration / 配置

AgentFlow loads config from multiple sources (priority: env > project > user > defaults):

# agentflow.yaml (project root)
default_provider: openai
default_model: gpt-4
server:
  port: 8765

Environment variables:

export AGENTFLOW_PORT=9000
export AGENTFLOW_DEFAULT_MODEL=gpt-4-turbo
export AGENTFLOW_LOG_LEVEL=DEBUG

See agentflow.yaml.example for all options.


🛠️ Development / 开发

# Setup
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check agentflow/ tests/

# Type check
mypy agentflow/

See CONTRIBUTING.md for detailed guidelines.


📄 License

MIT License — see LICENSE


🙏 Acknowledgements

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors