Model or dataset
BUPT-GAMMA/MASFactory avatar
BUPT-GAMMA/MASFactory

MASFactory turns a described intent into a graph you can then edit

A Graph-Centric Framework for Orchestrating Multi-Agent Systems with Vibe Graphing.

565 stars69 forksPythonApache-2.0

At a glance

What is it?
MASFactory is a graph-centric Python framework for orchestrating multi-agent systems, built around Vibe Graphing, where you describe what you want in natural language, the system drafts a structural design, you refine it visually, and the result compiles into a runnable workflow with runtime tracing. It suits a team that has outgrown hand-written orchestration, and the graph model is the part you have to learn.
Who is it for?
Adopt MASFactory if you are building multi-agent systems and want the collaboration structure designed from intent rather than wired by hand, and you are willing to learn a graph model with Node and Edge contracts. Do not adopt it if you want a model-agnostic library you can call from your own code, because MASFactory is a framework with its own component vocabulary and its own agent abstraction.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 10 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The pipeline: intent, design, preview, compile, trace

The one-line description of MASFactory is precise about what it does. Start from intent, generate a graph design, preview and refine it in a visual environment, compile it into an executable workflow, and trace node states, messages and shared state at runtime. That sequence is the product. The Vibe Graphing feature is the first step and the one the project is named for: turn natural-language intent into a structural design, then iteratively converge to an executable, reusable workflow. The point is stated in the why section. As multi-agent systems grow more capable, orchestration is still largely stuck in the age of manual assembly, either teams hand-write workflow code or they drag and configure nodes one by one on a canvas. The intent is to move human effort away from low-level wiring and repetitive configuration and back toward designing the multi-agent system itself. The claim is not that the human disappears from the loop but that the human's edits happen at the design level, through corrections and confirmations, rather than at the code level.

Why the project lists itself beside the alternatives

The README includes a table classifying today's multi-agent development frameworks into three categories, and it places MASFactory in all three rows while LangGraph, AutoGen, ChatDev2, Coze and Dify sit in the first two. Code frameworks build complex multi-agent systems and offer very high flexibility and extensibility, but have a higher entry barrier, require learning a DSL and usually involve substantial development cost. Low-code workflow platforms lower the barrier, but still rely heavily on manual human orchestration. Vibe Graphing orchestration frameworks, where MASFactory sits alone, are for rapidly designing and iterating multi-agent systems with lower human cost, where humans do not need to spend much effort on coding or dragging nodes, only on clearly describing needs and refining the design through dialogue. Publishing that table is unusual and it is worth reading closely, because it is the project's own claim about where it fits. The honest reading is that MASFactory offers a low-code path and an intent-driven path on top of a code framework, and the cost of the combination is that you still learn the graph vocabulary.

Four layers, and the component vocabulary

The architecture section says the framework adopts the widely used graph-centric approach and abstracts the system into four layers. The graph skeleton layer is the lowest level, where Node and Edge represent collaboration relationships, dependencies and message flow among agents. The component layer packages those into reusable units, and the components are named. Agent is the basic execution unit, an agent node with roles, instructions, tools, Memory, RAG and related capabilities, responsible for concrete analysis, generation and tool-use tasks. Graph packages multiple nodes as a nestable subgraph so workflows can be hierarchical and reused, and a single phase can become a node inside a larger graph. Loop handles iterative work such as repeated discussion, continuous revision or testing until success, turning repeat until a condition is met into a standard component. Switch supports branching and dynamic routing on explicit conditions or by using model capabilities to decide routing. Human brings confirmation, conversational input, file review and editing into the graph so a person can be involved at key stages rather than only at the ends. And ComposedGraph and NodeTemplate add two further reuse mechanisms, with built-in patterns such as InstructorAssistantGraph and BrainstormingGraph shipped for immediate use.

The context protocol is how agents get information

The fourth key feature is the context protocol, called ContextBlock, and it is the piece that decides what an agent actually sees. It organises Memory, RAG and MCP context sources in a structured way, with automatic injection and on-demand retrieval. The distinction between automatic injection and on-demand retrieval is the design point. A model context that is always injected consumes tokens whether or not the current step needs it, so a framework that lets a workflow declare which context blocks are always present and which are fetched when a node asks for them can keep a long multi-agent run affordable. The protocol layer also covers the communication side, where a Message Adapter and a Context Adapter unify communication protocols with Memory, RAG, MCP and the related context machinery, so a change of model provider or of memory backend does not ripple through every node in the graph. The dependency list backs this up, with the anthropic, openai and google-genai clients all present, plus tiktoken for token accounting and tenacity for retries, and docstring-parser for turning tool definitions into schemas.

