ChatDev - Multi-Agent Role-Playing Software Development Framework

Vendor: OpenBMB

ChatDev is a virtual software company multi-agent framework by Tsinghua & OpenBMB, orchestrating role-playing agents (CEO, CTO, Programmer, Tester) across waterfall phases to synthesize full software systems from single prompts.

View Repository

Official Preview
ChatDev - Multi-Agent Role-Playing Software Development Framework

Technical Specifications

RepositoryOpenBMB/ChatDev
GitHub Stars★ 34.1k
Forks4.3k forks
Primary LanguagePython
LicenseApache-2.0
Technical DomainAGENTS
4.8Overall
Functionality
4.8
Documentation
4.8
Activity
4.9
Ease of use
4.7

Quickstart & Installation

$ bash git clone https://github.com/OpenBMB/ChatDev.git cd ChatDev pip install -r requirements.txt

Comprehensive Review

ChatDev (OpenBMB/ChatDev) is an open-source multi-agent collaborative software development framework created by Tsinghua University NLP Lab and OpenBMB. ChatDev maps classic software engineering waterfall methodologies onto multi-agent networks, simulating an end-to-end virtual software enterprise operated entirely by LLMs. When a user provides a single high-level natural language prompt (e.g., 'build a Gomoku game with a GUI'), specialized role-playing agents—including CEO, CPO, CTO, Programmer, Tester, and Reviewer—collaborate through multi-turn structured dialogues to execute requirement analysis, architecture design, coding, testing, and documentation.

In terms of multi-agent prompt architecture, ChatDev pioneered 'Communicative De-hallucination'. While standalone agents suffer from error accumulation across long context windows, ChatDev breaks the development lifecycle into discrete 'Chatting Phases'. Within each phase, pairs of complementary agents (such as CTO and Programmer, or Programmer and Tester) engage in structured, task-oriented dialogues. One agent proposes code while the other critically reviews and stress-tests it, systematically filtering out hallucinations through conversational consensus.

From an engineering perspective, ChatDev is highly customizable and modular. Developers can customize company organizational charts, inject specialized roles (such as Security Engineers or UI Designers), and tune communication topologies via declarative JSON/YAML configurations. The framework runs fully autonomously, ultimately packaging executable source code, dependency specifications, visual assets, and comprehensive documentation.

Project Background

ChatDev arose from the realization that monolithic, single-agent architectures hit fundamental ceilings when tackling multi-stage software systems. Early attempts to prompt a single LLM to generate entire applications routinely suffered from severe cognitive decay—starting with coherent plans but devolving into hallucinated logic and broken dependencies. Human engineering succeeds because of division of labor, clear contracts, and peer code review.

Tsinghua University and OpenBMB designed a role-playing conversational multi-agent paradigm inspired by human organizational charts. By decomposing software construction into structured phases—Requirement Analysis (CEO/CPO), Technology Selection (CTO), Implementation (Programmer), and Quality Assurance (Tester)—and enforcing paired 'proposal-critique' dialogues, ChatDev proved that multi-agent consensus significantly outperforms isolated agents on complex generative tasks.

The defining innovation, 'Communicative De-hallucination', introduces adversarial and collaborative dialogue protocols between complementary agents. By having pairs critically review and stress-test code before phase completion, syntactic and logical bugs are systematically excised before propagating downstream.

Core Use Cases

In rapid product prototyping, product teams input concise natural language briefs, and ChatDev synthesizes functional, interactive desktop or web applications (e.g., in Python/Tkinter/Pygame) in minutes.

In computer science and software engineering education, students inspect ChatDev's conversational logs to understand agile collaboration, clean code principles, and testing practices.

In multi-agent systems and social simulation research, ChatDev serves as primary infrastructure for studying communicative topologies, emergent intelligence, and conversational game theory.

In productivity workflow scripting, non-technical knowledge workers generate tailored desktop utilities, data converters, and reporting scripts via plain natural language prompts.

Quickstart Guide

Clone the repository and install core dependencies:

bash
git clone https://github.com/OpenBMB/ChatDev.git
cd ChatDev
pip install -r requirements.txt

Set your OpenAI API Key (Azure OpenAI and custom LiteLLM endpoints also supported):

bash
export OPENAI_API_KEY="your-api-key"

Launch the virtual software company to build a customized Snake game:

bash
python run.py --task "Develop a classic Python Snake game with a scoring system and speed boosts" --name "SnakeGame"

The system orchestrates multi-agent dialogue across DemandAnalysis, Architecture, Coding, Review, and Testing. The final executable software is delivered in WareHouse/SnakeGame_..., runnable immediately via python main.py.

Practicality Assessment

In terms of observability, ChatDev provides an interactive Web Visualizer. Engineers can replay the virtual team's dialogue in a chat-like interface, watching code evolve live step-by-step, providing unprecedented insight into multi-agent decision chains.

