MassGen: Multi-Agent Scaling System for GenAI#

MassGen Logo MassGen Logo

PyPI GitHub Stars Python 3.11+ License

Follow on X Follow on LinkedIn Join our Discord


MassGen Demo - Multi-agent collaboration in action MassGen Demo - Multi-agent collaboration in action

What is MassGen?#

MassGen is a cutting-edge multi-agent system that leverages the power of collaborative AI to solve complex tasks. It assigns a task to multiple AI agents who work in parallel, observe each other’s progress, and refine their approaches to converge on the best solution to deliver a comprehensive and high-quality result.

How It Works:

  • Work in Parallel - Multiple agents tackle the problem simultaneously, each bringing unique capabilities

  • See Recent Answers - At each step, agents view the most recent answers from other agents

  • Decide Next Action - Each agent chooses to provide a new answer or vote for an existing answer

  • Share Workspaces - When agents provide answers, their workspace is captured so others can review their work

  • Natural Consensus - Coordination continues until all agents vote, then the agent with most votes presents the final answer

Think of it as a “parallel study group” for AI - inspired by advanced systems like xAI’s Grok Heavy and Google DeepMind’s Gemini Deep Think. Agents learn from each other to produce better results than any single agent could achieve alone.

How Does MassGen Compare?#

MassGen vs LLM Council: While LLM Council follows a fixed 3-stage pipeline, MassGen agents autonomously decide to contribute new answers or vote for others, reaching consensus organically. Plus, MassGen agents can use tools, execute code, and read/write files in your codebase — backed by active development with regular releases. See full comparison →

Quick Start#

pip install uv        # if needed
uv venv && source .venv/bin/activate
uv pip install massgen
uv run massgen        # Setup wizard, then ask your first question

Rich terminal UI with real-time streaming, multi-turn conversations, and YAML configuration.

Installation · Running MassGen · Configuration

Key Features#

🤝 Cross-Model Synergy

Use Claude, Gemini, GPT, Grok together - each agent can use a different model.

⚡ Parallel Coordination

Multiple agents work simultaneously with voting and consensus detection.

🛠️ Tools & MCP

Model Context Protocol for web search, code execution, file operations, and custom tools.

🐍 Python & LiteLLM

Full async Python API and LiteLLM integration for seamless application embedding.

📊 Live Visualization

Real-time terminal display showing agents’ working processes and coordination.

💬 Multi-Turn Sessions

Interactive conversations with context preservation across turns.

🔗 Framework Interoperability

Integrate external frameworks (AG2, LangGraph, AgentScope, OpenAI, SmolAgent) as tools.

📁 Project Integration

Work directly with your codebase using context paths with granular read/write permissions.

Recent Releases#

v0.1.22 (December 8, 2025) - Shadow Agent Architecture

Lightweight shadow agents spawned in parallel respond to broadcasts without interrupting parent agents. Full context inheritance with parent’s conversation history and current work-in-progress. Automatic response collection via asyncio.gather() with informational messages to parent agents.

v0.1.21 (December 5, 2025) - Graceful Cancellation for Multi-Turn Sessions

Ctrl+C now saves partial progress mid-coordination, preserving agent answers and workspaces. Sessions can resume with --continue without losing any work. First Ctrl+C saves gracefully; second forces immediate exit.

v0.1.20 (December 3, 2025) - Web UI & Auto Docker Setup

Browser-based real-time visualization with React frontend, WebSocket streaming, timeline views, and workspace browsing. Automatic Docker container setup for computer use agents with Ubuntu 22.04, Xfce desktop, and pre-configured tools.

Full changelog →

Supported Models#

Claude (Anthropic) · Gemini (Google) · GPT (OpenAI) · Grok (xAI) · Azure OpenAI · Groq · Together · LM Studio · and more…

Documentation#