Run This Ai
EN DE

Getting Started with MetaGPT: Deploy Your AI Software Company with Docker

Learn how to deploy MetaGPT with Docker in minutes and create your first software project from a one-line requirement using multi-agent AI collaboration.

MetaGPT Logo

Getting Started with MetaGPT: Run Your Own AI Software Company with Docker

MetaGPT is the most popular multi-agent framework for simulating a software company with AI. In this guide, you'll learn how to deploy MetaGPT using Docker and create your first software project from a one-line requirement.

Prerequisites

  • Docker and Docker Compose installed on your system
  • An OpenAI API key (or access to a compatible LLM API)
  • At least 2GB of RAM (4GB recommended)

Step 1: Pull the Official Docker Image

docker pull metagpt/metagpt:latest

Step 2: Run MetaGPT with Docker

docker run --name metagpt \
  -e OPENAI_API_KEY=your-api-key-here \
  -v ./data/metagpt:/data \
  metagpt/metagpt:latest
MetaGPT GitHub Repository

Step 3: Your First Project

Once MetaGPT is running, you can give it a one-line requirement. For example:

metagpt "Create a simple task management API with user authentication"

MetaGPT's agents will collaborate to produce:

  • Product Requirements Document — User stories, features, and acceptance criteria
  • System Architecture — Data models, API endpoints, and technology stack
  • Implementation Plan — Task breakdown with estimated effort
  • Source Code — Complete project with API routes, database schema, and tests
  • API Documentation — Automatically generated from the code

Docker Compose Setup

For a more robust setup with persistent storage and proper configuration:

version: '3'
services:
  metagpt:
    image: metagpt/metagpt:latest
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - ./data/metagpt:/data
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - METAGPT_LLM_API_TYPE=openai
      - METAGPT_LLM_MODEL=gpt-4

Using with Local LLMs

MetaGPT also works with local models via Ollama or vLLM. Configure the LLM backend:

docker run --name metagpt \
  -e METAGPT_LLM_API_TYPE=ollama \
  -e METAGPT_LLM_API_BASE=http://host.docker.internal:11434 \
  -e METAGPT_LLM_MODEL=llama3 \
  metagpt/metagpt:latest

Tips for Best Results

  • Be specific in your requirements — include tech stack preferences and constraints
  • Use English for requirements for best LLM comprehension
  • Start with small projects and gradually increase complexity
  • Review and refine the generated outputs iteratively
  • Use the Incremental Development mode for larger projects

Conclusion

MetaGPT brings the vision of natural language programming to life by orchestrating AI agents in software company roles. With Docker deployment, you can have your own AI development team running in minutes. Whether you're prototyping, teaching, or exploring the future of software engineering, MetaGPT is an essential tool to try.