Skip to content
AIRepoHub

Multi-agent framework where AI agents take on roles like a software team to turn ideas into code.

AI AgentsPythonMIT license
Stars
71,473
stars
Forks
9.1k
forks
Last push
10 months ago
Activity
Slowing down
MetaGPT: quick start
# Install$ pip install --upgrade metagpt# Create the config file$ metagpt --init-config# Turn a one-line idea into a repo$ metagpt "Create a 2048 game"

Commands from the project's README. Run them after installing (see below).

Overview

Understand MetaGPT in 60 seconds

What it does
MetaGPT is a multi-agent framework that simulates a software company. Give it a one-line requirement and AI agents in roles like product manager, architect, project manager and engineer produce user stories, requirements, designs, APIs, documents and code.
The problem it solves
A single prompt to a language model rarely produces a well-structured project. MetaGPT assigns different roles to separate agents and has them follow standard operating procedures, so the output resembles what a small software team would produce.
Why choose it
Choose it to explore role-based multi-agent workflows with an established, research-backed framework. It needs Python 3.9 to 3.11 and an LLM API key.
Who should use it
  • Developers experimenting with multi-agent systems
  • Researchers studying agent collaboration
  • Builders prototyping apps from short descriptions
  • Data analysts trying the Data Interpreter agent
Setup difficulty

You'll need:

  • Python 3.9 or later, but below 3.12
  • Node.js and pnpm
  • An LLM API key (OpenAI, Azure, Ollama, Groq and others)

How MetaGPT works

MetaGPT's core idea is Code = SOP(Team): it turns standard operating procedures into prompts for a team of LLM agents. From one requirement it outputs user stories, competitive analysis, requirements, data structures, APIs and documents, and writes the code into a workspace folder.

You can use it from the command line, such as metagpt "Create a 2048 game", or as a Python library with generate_repo. It also includes the Data Interpreter, an agent that writes and runs code for tasks like analysing a dataset and plotting results.

Configuration lives in ~/.metagpt/config2.yaml, where you set the LLM API type, model, base URL and key. The team behind it also publishes research such as AFlow (an ICLR 2025 oral paper) and launched a commercial product, MGX.

Features

Key features

Software company simulation

Product manager, architect, project manager and engineer agents.

One-line requirement

Generates stories, designs, APIs and code.

SOP-driven

Agents follow standard operating procedures.

Data Interpreter

An agent that writes and runs analysis code.

Python library

generate_repo and roles you can extend.

Many LLM backends

OpenAI, Azure, Ollama, Groq and more.

Strengths

  • Pioneering, widely cited multi-agent framework
  • Structured outputs beyond just code
  • Usable from CLI or Python
  • MIT licensed

Limitations

  • Requires Python below 3.12
  • Generated projects still need review and fixes
  • LLM costs grow with multiple agents

Practical use cases

Prototype an app

Generate a small game or tool from one sentence.

Requirements drafting

Get user stories and API designs for an idea.

Data analysis

Use the Data Interpreter on a dataset.

Installation

Install MetaGPT

Based on official documentation

Commands come from MetaGPT's README. AIRepoHub hasn't run them yet. View source

Prerequisites

  • Python 3.9–3.11
  • Node.js and pnpm
  • An LLM API key

Supported systems

  • Windows
  • macOS
  • Linux
  1. 1

    Create an environment (optional)

    Shell
    conda create -n metagpt python=3.9 && conda activate metagpt
  2. 2

    Install MetaGPT

    Shell
    pip install --upgrade metagpt
  3. 3

    Create the config

    Then edit ~/.metagpt/config2.yaml with your API type, model, base URL and key.

    Shell
    metagpt --init-config
  1. 1

    Clone and install

    Shell
    git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .

Configuration and API keys

SettingWhat it's for

First run

  1. 1

    Generate a project

    Creates a repo in ./workspace.

    Shell
    metagpt "Create a 2048 game"

MetaGPT's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.

Your first project

Generate a small game with a team of AI agents

Turn a one-line requirement into a project.

Before you start

  • MetaGPT installed
  • Node.js and pnpm
  • An LLM key in ~/.metagpt/config2.yaml
  1. 1

    Run MetaGPT

    Shell
    metagpt "Create a 2048 game"
  2. 2

    Open ./workspace

    Review the requirements, design documents and code the agents produced.

  3. 3

    Or call it from Python

    Text
    from metagpt.software_company import generate_reporepo = generate_repo("Create a 2048 game")print(repo)

What to expect

A new project folder in ./workspace with documents and code written by the agent team.

Next steps

  • Try the Data Interpreter on the Iris dataset
  • Read the docs to build your own agents
  • Try the Hugging Face Space demo

Costs and requirements

What it costs to run

License
MIT.Free
Software
Free and open source.Free
LLM API
Several agents call your model provider, billed per use.Paid

Troubleshooting

Common setup issues

Install fails

Check Python is 3.9 or later but below 3.12.

Source: README.md

Errors during generation

Install Node.js and pnpm before using MetaGPT.

Source: README.md

Authentication errors

Set api_type, model, base_url and api_key in ~/.metagpt/config2.yaml.

Source: README.md

Alternatives

Similar AI repositories