[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1262":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":15,"starSnapshotCount":15,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},1262,"RecursiveMAS","RecursiveMAS\u002FRecursiveMAS","Offical Implementation for \"Recursive Multi-Agent Systems\"","https:\u002F\u002Frecursivemas.github.io",null,"Python",541,84,10,4,0,6,29,201,18,83.29,false,"main",[24,25,26],"agent-collaboration","multi-agent-systems","recursive-algorithm","2026-06-12 04:00:08","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets\u002Flogo.png\">\n    \u003Cimg alt=\"RecursiveMAS\" src=\"assets\u002Flogo.png\" width=300>\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\n\u003Ch3 align=\"center\">\nScaling agent collaboration through latent-space recursion.\n\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2604.25917\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2604.25917-B31B1B.svg?logo=arxiv\" alt=\"Arxiv\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2604.25917\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF%20Daily%20Paper-2604.25917-FFD21E.svg?logo=huggingface\" alt=\"HF Daily Paper\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Frecursivemas.github.io\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWebsite-RecursiveMAS-2176BC?logo=GoogleChrome\" alt=\"Website\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRecursiveMAS\u002FRecursiveMAS\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGithub-RecursiveMAS-2D8CFF.svg?logo=github\" alt=\"RecursiveMAS\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002Fcollections\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHuggingface-Collections-FFD21E.svg?logo=huggingface\" alt=\"Huggingface Collection\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002Fmodels\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHuggingface-Models-FFD21E.svg?logo=huggingface\" alt=\"Huggingface Model\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fx.com\u002FJiaru_Zou\u002Fstatus\u002F2049551828296389118\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTwitter-Coverage-1DA1F2.svg?logo=x\" alt=\"Twitter Coverage\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\n\u003Cp align=\"center\">\n  \u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F9c09261a-c9e7-4851-8462-eeda69989b4e\" controls width=\"300\">\u003C\u002Fvideo>\n\u003C\u002Fp>\n\n## 📰 News\n**[2026.05.01]** Ours paper is featured as [🤗 HuggingFace 1st Paper of the Week\u002FDay](https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2604.25917)!\n\n**[2026.04.28]** All [collaboration styles](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002Fcollections) and [model checkpoints](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002Fmodels), with [examplified downstream inference](https:\u002F\u002Fgithub.com\u002FRecursiveMAS\u002FRecursiveMAS) are now available. Stay tuned for the complete training\u002Finference pipeline and additional features!\n\n**[2026.04.28]** We have released the [RecursiveMAS paper](https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2604.25917)! \n\n\n## 🌟 Introduction\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fexps.png\" width=\"100%\" alt=\"RecursiveMAS Overview\">\n\u003C\u002Fp>\n\n**RecursiveMAS** is a multi-agent framework that scales agent collaboration through **latent-space recursion**. Instead of treating each LLM agent as an isolated module, RecursiveMAS casts the entire multi-agent system as a **unified recursive computation**. Heterogeneous agents are connected through lightweight RecursiveLink modules, allowing agents to iteratively exchange, refine, and evolve their latent states across recursion rounds.\n\n## 📋 Supported Features\n\n✅ Release All Collaboration Patterns (Sequential, Mixture, Deliberation, Distillation).\n\n✅ Release Demo Code for Inference (Commands Provided Below).\n\n☑️ Add Complete Inference Pipeline Across All Downstreams.\n\n☑️ Add All Training Data & Implementation Details.\n\n☑️ Add Additional Supported Model Family & MAS Collaboration Patterns.\n\n## 🛠️ Environment Setup\n\nThis repository provides the code for running RecursiveMAS under different multi-agent collaboration styles. \n\nTo begin with, we recommend creating a new conda environment:\n\n```bash\nconda create -n recursivemas python=3.10 -y\nconda activate recursivemas\n```\n\nInstall the required packages:\n\n```bash\npip install -r requirements.txt\n```\n\nFor Deliberation-Style, the Tool-Caller Agent requires external search tools to retrieve information. \nPlease set up a search API key (e.g., a Tavily API key) in `.env` file:\n```bash\nTAVILY_API_KEY=your_tavily_api_key_here\n```\n\n## 💥 Quick Start\n\n### 🤖 Load Model Checkpoints\n\nTo run RecursiveMAS, you need to download and store the checkpoints for each agent role in the multi-agent system from our Hugging Face release.\n\nThe checkpoints are organized by collaboration style. Each collection contains the individual role-specific agent together with their RecursiveLink modules.\n\n### [Sequential-Style (Light) MAS Collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002FRecursiveMAS\u002Fsequential-style-recursivemas)\n\n| **Model Organization** | **Download** |\n| ---------------------- | ------------ |\n| Sequential-Light-Planner-Qwen3-1.7B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Light-Planner-Qwen3-1.7B) |\n| Sequential-Light-Critic-Llama3.2-1B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Light-Critic-Llama3.2-1B) |\n| Sequential-Light-Solver-Qwen2.5-Math-1.5B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Light-Solver-Qwen2.5-Math-1.5B) |\n| Sequential-Light-Outerlinks | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Light-Outerlinks) |\n\n### [Sequential-Style (Scaled) MAS Collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002FRecursiveMAS\u002Fsequential-style-recursivemas)\n\n| **Model Organization** | **Download** |\n| ---------------------- | ------------ |\n| Sequential-Scaled-Planner-Gemma3-4B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Scaled-Planner-Gemma3-4B) |\n| Sequential-Scaled-Critic-Llama3.2-3B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Scaled-Critic-Llama3.2-3B) |\n| Sequential-Scaled-Solver-Qwen3.5-4B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Scaled-Solver-Qwen3.5-4B) |\n| Sequential-Scaled-Outerlinks | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FSequential-Scaled-Outerlinks) |\n\n### [Mixture-Style MAS Collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002FRecursiveMAS\u002Fmixture-style-recursivemas)\n\n| **Model Organization** | **Download** |\n| ---------------------- | ------------ |\n| Mixture-Math-DeepSeek-R1-Distill-Qwen-1.5B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FMixture-Math-DeepSeek-R1-Distill-Qwen-1.5B) |\n| Mixture-Code-Qwen2.5-Coder-3B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FMixture-Code-Qwen2.5-Coder-3B) |\n| Mixture-Science-BioMistral-7B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FMixture-Science-BioMistral-7B) |\n| Mixture-Summarizer-Qwen3.5-2B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FMixture-Summarizer-Qwen3.5-2B) |\n| Mixture-Outerlinks | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FMixture-Outerlinks) |\n\n### [Distillation-Style MAS Collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002FRecursiveMAS\u002Fdistillation-style-recursivemas)\n\n| **Model Organization** | **Download** |\n| ---------------------- | ------------ |\n| Distillation-Expert-Qwen3.5-9B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FDistillation-Expert-Qwen3.5-9B) |\n| Distillation-Learner-Qwen3.5-4B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FDistillation-Learner-Qwen3.5-4B) |\n| Distillation-Outerlinks | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FDistillation-Outerlinks) |\n\n### [Deliberation-Style MAS Collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002FRecursiveMAS\u002Fdeliberation-style-recursivemas)\n\n| **Model Organization** | **Download** |\n| ---------------------- | ------------ |\n| Deliberation-Reflector-Qwen3.5-4B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FDeliberation-Reflector-Qwen3.5-4B) |\n| Deliberation-Toolcaller-Qwen3.5-4B | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FDeliberation-Toolcaller-Qwen3.5-4B) |\n| Deliberation-Outerlinks | [🤗 HuggingFace](https:\u002F\u002Fhuggingface.co\u002FRecursiveMAS\u002FDeliberation-Outerlinks) |\n\n\nHere is an example of how to load the whole MAS pipeline:\n\n```python\nfrom system_loader import load_mas_system\n\nmas = load_mas_system(\n    style=\"sequential_light\",\n    device=\"cuda\",\n    trust_remote_code=True,\n)\n\nplanner = mas.agents[\"planner\"].model\ncritic = mas.agents[\"critic\"].model\nsolver = mas.agents[\"solver\"].model\n```\n\nDetailed running code for loading agents and running RecursiveMAS on downstream tasks is provided in `run.py`. \n\n\n### 🔍 Clone the Repository\n\nNext, clone our repository and enter the project directory:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FRecursiveMAS\u002FRecursiveMAS.git\ncd RecursiveMAS\n```\n\nThe current repository is organized as follows:\n\n```text\nRecursiveMAS\u002F\n├── README.md\n├── __init__.py\n├── run.py\n├── load_from_repo.py\n├── hf_resolver.py\n├── modeling.py\n├── system_loader.py\n├── prompts.py\n├── requirements.txt\n├── assets\u002F\n├── dataset\u002F\n└── inference_utils\u002F\n    ├── __init__.py\n    ├── answer_utils.py\n    ├── lcb_utils.py\n    ├── reflector_tool_notes.py\n    ├── inference_mas.py\n    ├── inference_mas_mixture.py\n    ├── inference_mas_distill.py\n    └── inference_mas_deliberation.py\n```\n\nThe key components are:\n\n- `run.py`: the unified entry point for running RecursiveMAS inference.\n- `load_from_repo.py`: maps each MAS style to our released Hugging Face checkpoints and dataset defaults.\n- `hf_resolver.py`: resolves and load the Hugging Face checkpoints.\n- `modeling.py`: implements RecursiveLink modules.\n- `system_loader.py`: provides a high-level API for loading a full released multi-agent system.\n- `prompts.py`: stores prompts for different MAS collaboration styles.\n- `inference_utils\u002F`: contains inference pipelines and evaluation utilities for different MAS structures.\n\n### ⚙️ Running RecursiveMAS at Different Scales\n\nWe provide Sequential-style RecursiveMAS under both lightweight and scaled settings.\n\n- **Sequential-style (Light)** uses lightweight agents for efficient recursive collaboration.\n```bash\npython run.py --style sequential_light --batch_size 32 --temperature 0.6 --top_p 0.95 --dataset math500 --seed 42 --trust_remote_code 1 --device cuda\n```\n\n- **Sequential-style (Scaled)** uses stronger LLM agents to further improve reasoning performance.\n```bash\npython run.py --style sequential_scaled --batch_size 16 --temperature 0.6 --top_p 0.95 --dataset math500 --seed 42 --trust_remote_code 1 --device cuda\n```\n\n### 🧩 Exploring Various Collaboration Patterns\n\nRecursiveMAS can also be adapted to different MAS collaboration patterns beyond the sequential setting.\n\n- **Mixture-style RecursiveMAS** coordinates multiple domain-specialized agents and aggregates their information through a summarizer.\n```bash\npython run.py --style mixture --batch_size 16 --temperature 0.6 --top_p 0.95 --dataset math500 --seed 42 --trust_remote_code 1 --device cuda\n```\n\n- **Distillation-style RecursiveMAS** enables a larger Expert and a smaller Learner to interact recursively, improving the Learner while retaining better efficiency.\n```bash\npython run.py --style distillation --batch_size 16 --temperature 0.6 --top_p 0.95 --dataset math500 --seed 42 --trust_remote_code 1 --device cuda\n```\n\n- **Deliberation-style RecursiveMAS** supports recursive coordination between a Reflector and a Tool-Caller for tool-integrated reasoning.\n```bash\npython run.py --style deliberation --batch_size 16 --temperature 0.6 --top_p 0.95 --dataset math500 --seed 42 --trust_remote_code 1 --device cuda\n```\n\n## 🙏 Acknowledgements\n\nThis project is built upon the excellent open-source community. We sincerely thank the developers and maintainers of the following libraries and resources:\n\n- [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm) for supporting efficient LLM inference and serving.\n- [ARPO](https:\u002F\u002Fgithub.com\u002FRUC-NLPIR\u002FARPO) for providing useful references on agentic tool-use systems and efficient tool-calling workflows.\n- [TextGrad](https:\u002F\u002Fgithub.com\u002Fzou-group\u002Ftextgrad) for its pioneering framework on text-based optimization and natural-language feedback for compound agentic systems.\n\n\u003C!-- \n## 🚀 Contributing\n\nWe welcome discussions and contributions to RecursiveMAS. If you would like to suggest improvements, please feel free to contact us.\n\n- [Xiyuan Yang](mailto:xiyuany4@illinois.edu)\n- [Jiaru Zou](mailto:jiaru@stanford.edu)\n\n--- -->\n\n## 📚 Citation\n```text\n@misc{recursivemas,\n      title={Recursive Multi-Agent Systems}, \n      author={Xiyuan Yang and Jiaru Zou and Rui Pan and Ruizhong Qiu and Pan Lu and Shizhe Diao and Jindong Jiang and Hanghang Tong and Tong Zhang and Markus J. Buehler and Jingrui He and James Zou},\n      year={2026},\n      eprint={2604.25917},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2604.25917}, \n}\n```\n","RecursiveMAS 是一个通过潜空间递归技术扩展多智能体协作的框架。该项目利用统一的递归计算方式，将整个多智能体系统视为一个整体，而不是孤立地处理每个智能体。它通过轻量级的 RecursiveLink 模块连接异构智能体，使得智能体可以在递归轮次中迭代交换、精炼和进化其潜在状态。支持多种协作模式（如顺序、混合、审议和蒸馏），并提供了用于推理的示例代码。适用于需要增强多个AI模型或智能体间协作效率与效果的研究和应用场景。",2,"2026-06-11 02:42:38","CREATED_QUERY"]