Regarding engineering scope, multi-turn dialogues across 5+ agents incur notable token overhead. While current foundation models make ChatDev best suited for small-to-medium utility software, games, and web tools rather than distributed enterprise monoliths, it provides immense value as an ideation and rapid prototyping accelerator for human engineering teams.

In extensibility, developers can customize CompanyConfig files to inject new roles, such as UI/UX Designers or Compliance Reviewers, with bespoke system prompts.

Real-world Deployments

With over 34,000 GitHub stars, ChatDev is one of the most prominent open-source multi-agent frameworks worldwide, cited extensively in academic literature by leading institutions including Stanford, MIT, and Microsoft Research.

The OpenBMB community continues active development, expanding ChatDev with multimodal capabilities and dynamic plugin systems to push the frontiers of collaborative software synthesis.

Core Strengths

  • Simulates a virtual software company fusing classic waterfall engineering with multi-agent role-play
  • Pioneered Communicative De-hallucination using peer dialogue review to eliminate model hallucinations
  • Declarative YAML/JSON configuration for customized organizational structures and workflow phases
  • Autonomous end-to-end delivery of executable software from a single natural language prompt

Considerations & Limitations

  • Requires appropriate GPU memory planning and concurrency tuning for production.

Frequently Asked Questions (FAQ)

What is ChatDev - Multi-Agent Role-Playing Software Development Framework and what key challenges does it solve?

ChatDev - Multi-Agent Role-Playing Software Development Framework is an open-source AI project developed primarily in Python under the Apache-2.0 license. ChatDev is a virtual software company multi-agent framework by Tsinghua & OpenBMB, orchestrating role-playing agents (CEO, CTO, Programmer, Tester) across waterfall phases to synthesize full software systems from single prompts.. ChatDev arose from the realization that monolithic, single-agent architectures hit fundamental ceilings when tackling multi-stage software systems. Early attempts to prompt a single LLM to generate entire applications routinely suffered from severe cognitive decay—starting with coherent plans but devolving into hallucinated logic and broken dependencies. Human engineering succeeds because of division of labor, clear contracts, and peer code review. Tsinghua University and OpenBMB designed a role-playing conversational multi-agent paradigm inspired by human organizational charts. By decomposing software construction into structured phases—Requirement Analysis (CEO/CPO), Technology Selection (CTO), Implementation (Programmer), and Quality Assurance (Tester)—and enforcing paired 'proposal-critique' dialogues, ChatDev proved that multi-agent consensus significantly outperforms isolated agents on complex generative tasks. The defining innovation, 'Communicative De-hallucination', introduces adversarial and collaborative dialogue protocols between complementary agents. By having pairs critically review and stress-test code before phase completion, syntactic and logical bugs are systematically excised before propagating downstream.

How can I quickly install and run ChatDev - Multi-Agent Role-Playing Software Development Framework locally?

Clone the repository and install core dependencies:

bash
git clone https://github.com/OpenBMB/ChatDev.git
cd ChatDev
pip install -r requirements.txt

Set your OpenAI API Key (Azure OpenAI and custom LiteLLM endpoints also supported):

bash
export OPENAI_API_KEY="your-api-key"

Launch the virtual software company to build a customized Snake game:

bash
python run.py --task "Develop a classic Python Snake game with a scoring system and speed boosts" --name "SnakeGame"

The system orchestrates multi-agent dialogue across DemandAnalysis, Architecture, Coding, Review, and Testing. The final executable software is delivered in WareHouse/SnakeGame_..., runnable immediately via python main.py.

What are the main use cases and strengths of ChatDev - Multi-Agent Role-Playing Software Development Framework?

ChatDev - Multi-Agent Role-Playing Software Development Framework is well-suited for Autonomous Software Prototyping, Multi-Agent Collaboration Research, Interactive Game & Tool Synthesis, Enterprise Agile Workflow Simulation. With an overall rating of 4.8/5, it offers strong community activity, reliable performance, and easy integration with existing AI pipelines.

What limitations or architectural considerations should be kept in mind for ChatDev - Multi-Agent Role-Playing Software Development Framework?

In terms of observability, ChatDev provides an interactive Web Visualizer. Engineers can replay the virtual team's dialogue in a chat-like interface, watching code evolve live step-by-step, providing unprecedented insight into multi-agent decision chains. Regarding engineering scope, multi-turn dialogues across 5+ agents incur notable token overhead. While current foundation models make ChatDev best suited for small-to-medium utility software, games, and web tools rather than distributed enterprise monoliths, it provides immense value as an ideation and rapid prototyping accelerator for human engineering teams. In extensibility, developers can customize CompanyConfig files to inject new roles, such as UI/UX Designers or Compliance Reviewers, with bespoke system prompts.