Listen to this article

MetaGPT is easy to understand Multi-agent framework. You give it a short requirement, and it gives you different things like stories, analysis, and documents. Inside, there are different roles like product managers, architects, project managers, and engineers. They work together using clear procedures.

How MetaGPT Used?


Imagine a software team. There are different people doing different jobs:

  • Product Managers: They decide what the project will do.
  • Architects: They plan how the project will be built.
  • Project Managers: They make sure the project stays on track.
  • Engineers: They write the code to make everything work.

MetaGPT uses these roles to create a smooth team that can do many things in software development.

Installation Guide : MetaGPT

Here’s a step-by-step metagpt installation guide.

Traditional Installation:

  1. Check NPM and Install Mermaid-js:
    Ensure you have Node Package Manager (NPM) installed on your system. Confirm by typing:
   npm --version

If NPM is available, proceed to install mermaid-js:

   sudo npm install -g @mermaid-js/mermaid-cli
  1. Verify Python Version:
    Make sure you have Python 3.9 or higher installed:
   python --version
  1. Clone and Install MetaGPT:
    Clone the MetaGPT repository to your local machine and navigate to the cloned directory:
   git clone
   cd metagpt

Run the installation script:

   python install


  • If you already have Chrome, Chromium, or MS Edge installed, you can skip downloading Chromium by setting the environment variable PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to true.
  • Some users may face issues installing globally. Alternatively, you can install it locally using:
    npm install @mermaid-js/mermaid-cli
    Don’t forget to configure mmdc in config.yml:
    PUPPETEER_CONFIG: "./config/puppeteer-config.json" MMDC: "./node_modules/.bin/mmdc"
  • If python install gives a permission error, try python install --user.

Installation by Docker:

  1. Download MetaGPT Image and Prepare Configuration:
    Pull the official MetaGPT image and create necessary directories:
   docker pull metagpt/metagpt:v0.3.1
   mkdir -p /opt/metagpt/{config,workspace}

Copy the configuration file:

   docker run --rm metagpt/metagpt:v0.3.1 cat /app/metagpt/config/config.yaml > /opt/metagpt/config/key.yaml

Edit the configuration file:

   vim /opt/metagpt/config/key.yaml
  1. Run MetaGPT Demo with Docker Container:
    Run the following command to execute the MetaGPT demo within a container:
   docker run --rm \
       --privileged \
       -v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
       -v /opt/metagpt/workspace:/app/metagpt/workspace \
       metagpt/metagpt:v0.3.1 \
       python "Write a cli snake game"

Alternatively, start a container and execute commands inside it:

   docker run --name metagpt -d \
       --privileged \
       -v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
       -v /opt/metagpt/workspace:/app/metagpt/workspace \
   docker exec -it metagpt /bin/bash
   $ python "Write a cli snake game"

The docker run command:

  • Runs in privileged mode to have browser permissions.
  • Maps host directories to container directories.
  • Executes the demo command.
Also Read:  ChatGPT Official Android App : Download & Use

Building Custom Image:

If you prefer customization, you can build your own MetaGPT image:

  1. Clone the repository and navigate to the directory:
   git clone
   cd MetaGPT
  1. Build the image:
   docker build -t metagpt:custom .


  • Configure your OPENAI_API_KEY in config/key.yaml, config/config.yaml, or as an environment variable. Priority order: config/key.yaml > config/config.yaml > env.
  • Replace OPENAI_API_KEY in config/key.yaml with your own key.
  • Optionally, set OPENAI_API_BASE if needed.

Getting Started:

  1. Initiate a startup idea:
   python "Write a cli snake game"
  1. Optionally, include code review for better code quality:
   python "Write a cli snake game" --code_review True

After running the script, you’ll find your new project in the workspace/ directory.

Preference of Platform or Tool:

You can specify your preferred platform or tool when expressing your requirements. For example:

python "Write a cli snake game based on pygame"

In conclusion, Whether you choose traditional or Docker-based setup, MetaGPT offers a lot of options that you can work with.


Leave a Reply

Your email address will not be published. Required fields are marked *