foundationagents/metagpt

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

66,512 stars Python 12 components 16 connections

Multi-agent AI framework for collaborative software development

User requirements flow through specialized AI agents that collaborate to produce software artifacts, with each agent contributing domain expertise and passing results to the next stage.

Under the hood, the system uses 4 feedback loops, 5 data pools, 5 control points to manage its runtime behavior.

Structural Verdict

A 12-component ml inference with 16 connections. 913 files analyzed. Highly interconnected — components depend on each other heavily.

How Data Flows Through the System

User requirements flow through specialized AI agents that collaborate to produce software artifacts, with each agent contributing domain expertise and passing results to the next stage.

  1. Requirements Input — User provides natural language requirements or task descriptions
  2. Product Planning — ProductManager analyzes requirements and creates product requirements document (config: llm.model, llm.api_type)
  3. Architecture Design — Architect designs system structure, APIs, and data models (config: llm.model, llm.api_type)
  4. Project Management — ProjectManager breaks down work into tasks and manages execution (config: llm.model)
  5. Code Implementation — Engineers write code based on architecture and requirements (config: llm.model, llm.api_type)
  6. Quality Assurance — QaEngineer tests and validates the implemented solution (config: llm.model)
  7. Output Generation — Complete software project with documentation generated in workspace

System Behavior

How the system actually operates at runtime — where data accumulates, what loops, what waits, and what controls what.

Data Pools

Agent Memory (state-store)
Persistent memory for agent conversations and context
Document Store (database)
Vector database for RAG document retrieval
Workspace Files (file-store)
Generated code, documentation, and project artifacts
Minecraft World State (state-store)
Bot observations, inventory, and world blocks
Android UI State (state-store)
Screenshots and UI element hierarchies

Feedback Loops

Delays & Async Processing

Control Points

Technology Stack

Python (framework)
Primary language for framework and agents
Pydantic (library)
Data validation and settings management
OpenAI/Claude/Gemini APIs (library)
Large language model providers
Chainlit (framework)
Web UI for chat-based interactions
Streamlit (framework)
Web UI for SPO optimizer
Typer (library)
CLI application framework
JavaScript/Node.js (framework)
Minecraft bot environment
TypeScript (library)
Minecraft plugins and tools
Mineflayer (library)
Minecraft bot framework
pytest (testing)
Testing framework
YAML (build)
Configuration files

Key Components

Sub-Modules

AFlow Optimizer (independence: medium)
Evolutionary optimization of AI agent workflows using genetic algorithms
Android Assistant (independence: medium)
Learning and automating Android app interactions through UI observation and action
Minecraft Environment (independence: high)
Bot automation and interaction within Minecraft game world
SPO Optimizer (independence: medium)
Streamlit web app for prompt optimization using self-playing optimization
RAG System (independence: medium)
Retrieval-augmented generation for document-based AI assistance

Configuration

config/config2.example.yaml (yaml)

config/config2.yaml (yaml)

config/examples/anthropic-claude-3-5-sonnet.yaml (yaml)

config/examples/aws-bedrock.yaml (yaml)

Explore the interactive analysis

See the full architecture map, data flow, and code patterns visualization.

Analyze on CodeSea

Related Ml Inference Repositories

Frequently Asked Questions

What is MetaGPT used for?

Multi-agent AI framework for collaborative software development foundationagents/metagpt is a 12-component ml inference written in Python. Highly interconnected — components depend on each other heavily. The codebase contains 913 files.

How is MetaGPT architected?

MetaGPT is organized into 5 architecture layers: Core Framework, Agent Roles, Actions & Tools, Examples & Extensions, and 1 more. Highly interconnected — components depend on each other heavily. This layered structure enables tight integration between components.

How does data flow through MetaGPT?

Data moves through 7 stages: Requirements Input → Product Planning → Architecture Design → Project Management → Code Implementation → .... User requirements flow through specialized AI agents that collaborate to produce software artifacts, with each agent contributing domain expertise and passing results to the next stage. This pipeline design reflects a complex multi-stage processing system.

What technologies does MetaGPT use?

The core stack includes Python (Primary language for framework and agents), Pydantic (Data validation and settings management), OpenAI/Claude/Gemini APIs (Large language model providers), Chainlit (Web UI for chat-based interactions), Streamlit (Web UI for SPO optimizer), Typer (CLI application framework), and 5 more. This broad technology surface reflects a mature project with many integration points.

What system dynamics does MetaGPT have?

MetaGPT exhibits 5 data pools (Agent Memory, Document Store), 4 feedback loops, 5 control points, 4 delays. The feedback loops handle retry and convergence. These runtime behaviors shape how the system responds to load, failures, and configuration changes.

What design patterns does MetaGPT use?

5 design patterns detected: Role-Action Pattern, Multi-Agent Orchestration, Provider Pattern, Environment Abstraction, Configuration-Driven.

Analyzed on March 31, 2026 by CodeSea. Written by .