Overview
MetaGPT is an open-source framework that models a software company as a team of LLM-based agents. You give it a one-line requirement, and it runs the request through roles such as product manager, architect, project manager, and engineer to produce user stories, requirements, data structures, APIs, design docs, and code.
It is aimed at developers and researchers who want to experiment with multi-agent collaboration rather than driving a single LLM call by hand. Its core idea is `Code = SOP(Team)`: standard operating procedures are encoded so each agent knows what to hand off to the next, which keeps the workflow structured.
Within the agent-frameworks space, MetaGPT sits in the multi-agent category. It can generate a whole project from a prompt, but it also exposes building blocks like the Data Interpreter and individual roles so you can assemble your own agents and workflows.
What it does
- Turns a single one-line requirement into a generated repo placed under ./workspace
- Built-in roles modeled on a software company: product manager, architect, project manager, and engineer
- Outputs intermediate artifacts such as user stories, competitive analysis, requirements, data structures, and APIs
- Works from the CLI or as a Python library via generate_repo and ProjectRepo
- Data Interpreter role for running data-analysis tasks and producing plots
- Configurable LLM backend (OpenAI, Azure, Ollama, Groq and others) through a single config2.yaml file
Getting started
Install MetaGPT with pip, set up your LLM config, then run it from the CLI or as a library. Requires Python 3.9 or later but below 3.12.
Install MetaGPT
Install or upgrade the package from PyPI. Note: install Node and pnpm before actual use, as the README requires them.
pip install --upgrade metagptInitialize the config
Generate the config file at ~/.metagpt/config2.yaml, then edit it to set your LLM provider, model, and API key.
metagpt --init-configGenerate a project from the CLI
Pass a one-line requirement; MetaGPT creates the resulting repo under ./workspace.
metagpt "Create a 2048 game" # this will create a repo in ./workspaceUse it as a Python library
Call generate_repo to build a project programmatically and inspect the returned ProjectRepo.
from metagpt.software_company import generate_repo
from metagpt.utils.project_repo import ProjectRepo
repo: ProjectRepo = generate_repo("Create a 2048 game")
print(repo) # it will print the repo structure with filesCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Prototype a small app or game from a single sentence and review the generated repo as a starting point
- Study how multi-agent SOPs split a build into PM, architect, and engineer roles for research or teaching
- Run data-analysis tasks with the Data Interpreter role, including generating plots
- Build your own custom agents and multi-agent workflows on top of MetaGPT's roles
How MetaGPT compares
MetaGPT alongside other open-source multi-agent systems tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| MetaGPT | ★ 68.9k | A multi-agent framework that runs an LLM software company from one prompt |
| AutoGen | ★ 59.1k | Microsoft Research's framework for building applications where multiple agents converse with each other and with tools to solve tasks. |
| CrewAI | ★ 54k | A framework for assembling teams ('crews') of role-playing agents that divide tasks and collaborate to complete a goal. |
| OpenAI Agents SDK | ★ 27.3k | OpenAI's lightweight Python SDK for building multi-agent workflows using explicit handoffs, tools, and guardrails. |
| AgentScope | ★ 27k | A framework for building multi-agent applications with message passing, visual debugging tools, and distributed execution. |
| OpenAI Swarm | ★ 21.7k | An educational, lightweight framework from OpenAI for experimenting with multi-agent coordination through handoffs and routines. |
| PentAGI | ★ 17.8k | PentAGI is a self-hosted AI security platform that plans and runs penetration tests autonomously using a team of agents and 20+ built-in pentesting tools. |
| CAMEL | ★ 17.2k | A research-oriented framework for studying and building communicating agents that cooperate through role-playing conversations. |