Overseas access: www.kdjingpai.com
Bookmark Us

MassGen is an open source multi-intelligence collaboration system inspired by xAI's Grok Heavy and Google DeepMind's Gemini Deep Think, which solves complex tasks by having multiple AI intelligences work in parallel to share information and optimize results. Users can invoke different AI models (e.g., Google Gemini, OpenAI, and xAI Grok) to complete tasks through simple command-line operations. massGen supports custom tool extensions for scenarios that require multi-model collaboration, such as analyzing complex problems or generating high-quality content. The project is currently in early development, with code and documentation hosted on GitHub, and the community can participate in discussions and contribute via Discord.

 

Function List

  • Multi-intelligence parallel processing: Multiple AI intelligences work on tasks simultaneously, observing each other's progress and optimizing the end result.
  • Cross-model collaboration: Supports models such as Google Gemini, OpenAI and xAI Grok, integrating the output through a consensus mechanism.
  • Iterative optimization: Intelligentsia progressively refine task results through multiple iterations to improve accuracy and quality.
  • Customized tool extensions: Users can find out more about this in the massgen/tools.py New tools are registered in to enhance the smart body functionality.
  • Flexible Configuration: Support for adjusting run mode, model selection, and task duration via configuration file or command line parameters.
  • Support for multiple task types: For diverse tasks such as quizzing, content generation, mathematical calculations, etc.

Using Help

Installation process

To use MassGen, you need to install and configure the relevant dependencies in your local environment. Below are the detailed installation and usage steps:

  1. Clone Code Repository
    Run the following command in a terminal to download the MassGen source code:

    git clone https://github.com/Leezekun/MassGen.git
    cd MassGen
    
  2. Installing the Python Environment
    MassGen relies on a Python environment, it is recommended to use the uv Managing virtual environments. Execute the following command:

    pip install uv
    uv venv
    source .venv/bin/activate  # macOS/Linux
    .venv\Scripts\activate  # Windows
    
  3. Installation of dependencies
    Install the necessary Python packages by running the following command from the project root directory:

    uv pip install -e .
    
  4. Configuring API Keys
    MassGen requires an API key for Google Gemini, OpenAI or xAI Grok. Copy the sample configuration file and edit it:

    cp massgen/backends/.env.example massgen/backends/.env
    

    exist massgen/backends/.env file to add your API key, for example:

    OPENAI_API_KEY=sk-your-openai-key-here
    XAI_API_KEY=xai-your-xai-key-here
    GEMINI_API_KEY=your-gemini-key-here
    

    Fill in the corresponding key according to the model to be used.

  5. Verify Installation
    After ensuring that all dependencies and keys are configured correctly, you can verify that the environment is working properly by running the sample commands.

Usage

MassGen provides a command line interface (CLI) to run tasks. The following is a description of how to use the main operations and features:

Running multi-intelligence tasks

MassGen supports a multi-intelligence model, where multiple models work together to accomplish a task. For example, the query "AI winners of the International Mathematical Olympiad 2025":

python cli.py "Which AI won IMO in 2025?" --models gemini-2.5-flash gpt-4o
  • Parameter description::
    • --models: Specify the model to be used, e.g. gemini-2.5-flash maybe gpt-4oThe
    • Task Description: Enter the question or task content directly after the command.

Once running, MassGen assigns tasks to multiple intelligences, which process in parallel, share intermediate results, and generate the final answer through iterative optimization.

single-intelligence model

If only a single model is needed to handle the task, you can use the single-intelligent-body mode. For example, calculating the greatest common divisor:

python cli.py "What is greatest common divisor of 238, 756, and 1512" --models gemini-2.5-flash

This mode is suitable for simple tasks and reduces resource consumption.

Using Configuration Files

MassGen supports running tasks via YAML configuration files for complex tasks or batch operations. For example:

python cli.py --config examples/fast_config.yaml "find big AI news this week"

The configuration file allows setting parameters such as maximum runtime, consensus thresholds, etc. Example:

max_duration: 120
consensus: 0.5
models:
- gemini-2.5-flash
- gpt-4o
  • parameter coverage: You can override configuration file parameters on the command line, for example:
    python cli.py --config examples/fast_config.yaml "who will win World Cup 2026" --max-duration 120 --consensus 0.5
    

Customization Tools

MassGen allows users to extend the tool to enhance functionality. In the massgen/tools.py Register a new tool in the For example, add a search tool:

  1. show (a ticket) massgen/tools.pyThe
  2. Add the code and description of the tool, following the format in the document.
  3. After saving, the tool is automatically called by the smart body.

Viewing the Run Log

MassGen records the operation and chat history of intelligences, which is saved in the log directory. Users can examine the logs to understand the processing and system events (e.g., stage transitions, consensus reaching) of each intelligent body.

Featured Function Operation

Parallel processing and consensus mechanisms

At the heart of MassGen is parallel processing by multiple intelligences. Each intelligence handles the task independently, while observing the progress of the others. For example, in answering the question, "Explain relativity":

python cli.py --config examples/fast_config.yaml "Explain the theory of relativity in simple terms."
  • The intelligent body will decompose the task and generate the different parts of the explanation in separate parts.
  • The system works through a consensus mechanism (consensus (Parameter Control) Integrate results to ensure answer consistency and accuracy.

Iterative optimization

Intelligentsia will make multiple iterations when dealing with complex problems. For example, generating short stories:

python cli.py --config examples/fast_config.yaml "Write a short story about a robot who discovers music."
  • The intelligentsia first generates a draft of the story.
  • Other intelligences review and make recommendations for improvement.
  • The system is optimized iteratively until a satisfactory result or time limit is reached.

application scenario

  1. Complex problem solving
    When users need to analyze complex problems, such as scientific computing or policy analysis, MassGen provides comprehensive answers through multi-model collaboration. For example, a researcher can enter a question and get perspectives and synthesized conclusions from different models.
  2. Content generation
    Ideal for generating high-quality text such as stories, reports, or articles, MassGen's multi-intelligence collaboration ensures logical and creative content for writers or marketers.
  3. Education and learning
    Students can use MassGen to solve math, physics, and other problems. The system is iteratively optimized to provide detailed step-by-step solutions that are suitable for self-study or instructional assistance.
  4. Technology development and commissioning
    Developers can use MassGen to test AI model performance or develop new tools. Quickly validate new features or optimize existing workflows with custom tools and profiles.

QA

  1. What AI models does MassGen support?
    Advanced inference models from Google Gemini, OpenAI and xAI Grok are currently supported. Users can find more information on the massgen/utils.py Register more models in.
  2. How can I extend the functionality of MassGen?
    exist massgen/tools.py Add custom tool code in to register according to the file format. Future versions will support local inference models.
  3. How much computing power is required to run MassGen?
    Dependent on task complexity and number of models. It is recommended to use a device with at least 16GB of RAM and ensure a stable network connection to call the API.
  4. How can I view the processing of intelligences?
    The system saves the operation and chat history of each smart body in the log directory, and you can view the log to understand the detailed process.
0Bookmarked
0kudos

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

inbox

Contact Us

Top

en_USEnglish