MetaGPT
Type: full-code · Vendor: DeepWisdom / FoundationAgents · Language: Python · License: MIT · Status: active · Status in practice: mature
Materialise software-engineering Standard Operating Procedures as multi-agent teams of Roles whose communication is mediated by an Environment.
Description. MetaGPT is DeepWisdom's open-source multi-agent framework whose stated philosophy is 'Code = SOP(Team)' — it encodes the SOPs of a software company as a Team of Role agents (Product Manager, Architect, Project Manager, Engineer, Data Analyst). Roles observe Messages from a shared Environment and emit Actions; the Environment broadcasts messages to subscribed roles until everyone is idle. MetaGPT has also published the AFlow paper on automatic agentic workflow generation (ICLR 2025 oral) and the Data Interpreter agent that writes and runs code to solve analytics tasks.
Agent loop shape. Role-based multi-agent loop. A Team contains Role agents, each with a list of Actions and a watch list of Message types to subscribe to. The shared Environment broadcasts messages to subscribed roles; each role observes, decides which Action to run, executes it, and publishes a Message back. The Team runs for n_round steps or until env.is_idle (no role has new messages).
Primary use cases
- code generation from a one-line requirement via a simulated software company
- multi-role SOP-encoded multi-agent workflows
- data analysis via the Data Interpreter code-as-action agent
- automatic workflow search via AFlow
Key concepts
- Code = SOP(Team) (docs) — Core philosophy: a Standard Operating Procedure for a software team is materialised as code executed by an LLM team.
- Role → role-assignment (docs) — Agent abstraction with a system prompt, a list of Actions, and a watch list of Message types it subscribes to.
- Environment → inter-agent-communication (docs) — Shared message bus that broadcasts published messages to roles based on their subscriptions; tracks env.is_idle for termination.
- Team / company.hire / company.run → sop-encoded-multi-agent (docs) — Container that wires Roles together, invests budget, and runs the SOP for n_round rounds.
- Data Interpreter → code-as-action (docs) — Code-as-action agent that writes and executes Python code to solve data analysis tasks.
- AFlow → automatic-workflow-search (docs) — Automated agentic workflow generation (ICLR 2025 oral) shipped in MetaGPT.
Patterns this full-code implements —
- ★SOP-Encoded Multi-Agent Workflow
MetaGPT's stated philosophy is 'Code = SOP(Team)'; the framework materialises a software-company SOP as code executed by an LLM team.
- ★Inter-Agent Communication
Communication is mediated by an Environment object that broadcasts messages to roles based on their subscription; env.is_idle terminates the run.
- ★★Role Assignment
Off-the-shelf roles (Product Manager, Architect, Project Manager, Engineer) are imported and hired into a Team via company.hire().
- ★★Supervisor
The SOP defines an implicit supervision order; Team.run advances through rounds where each role acts on subscribed messages — upstream roles publish work, downstream roles observe and act.
- ★Code-as-Action Agent
Data Interpreter is MetaGPT's code-as-action agent that writes and executes Python code to solve analytics tasks; the framework also outputs full code projects through the software-company simulation.
- ·Automatic Workflow Search
AFlow (ICLR 2025 oral, top 1.8%) is shipped in MetaGPT and is the framework's automatic agentic workflow generation engine; the paper reformulates workflow optimisation as MCTS over code-represented…
- ★★Orchestrator-Workers
Team.run advances rounds where roles act on subscribed messages; the Team object orchestrates Roles with SOPs as workers in a software-company simulation.
- ★Spec-Driven Loop
The team produces user stories, requirements, and data structures before code — a literal spec-driven flow where each artefact becomes the next role's input, orchestrated by SOPs.
- ★★Tool Use
Actions can invoke tools (e.g. Data Interpreter runs code, the SD skill is invoked from UIDesign); MetaGPT does not market tool-use as its headline pattern, the SOP/roles do.
- ★Agent-as-a-Judge
MetaGPT introduced the SPO (Self-supervised Prompt Optimisation) paper which uses an LLM evaluator over pairwise output comparisons; treated as research rather than a headline feature of the core fra…
Neighbourhood
Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.