# Technical Document Extraction: MASS Framework
This document provides a comprehensive technical extraction of the provided image, which illustrates the **MASS** (Multi-Agent Search Space) framework for optimizing Multi-Agent Systems (MAS).
## 1. Component Isolation
The image is divided into two primary sections:
* **Left Section (The Framework Architecture):** A vertical stack of three functional layers representing the search and optimization spaces.
* **Right Section (The Output/Result):** A visual representation of the "Optimized MAS design," showing the resulting topology and prompt configurations.
---
## 2. Left Section: MASS Framework Architecture
This section describes the hierarchical structure of the MASS framework. The layers are connected by dashed grey arrows on the left and right, indicating a feedback loop or iterative optimization process.
### Layer 1: Prompt Optimization Space (Top - Pink)
* **Header:** Prompt Optimization Space
* **Sub-components:**
* **Instruction:** Represents the textual directives given to an agent.
* **Exemplar:** Represents few-shot examples or demonstrations provided to an agent.
### Layer 2: Multi-Agent Design Space (Middle - Orange)
* **Header:** Multi-Agent Design Space
* **Functional Components (6 blocks):**
1. **aggregate**: Methods for combining information from multiple agents.
2. **summarize**: Methods for condensing agent outputs.
3. **reflect**: Self-correction or evaluation mechanisms.
4. **tool-use**: Integration with external tools or APIs.
5. **debate**: Multi-agent interaction patterns for consensus.
6. **custom**: User-defined agent behaviors or roles.
### Layer 3: Topology Optimizer (Bottom - Blue)
* **Label:** Topology Optimizer
* **Function:** This layer acts as the engine that determines the structural arrangement (topology) of the agents based on the spaces defined above.
---
## 3. Right Section: Optimized MAS Design
This section visualizes the output of the MASS framework.
### Header and Icon
* **Icon:** A circular arrow icon containing a gear, signifying an iterative optimization process.
* **Text:** Optimized MAS design
### Optimized Topology (Diagram)
* **Label:** Optimized topology
* **Visual Representation:** A neural-network-style graph showing the flow of information between different agent types.
* **Layer 1 (Red):** Three square nodes enclosed in a dashed red box.
* **Layer 2 (Grey):** Three circular nodes enclosed in a dashed grey box.
* **Layer 3 (Blue):** Two square nodes enclosed in a dashed blue box.
* **Output (Purple):** One final square node.
* **Connections:** Arrows indicate the flow from Red $\rightarrow$ Grey $\rightarrow$ Blue $\rightarrow$ Purple.
### Optimized Prompt for Each Agent Type
Below the topology diagram, three colored boxes represent the specific prompt configurations generated for the different agent types identified in the topology.
| Agent Type (Color) | Prompt Content (Transcribed) |
| :--- | :--- |
| **Red Box** (Left) | `<ex_1>`, `<ex_2>`, `...`, `<ins>` |
| **Grey Box** (Middle) | `<ex_1>`, `<ex_2>`, `...`, `<ins>` |
| **Blue Box** (Right) | `<ex_1>`, `<ex_2>`, `...`, `<ins>` |
* **Legend for Prompt Content:**
* `<ex_n>`: Refers to the **Exemplars** from the Prompt Optimization Space.
* `<ins>`: Refers to the **Instruction** from the Prompt Optimization Space.
* **Footer Label:** A green bracket encompasses all three boxes with the text: *"Optimized prompt for each agent type"*.
---
## 4. Flow and Logic Summary
1. **Input:** The system takes parameters from the **Prompt Optimization Space** (Instructions/Exemplars) and the **Multi-Agent Design Space** (Agent behaviors like aggregate, debate, etc.).
2. **Process:** The **Topology Optimizer** iterates through these spaces (indicated by the dashed loop arrows) to find the most efficient configuration.
3. **Output:**
* An **Optimized topology** defining how many agents are used and how they are connected.
* An **Optimized prompt** tailored for every specific agent type within that topology, ensuring the instructions and examples are tuned for their specific role (e.g., a "debate" agent vs. a "summarize" agent).