The visualizer is where the graph stops being abstract

The MASFactory Visualizer is listed as a separate component in the repository, with its own top level directory, and it provides topology preview, runtime tracing and human-in-the-loop interaction. That set of three capabilities is the reason to run the visualizer rather than read logs. Topology preview is the static view of the design, so you can see the shape of a graph before you run it. Runtime tracing is the dynamic view, showing node states, messages and shared state as the workflow executes, which is what turns a failing multi-agent run from a wall of text into something you can read. And human-in-the-loop interaction is the operational half, since a Human node pauses the graph and waits for a person, and the visualizer is where that person answers. The documentation is a separate site at docs.masfactory.dev, the project site is masfactory.dev, and there is an arXiv paper at 2603.06007, plus two videos linked from the README, one explaining Vibe Graphing and one demonstrating the system.

Packaging, extras and what the extras pull in

The Python packaging is worth reading because the extras tell you what each capability costs. The base package is masfactory at version 1.0.4, requires Python 3.10 or newer, and depends on a short list: anthropic 0.58.2 or newer, google-genai 1.26.0 or newer, openai 1.97.0 or newer, numpy 2.2.6 or newer, tiktoken, tenacity, docstring-parser and pydantic through the client libraries. There are four optional groups. The embeddings group brings sentence-transformers, scikit-learn and transformers, which is what you need if you are doing local embeddings rather than calling a provider. The litellm group pins litellm above 1.92.0 and below 1.101.1, which is the obvious way to add more model providers. The apps group is the large one, with datasets, diffusers, huggingface-hub, human-eval, spacy, pandas, pillow, psutil, pydub, pyyaml and markdown, and the dev group holds the ipykernel. The setuptools configuration excludes applications, docs and the visualizer from the installed package, so the distribution stays small, and the requirements.txt is a full pinned lock including versions of numpy, pandas and pytz that differ by Python version, which is the marker of a project that supports a wide interpreter range.

The base dependency list in the project file is short:

python
    "anthropic>=0.58.2",
    "docstring-parser>=0.17.0",
    "google-genai>=1.26.0",
    "numpy>=2.2.6",
    "openai>=1.97.0",
    "tenacity>=8.0.0",
    "tiktoken>=0.7.0",

Editorial conclusion

Adopt MASFactory if you are building multi-agent systems and want the collaboration structure designed from intent rather than wired by hand, and you are willing to learn a graph model with Node and Edge contracts. Do not adopt it if you want a model-agnostic library you can call from your own code, because MASFactory is a framework with its own component vocabulary and its own agent abstraction. Verify first that the model providers you need are supported through the packaged clients, that you can run the visualizer locally, since the tracing view is a separate component, and that the context sources you rely on fit the ContextBlock protocol rather than a custom integration.

Frequently asked questions

What is Vibe Graphing in MASFactory?

It turns natural-language intent into a structural design and then converges iteratively on an executable, reusable workflow. The intent is to move human effort away from low-level wiring and repetitive configuration and back toward designing the multi-agent system itself, through dialogue and correction rather than by hand-writing or dragging every node.

Which components does MASFactory provide for building graphs?

Agent as the basic execution unit with roles, instructions, tools, Memory and RAG, Graph as a nestable subgraph, Loop for iterative tasks, Switch for branching and dynamic routing, Human for human-in-the-loop steps, and ComposedGraph and NodeTemplate for further reuse. Built-in patterns include InstructorAssistantGraph and BrainstormingGraph.

How does MASFactory handle context for agents?

Through the ContextBlock protocol, which organises Memory, RAG and MCP context sources in a structured way with automatic injection and on-demand retrieval. The protocol layer also uses a Message Adapter and a Context Adapter to unify communication protocols with that context machinery, so provider or backend changes do not have to reach every node.

What does the MASFactory Visualizer do?

It provides topology preview, runtime tracing and human-in-the-loop interaction. The runtime tracing shows node states, messages and shared state as the workflow runs, and the human-in-the-loop view is where a person answers a Human node that is waiting on a confirmation, conversational input or file review.

Official sources

  1. BUPT-GAMMA/MASFactory on GitHub
  2. Issues
  3. License: Apache-2.0
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/bupt-gamma-masfactory.svg)](https://hysenlabs.com/projects/bupt-gamma-masfactory)

Was this useful?