massgen 0.0.3__py3-none-any.whl → 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of massgen might be problematic. Click here for more details.

Files changed (268) hide show
  1. massgen/__init__.py +142 -8
  2. massgen/adapters/__init__.py +29 -0
  3. massgen/adapters/ag2_adapter.py +483 -0
  4. massgen/adapters/base.py +183 -0
  5. massgen/adapters/tests/__init__.py +0 -0
  6. massgen/adapters/tests/test_ag2_adapter.py +439 -0
  7. massgen/adapters/tests/test_agent_adapter.py +128 -0
  8. massgen/adapters/utils/__init__.py +2 -0
  9. massgen/adapters/utils/ag2_utils.py +236 -0
  10. massgen/adapters/utils/tests/__init__.py +0 -0
  11. massgen/adapters/utils/tests/test_ag2_utils.py +138 -0
  12. massgen/agent_config.py +329 -55
  13. massgen/api_params_handler/__init__.py +10 -0
  14. massgen/api_params_handler/_api_params_handler_base.py +99 -0
  15. massgen/api_params_handler/_chat_completions_api_params_handler.py +176 -0
  16. massgen/api_params_handler/_claude_api_params_handler.py +113 -0
  17. massgen/api_params_handler/_response_api_params_handler.py +130 -0
  18. massgen/backend/__init__.py +39 -4
  19. massgen/backend/azure_openai.py +385 -0
  20. massgen/backend/base.py +341 -69
  21. massgen/backend/base_with_mcp.py +1102 -0
  22. massgen/backend/capabilities.py +386 -0
  23. massgen/backend/chat_completions.py +577 -130
  24. massgen/backend/claude.py +1033 -537
  25. massgen/backend/claude_code.py +1203 -0
  26. massgen/backend/cli_base.py +209 -0
  27. massgen/backend/docs/BACKEND_ARCHITECTURE.md +126 -0
  28. massgen/backend/{CLAUDE_API_RESEARCH.md → docs/CLAUDE_API_RESEARCH.md} +18 -18
  29. massgen/backend/{GEMINI_API_DOCUMENTATION.md → docs/GEMINI_API_DOCUMENTATION.md} +9 -9
  30. massgen/backend/docs/Gemini MCP Integration Analysis.md +1050 -0
  31. massgen/backend/docs/MCP_IMPLEMENTATION_CLAUDE_BACKEND.md +177 -0
  32. massgen/backend/docs/MCP_INTEGRATION_RESPONSE_BACKEND.md +352 -0
  33. massgen/backend/docs/OPENAI_GPT5_MODELS.md +211 -0
  34. massgen/backend/{OPENAI_RESPONSES_API_FORMAT.md → docs/OPENAI_RESPONSE_API_TOOL_CALLS.md} +3 -3
  35. massgen/backend/docs/OPENAI_response_streaming.md +20654 -0
  36. massgen/backend/docs/inference_backend.md +257 -0
  37. massgen/backend/docs/permissions_and_context_files.md +1085 -0
  38. massgen/backend/external.py +126 -0
  39. massgen/backend/gemini.py +1850 -241
  40. massgen/backend/grok.py +40 -156
  41. massgen/backend/inference.py +156 -0
  42. massgen/backend/lmstudio.py +171 -0
  43. massgen/backend/response.py +1095 -322
  44. massgen/chat_agent.py +131 -113
  45. massgen/cli.py +1560 -275
  46. massgen/config_builder.py +2396 -0
  47. massgen/configs/BACKEND_CONFIGURATION.md +458 -0
  48. massgen/configs/README.md +559 -216
  49. massgen/configs/ag2/ag2_case_study.yaml +27 -0
  50. massgen/configs/ag2/ag2_coder.yaml +34 -0
  51. massgen/configs/ag2/ag2_coder_case_study.yaml +36 -0
  52. massgen/configs/ag2/ag2_gemini.yaml +27 -0
  53. massgen/configs/ag2/ag2_groupchat.yaml +108 -0
  54. massgen/configs/ag2/ag2_groupchat_gpt.yaml +118 -0
  55. massgen/configs/ag2/ag2_single_agent.yaml +21 -0
  56. massgen/configs/basic/multi/fast_timeout_example.yaml +37 -0
  57. massgen/configs/basic/multi/gemini_4o_claude.yaml +31 -0
  58. massgen/configs/basic/multi/gemini_gpt5nano_claude.yaml +36 -0
  59. massgen/configs/{gemini_4o_claude.yaml → basic/multi/geminicode_4o_claude.yaml} +3 -3
  60. massgen/configs/basic/multi/geminicode_gpt5nano_claude.yaml +36 -0
  61. massgen/configs/basic/multi/glm_gemini_claude.yaml +25 -0
  62. massgen/configs/basic/multi/gpt4o_audio_generation.yaml +30 -0
  63. massgen/configs/basic/multi/gpt4o_image_generation.yaml +31 -0
  64. massgen/configs/basic/multi/gpt5nano_glm_qwen.yaml +26 -0
  65. massgen/configs/basic/multi/gpt5nano_image_understanding.yaml +26 -0
  66. massgen/configs/{three_agents_default.yaml → basic/multi/three_agents_default.yaml} +8 -4
  67. massgen/configs/basic/multi/three_agents_opensource.yaml +27 -0
  68. massgen/configs/basic/multi/three_agents_vllm.yaml +20 -0
  69. massgen/configs/basic/multi/two_agents_gemini.yaml +19 -0
  70. massgen/configs/{two_agents.yaml → basic/multi/two_agents_gpt5.yaml} +14 -6
  71. massgen/configs/basic/multi/two_agents_opensource_lmstudio.yaml +31 -0
  72. massgen/configs/basic/multi/two_qwen_vllm_sglang.yaml +28 -0
  73. massgen/configs/{single_agent.yaml → basic/single/single_agent.yaml} +1 -1
  74. massgen/configs/{single_flash2.5.yaml → basic/single/single_flash2.5.yaml} +1 -2
  75. massgen/configs/basic/single/single_gemini2.5pro.yaml +16 -0
  76. massgen/configs/basic/single/single_gpt4o_audio_generation.yaml +22 -0
  77. massgen/configs/basic/single/single_gpt4o_image_generation.yaml +22 -0
  78. massgen/configs/basic/single/single_gpt4o_video_generation.yaml +24 -0
  79. massgen/configs/basic/single/single_gpt5nano.yaml +20 -0
  80. massgen/configs/basic/single/single_gpt5nano_file_search.yaml +18 -0
  81. massgen/configs/basic/single/single_gpt5nano_image_understanding.yaml +17 -0
  82. massgen/configs/basic/single/single_gptoss120b.yaml +15 -0
  83. massgen/configs/basic/single/single_openrouter_audio_understanding.yaml +15 -0
  84. massgen/configs/basic/single/single_qwen_video_understanding.yaml +15 -0
  85. massgen/configs/debug/code_execution/command_filtering_blacklist.yaml +29 -0
  86. massgen/configs/debug/code_execution/command_filtering_whitelist.yaml +28 -0
  87. massgen/configs/debug/code_execution/docker_verification.yaml +29 -0
  88. massgen/configs/debug/skip_coordination_test.yaml +27 -0
  89. massgen/configs/debug/test_sdk_migration.yaml +17 -0
  90. massgen/configs/docs/DISCORD_MCP_SETUP.md +208 -0
  91. massgen/configs/docs/TWITTER_MCP_ENESCINAR_SETUP.md +82 -0
  92. massgen/configs/providers/azure/azure_openai_multi.yaml +21 -0
  93. massgen/configs/providers/azure/azure_openai_single.yaml +19 -0
  94. massgen/configs/providers/claude/claude.yaml +14 -0
  95. massgen/configs/providers/gemini/gemini_gpt5nano.yaml +28 -0
  96. massgen/configs/providers/local/lmstudio.yaml +11 -0
  97. massgen/configs/providers/openai/gpt5.yaml +46 -0
  98. massgen/configs/providers/openai/gpt5_nano.yaml +46 -0
  99. massgen/configs/providers/others/grok_single_agent.yaml +19 -0
  100. massgen/configs/providers/others/zai_coding_team.yaml +108 -0
  101. massgen/configs/providers/others/zai_glm45.yaml +12 -0
  102. massgen/configs/{creative_team.yaml → teams/creative/creative_team.yaml} +16 -6
  103. massgen/configs/{travel_planning.yaml → teams/creative/travel_planning.yaml} +16 -6
  104. massgen/configs/{news_analysis.yaml → teams/research/news_analysis.yaml} +16 -6
  105. massgen/configs/{research_team.yaml → teams/research/research_team.yaml} +15 -7
  106. massgen/configs/{technical_analysis.yaml → teams/research/technical_analysis.yaml} +16 -6
  107. massgen/configs/tools/code-execution/basic_command_execution.yaml +25 -0
  108. massgen/configs/tools/code-execution/code_execution_use_case_simple.yaml +41 -0
  109. massgen/configs/tools/code-execution/docker_claude_code.yaml +32 -0
  110. massgen/configs/tools/code-execution/docker_multi_agent.yaml +32 -0
  111. massgen/configs/tools/code-execution/docker_simple.yaml +29 -0
  112. massgen/configs/tools/code-execution/docker_with_resource_limits.yaml +32 -0
  113. massgen/configs/tools/code-execution/multi_agent_playwright_automation.yaml +57 -0
  114. massgen/configs/tools/filesystem/cc_gpt5_gemini_filesystem.yaml +34 -0
  115. massgen/configs/tools/filesystem/claude_code_context_sharing.yaml +68 -0
  116. massgen/configs/tools/filesystem/claude_code_flash2.5.yaml +43 -0
  117. massgen/configs/tools/filesystem/claude_code_flash2.5_gptoss.yaml +49 -0
  118. massgen/configs/tools/filesystem/claude_code_gpt5nano.yaml +31 -0
  119. massgen/configs/tools/filesystem/claude_code_single.yaml +40 -0
  120. massgen/configs/tools/filesystem/fs_permissions_test.yaml +87 -0
  121. massgen/configs/tools/filesystem/gemini_gemini_workspace_cleanup.yaml +54 -0
  122. massgen/configs/tools/filesystem/gemini_gpt5_filesystem_casestudy.yaml +30 -0
  123. massgen/configs/tools/filesystem/gemini_gpt5nano_file_context_path.yaml +43 -0
  124. massgen/configs/tools/filesystem/gemini_gpt5nano_protected_paths.yaml +45 -0
  125. massgen/configs/tools/filesystem/gpt5mini_cc_fs_context_path.yaml +31 -0
  126. massgen/configs/tools/filesystem/grok4_gpt5_gemini_filesystem.yaml +32 -0
  127. massgen/configs/tools/filesystem/multiturn/grok4_gpt5_claude_code_filesystem_multiturn.yaml +58 -0
  128. massgen/configs/tools/filesystem/multiturn/grok4_gpt5_gemini_filesystem_multiturn.yaml +58 -0
  129. massgen/configs/tools/filesystem/multiturn/two_claude_code_filesystem_multiturn.yaml +47 -0
  130. massgen/configs/tools/filesystem/multiturn/two_gemini_flash_filesystem_multiturn.yaml +48 -0
  131. massgen/configs/tools/mcp/claude_code_discord_mcp_example.yaml +27 -0
  132. massgen/configs/tools/mcp/claude_code_simple_mcp.yaml +35 -0
  133. massgen/configs/tools/mcp/claude_code_twitter_mcp_example.yaml +32 -0
  134. massgen/configs/tools/mcp/claude_mcp_example.yaml +24 -0
  135. massgen/configs/tools/mcp/claude_mcp_test.yaml +27 -0
  136. massgen/configs/tools/mcp/five_agents_travel_mcp_test.yaml +157 -0
  137. massgen/configs/tools/mcp/five_agents_weather_mcp_test.yaml +103 -0
  138. massgen/configs/tools/mcp/gemini_mcp_example.yaml +24 -0
  139. massgen/configs/tools/mcp/gemini_mcp_filesystem_test.yaml +23 -0
  140. massgen/configs/tools/mcp/gemini_mcp_filesystem_test_sharing.yaml +23 -0
  141. massgen/configs/tools/mcp/gemini_mcp_filesystem_test_single_agent.yaml +17 -0
  142. massgen/configs/tools/mcp/gemini_mcp_filesystem_test_with_claude_code.yaml +24 -0
  143. massgen/configs/tools/mcp/gemini_mcp_test.yaml +27 -0
  144. massgen/configs/tools/mcp/gemini_notion_mcp.yaml +52 -0
  145. massgen/configs/tools/mcp/gpt5_nano_mcp_example.yaml +24 -0
  146. massgen/configs/tools/mcp/gpt5_nano_mcp_test.yaml +27 -0
  147. massgen/configs/tools/mcp/gpt5mini_claude_code_discord_mcp_example.yaml +38 -0
  148. massgen/configs/tools/mcp/gpt_oss_mcp_example.yaml +25 -0
  149. massgen/configs/tools/mcp/gpt_oss_mcp_test.yaml +28 -0
  150. massgen/configs/tools/mcp/grok3_mini_mcp_example.yaml +24 -0
  151. massgen/configs/tools/mcp/grok3_mini_mcp_test.yaml +27 -0
  152. massgen/configs/tools/mcp/multimcp_gemini.yaml +111 -0
  153. massgen/configs/tools/mcp/qwen_api_mcp_example.yaml +25 -0
  154. massgen/configs/tools/mcp/qwen_api_mcp_test.yaml +28 -0
  155. massgen/configs/tools/mcp/qwen_local_mcp_example.yaml +24 -0
  156. massgen/configs/tools/mcp/qwen_local_mcp_test.yaml +27 -0
  157. massgen/configs/tools/planning/five_agents_discord_mcp_planning_mode.yaml +140 -0
  158. massgen/configs/tools/planning/five_agents_filesystem_mcp_planning_mode.yaml +151 -0
  159. massgen/configs/tools/planning/five_agents_notion_mcp_planning_mode.yaml +151 -0
  160. massgen/configs/tools/planning/five_agents_twitter_mcp_planning_mode.yaml +155 -0
  161. massgen/configs/tools/planning/gpt5_mini_case_study_mcp_planning_mode.yaml +73 -0
  162. massgen/configs/tools/web-search/claude_streamable_http_test.yaml +43 -0
  163. massgen/configs/tools/web-search/gemini_streamable_http_test.yaml +43 -0
  164. massgen/configs/tools/web-search/gpt5_mini_streamable_http_test.yaml +43 -0
  165. massgen/configs/tools/web-search/gpt_oss_streamable_http_test.yaml +44 -0
  166. massgen/configs/tools/web-search/grok3_mini_streamable_http_test.yaml +43 -0
  167. massgen/configs/tools/web-search/qwen_api_streamable_http_test.yaml +44 -0
  168. massgen/configs/tools/web-search/qwen_local_streamable_http_test.yaml +43 -0
  169. massgen/coordination_tracker.py +708 -0
  170. massgen/docker/README.md +462 -0
  171. massgen/filesystem_manager/__init__.py +21 -0
  172. massgen/filesystem_manager/_base.py +9 -0
  173. massgen/filesystem_manager/_code_execution_server.py +545 -0
  174. massgen/filesystem_manager/_docker_manager.py +477 -0
  175. massgen/filesystem_manager/_file_operation_tracker.py +248 -0
  176. massgen/filesystem_manager/_filesystem_manager.py +813 -0
  177. massgen/filesystem_manager/_path_permission_manager.py +1261 -0
  178. massgen/filesystem_manager/_workspace_tools_server.py +1815 -0
  179. massgen/formatter/__init__.py +10 -0
  180. massgen/formatter/_chat_completions_formatter.py +284 -0
  181. massgen/formatter/_claude_formatter.py +235 -0
  182. massgen/formatter/_formatter_base.py +156 -0
  183. massgen/formatter/_response_formatter.py +263 -0
  184. massgen/frontend/__init__.py +1 -2
  185. massgen/frontend/coordination_ui.py +471 -286
  186. massgen/frontend/displays/base_display.py +56 -11
  187. massgen/frontend/displays/create_coordination_table.py +1956 -0
  188. massgen/frontend/displays/rich_terminal_display.py +1259 -619
  189. massgen/frontend/displays/simple_display.py +9 -4
  190. massgen/frontend/displays/terminal_display.py +27 -68
  191. massgen/logger_config.py +681 -0
  192. massgen/mcp_tools/README.md +232 -0
  193. massgen/mcp_tools/__init__.py +105 -0
  194. massgen/mcp_tools/backend_utils.py +1035 -0
  195. massgen/mcp_tools/circuit_breaker.py +195 -0
  196. massgen/mcp_tools/client.py +894 -0
  197. massgen/mcp_tools/config_validator.py +138 -0
  198. massgen/mcp_tools/docs/circuit_breaker.md +646 -0
  199. massgen/mcp_tools/docs/client.md +950 -0
  200. massgen/mcp_tools/docs/config_validator.md +478 -0
  201. massgen/mcp_tools/docs/exceptions.md +1165 -0
  202. massgen/mcp_tools/docs/security.md +854 -0
  203. massgen/mcp_tools/exceptions.py +338 -0
  204. massgen/mcp_tools/hooks.py +212 -0
  205. massgen/mcp_tools/security.py +780 -0
  206. massgen/message_templates.py +342 -64
  207. massgen/orchestrator.py +1515 -241
  208. massgen/stream_chunk/__init__.py +35 -0
  209. massgen/stream_chunk/base.py +92 -0
  210. massgen/stream_chunk/multimodal.py +237 -0
  211. massgen/stream_chunk/text.py +162 -0
  212. massgen/tests/mcp_test_server.py +150 -0
  213. massgen/tests/multi_turn_conversation_design.md +0 -8
  214. massgen/tests/test_azure_openai_backend.py +156 -0
  215. massgen/tests/test_backend_capabilities.py +262 -0
  216. massgen/tests/test_backend_event_loop_all.py +179 -0
  217. massgen/tests/test_chat_completions_refactor.py +142 -0
  218. massgen/tests/test_claude_backend.py +15 -28
  219. massgen/tests/test_claude_code.py +268 -0
  220. massgen/tests/test_claude_code_context_sharing.py +233 -0
  221. massgen/tests/test_claude_code_orchestrator.py +175 -0
  222. massgen/tests/test_cli_backends.py +180 -0
  223. massgen/tests/test_code_execution.py +679 -0
  224. massgen/tests/test_external_agent_backend.py +134 -0
  225. massgen/tests/test_final_presentation_fallback.py +237 -0
  226. massgen/tests/test_gemini_planning_mode.py +351 -0
  227. massgen/tests/test_grok_backend.py +7 -10
  228. massgen/tests/test_http_mcp_server.py +42 -0
  229. massgen/tests/test_integration_simple.py +198 -0
  230. massgen/tests/test_mcp_blocking.py +125 -0
  231. massgen/tests/test_message_context_building.py +29 -47
  232. massgen/tests/test_orchestrator_final_presentation.py +48 -0
  233. massgen/tests/test_path_permission_manager.py +2087 -0
  234. massgen/tests/test_rich_terminal_display.py +14 -13
  235. massgen/tests/test_timeout.py +133 -0
  236. massgen/tests/test_v3_3agents.py +11 -12
  237. massgen/tests/test_v3_simple.py +8 -13
  238. massgen/tests/test_v3_three_agents.py +11 -18
  239. massgen/tests/test_v3_two_agents.py +8 -13
  240. massgen/token_manager/__init__.py +7 -0
  241. massgen/token_manager/token_manager.py +400 -0
  242. massgen/utils.py +52 -16
  243. massgen/v1/agent.py +45 -91
  244. massgen/v1/agents.py +18 -53
  245. massgen/v1/backends/gemini.py +50 -153
  246. massgen/v1/backends/grok.py +21 -54
  247. massgen/v1/backends/oai.py +39 -111
  248. massgen/v1/cli.py +36 -93
  249. massgen/v1/config.py +8 -12
  250. massgen/v1/logging.py +43 -127
  251. massgen/v1/main.py +18 -32
  252. massgen/v1/orchestrator.py +68 -209
  253. massgen/v1/streaming_display.py +62 -163
  254. massgen/v1/tools.py +8 -12
  255. massgen/v1/types.py +9 -23
  256. massgen/v1/utils.py +5 -23
  257. massgen-0.1.0.dist-info/METADATA +1245 -0
  258. massgen-0.1.0.dist-info/RECORD +273 -0
  259. massgen-0.1.0.dist-info/entry_points.txt +2 -0
  260. massgen/frontend/logging/__init__.py +0 -9
  261. massgen/frontend/logging/realtime_logger.py +0 -197
  262. massgen-0.0.3.dist-info/METADATA +0 -568
  263. massgen-0.0.3.dist-info/RECORD +0 -76
  264. massgen-0.0.3.dist-info/entry_points.txt +0 -2
  265. /massgen/backend/{Function calling openai responses.md → docs/Function calling openai responses.md} +0 -0
  266. {massgen-0.0.3.dist-info → massgen-0.1.0.dist-info}/WHEEL +0 -0
  267. {massgen-0.0.3.dist-info → massgen-0.1.0.dist-info}/licenses/LICENSE +0 -0
  268. {massgen-0.0.3.dist-info → massgen-0.1.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1245 @@
1
+ Metadata-Version: 2.4
2
+ Name: massgen
3
+ Version: 0.1.0
4
+ Summary: Multi-Agent Scaling System - A powerful framework for collaborative AI
5
+ Author-email: MassGen Team <contact@massgen.dev>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Leezekun/MassGen
8
+ Project-URL: Repository, https://github.com/Leezekun/MassGen
9
+ Project-URL: Bug Reports, https://github.com/Leezekun/MassGen/issues
10
+ Project-URL: Source, https://github.com/Leezekun/MassGen
11
+ Project-URL: Documentation, https://docs.massgen.io/en/latest/
12
+ Keywords: ai,multi-agent,collaboration,orchestration,llm,claude,gemini,gpt,xai
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: datasets==3.2.0
26
+ Requires-Dist: openai==2.2.0
27
+ Requires-Dist: xai-sdk==1.0.0
28
+ Requires-Dist: anthropic>=0.61.0
29
+ Requires-Dist: nest-asyncio==1.6.0
30
+ Requires-Dist: cerebras-cloud-sdk==1.46.0
31
+ Requires-Dist: lmstudio==1.4.1
32
+ Requires-Dist: wcwidth>=0.2.5
33
+ Requires-Dist: google-genai>=1.27.0
34
+ Requires-Dist: python-dotenv>=1.0.0
35
+ Requires-Dist: PyYAML>=6.0
36
+ Requires-Dist: rich==14.1.0
37
+ Requires-Dist: questionary>=2.0.0
38
+ Requires-Dist: requests>=2.31.0
39
+ Requires-Dist: typing-extensions>=4.0.0
40
+ Requires-Dist: claude-agent-sdk>=0.0.22
41
+ Requires-Dist: loguru>=0.7.0
42
+ Requires-Dist: mcp>=1.12.0
43
+ Requires-Dist: aiohttp>=3.8.0
44
+ Requires-Dist: fastmcp>=2.12.3
45
+ Requires-Dist: sphinx-rtd-theme>=3.0.2
46
+ Requires-Dist: sphinx-book-theme>=1.1.4
47
+ Requires-Dist: pillow>=11.3.0
48
+ Requires-Dist: ag2>=0.9.10
49
+ Requires-Dist: pyautogen>=0.10.0
50
+ Requires-Dist: vertexai>=1.71.1
51
+ Provides-Extra: dev
52
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
53
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
54
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
55
+ Requires-Dist: black>=23.0.0; extra == "dev"
56
+ Requires-Dist: isort>=5.12.0; extra == "dev"
57
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
58
+ Requires-Dist: mypy>=1.3.0; extra == "dev"
59
+ Requires-Dist: pre-commit>=3.0.0; extra == "dev"
60
+ Requires-Dist: bandit>=1.7.0; extra == "dev"
61
+ Requires-Dist: autoflake>=2.1.0; extra == "dev"
62
+ Requires-Dist: pyupgrade>=3.7.0; extra == "dev"
63
+ Provides-Extra: docs
64
+ Requires-Dist: sphinx>=7.0.0; extra == "docs"
65
+ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
66
+ Requires-Dist: myst-parser>=2.0.0; extra == "docs"
67
+ Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
68
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
69
+ Requires-Dist: sphinxcontrib-mermaid>=0.9.0; extra == "docs"
70
+ Requires-Dist: sphinx-autodoc-typehints>=1.24.0; extra == "docs"
71
+ Requires-Dist: sphinx-autoapi>=3.0.0; extra == "docs"
72
+ Requires-Dist: sphinx-design>=0.5.0; extra == "docs"
73
+ Requires-Dist: sphinx-tabs>=3.4.0; extra == "docs"
74
+ Requires-Dist: sphinx-togglebutton>=0.3.0; extra == "docs"
75
+ Requires-Dist: sphinx-inline-tabs>=2023.4.21; extra == "docs"
76
+ Requires-Dist: sphinxcontrib-lunrsearch>=0.4; extra == "docs"
77
+ Provides-Extra: docker
78
+ Requires-Dist: docker>=7.0.0; extra == "docker"
79
+ Provides-Extra: external
80
+ Requires-Dist: ag2>=0.9.10; extra == "external"
81
+ Provides-Extra: all
82
+ Dynamic: license-file
83
+
84
+ <p align="center">
85
+ <img src="assets/logo.png" alt="MassGen Logo" width="360" />
86
+ </p>
87
+
88
+ <p align="center">
89
+ <a href="https://www.python.org/downloads/">
90
+ <img src="https://img.shields.io/badge/python-3.11+-blue.svg" alt="Python 3.11+" style="margin-right: 5px;">
91
+ </a>
92
+ <a href="LICENSE">
93
+ <img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License" style="margin-right: 5px;">
94
+ </a>
95
+ <a href="https://docs.massgen.io">
96
+ <img src="https://img.shields.io/badge/docs-massgen.ai-blue.svg" alt="Documentation" style="margin-right: 5px;">
97
+ </a>
98
+ <a href="https://discord.massgen.ai">
99
+ <img src="https://img.shields.io/discord/1153072414184452236?color=7289da&label=chat&logo=discord&style=flat-square" alt="Join our Discord">
100
+ </a>
101
+ </p>
102
+
103
+ <h1 align="center">🚀 MassGen: Multi-Agent Scaling System for GenAI</h1>
104
+
105
+ <p align="center">
106
+ <i>MassGen is a cutting-edge multi-agent system that leverages the power of collaborative AI to solve complex tasks.</i>
107
+ </p>
108
+
109
+ <p align="center">
110
+ <a href="https://www.youtube.com/watch?v=Dp2oldJJImw">
111
+ <img src="assets/massgen-demo.gif" alt="MassGen case study -- Berkeley Agentic AI Summit Question" width="800">
112
+ </a>
113
+ </p>
114
+
115
+ <p align="center">
116
+ <i>Multi-agent scaling through intelligent collaboration in Grok Heavy style</i>
117
+ </p>
118
+
119
+ 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. The power of this "parallel study group" approach is exemplified by advanced systems like xAI's Grok Heavy and Google DeepMind's Gemini Deep Think.
120
+
121
+ This project started with the "threads of thought" and "iterative refinement" ideas presented in [The Myth of Reasoning](https://docs.ag2.ai/latest/docs/blog/2025/04/16/Reasoning/), and extends the classic "multi-agent conversation" idea in [AG2](https://github.com/ag2ai/ag2). Here is a [video recording](https://www.youtube.com/watch?v=xM2Uguw1UsQ) of the background context introduction presented at the Berkeley Agentic AI Summit 2025.
122
+
123
+ ---
124
+
125
+ ## 📋 Table of Contents
126
+
127
+ <details open>
128
+ <summary><h3>✨ Key Features</h3></summary>
129
+
130
+ - [Cross-Model/Agent Synergy](#-key-features-1)
131
+ - [Parallel Processing](#-key-features-1)
132
+ - [Intelligence Sharing](#-key-features-1)
133
+ - [Consensus Building](#-key-features-1)
134
+ - [Live Visualization](#-key-features-1)
135
+ </details>
136
+
137
+ <details open>
138
+ <summary><h3>🆕 Latest Features</h3></summary>
139
+
140
+ - [v0.1.0 Features](#-latest-features-v010)
141
+ </details>
142
+
143
+ <details open>
144
+ <summary><h3>🏗️ System Design</h3></summary>
145
+
146
+ - [System Architecture](#%EF%B8%8F-system-design-1)
147
+ - [Parallel Processing](#%EF%B8%8F-system-design-1)
148
+ - [Real-time Collaboration](#%EF%B8%8F-system-design-1)
149
+ - [Convergence Detection](#%EF%B8%8F-system-design-1)
150
+ - [Adaptive Coordination](#%EF%B8%8F-system-design-1)
151
+ </details>
152
+
153
+ <details open>
154
+ <summary><h3>🚀 Quick Start</h3></summary>
155
+
156
+ - [📥 Installation](#1--installation)
157
+ - [🔐 API Configuration](#2--api-configuration)
158
+ - [🧩 Supported Models and Tools](#3--supported-models-and-tools)
159
+ - [Models](#models)
160
+ - [Tools](#tools)
161
+ - [🏃 Run MassGen](#4--run-massgen)
162
+ - [CLI Configuration Parameters](#cli-configuration-parameters)
163
+ - [1. Single Agent (Easiest Start)](#1-single-agent-easiest-start)
164
+ - [2. Multi-Agent Collaboration (Recommended)](#2-multi-agent-collaboration-recommended)
165
+ - [3. Model Context Protocol (MCP)](#3-model-context-protocol-mcp)
166
+ - [4. File System Operations](#4-file-system-operations--workspace-management)
167
+ - [5. Project Integration (NEW in v0.0.21)](#5-project-integration--user-context-paths-new-in-v0021)
168
+ - [Backend Configuration Reference](#backend-configuration-reference)
169
+ - [Interactive Multi-Turn Mode](#interactive-multi-turn-mode)
170
+ - [📊 View Results](#5--view-results)
171
+ - [Real-time Display](#real-time-display)
172
+ - [Comprehensive Logging](#comprehensive-logging)
173
+ </details>
174
+
175
+ <details open>
176
+ <summary><h3>💡 Case Studies & Examples</h3></summary>
177
+
178
+ - [Case Studies](#-case-studies)
179
+ </details>
180
+
181
+ <details open>
182
+ <summary><h3>🗺️ Roadmap</h3></summary>
183
+
184
+ - Recent Achievements
185
+ - [v0.1.0](#recent-achievements-v010)
186
+ - [v0.0.3 - v0.0.32](#previous-achievements-v003---v0032)
187
+ - [Key Future Enhancements](#key-future-enhancements)
188
+ - Bug Fixes & Backend Improvements
189
+ - Advanced Agent Collaboration
190
+ - Expanded Model, Tool & Agent Integrations
191
+ - Improved Performance & Scalability
192
+ - Enhanced Developer Experience
193
+ - [v0.1.1 Roadmap](#v011-roadmap)
194
+ </details>
195
+
196
+ <details open>
197
+ <summary><h3>📚 Additional Resources</h3></summary>
198
+
199
+ - [🤝 Contributing](#-contributing)
200
+ - [📄 License](#-license)
201
+ - [⭐ Star History](#-star-history)
202
+ </details>
203
+
204
+ ---
205
+
206
+ ## ✨ Key Features
207
+
208
+ | Feature | Description |
209
+ |---------|-------------|
210
+ | **🤝 Cross-Model/Agent Synergy** | Harness strengths from diverse frontier model-powered agents |
211
+ | **⚡ Parallel Processing** | Multiple agents tackle problems simultaneously |
212
+ | **👥 Intelligence Sharing** | Agents share and learn from each other's work |
213
+ | **🔄 Consensus Building** | Natural convergence through collaborative refinement |
214
+ | **📊 Live Visualization** | See agents' working processes in real-time |
215
+
216
+ ---
217
+
218
+ ## 🆕 Latest Features (v0.1.0)
219
+
220
+ **🎉 Released: October 17, 2025**
221
+
222
+ **What's New in v0.1.0:**
223
+ - **📦 PyPI Package** - Official pip installation: `pip install massgen`
224
+ - **📖 Comprehensive Documentation** - Full Sphinx docs at [MassGen Official Documentation](https://docs.massgen.io/)
225
+ - **🎯 Interactive Setup Wizard** - Guided configuration for first-time users
226
+ - **🚀 Simplified Commands** - Clean `massgen` CLI with `@examples/` prefix for built-in configs
227
+
228
+ **Get Started with v0.1.0:**
229
+ ```bash
230
+ # Install from PyPI
231
+ pip install massgen
232
+
233
+ # Run the interactive setup wizard
234
+ massgen
235
+
236
+ # Start using with example configurations
237
+ massgen --config @examples/basic/multi/three_agents_default \
238
+ "Analyze the pros and cons of renewable energy"
239
+ ```
240
+
241
+ → [See full release history and examples](massgen/configs/README.md#release-history--examples)
242
+
243
+ ---
244
+
245
+ ## 🏗️ System Design
246
+
247
+ MassGen operates through an architecture designed for **seamless multi-agent collaboration**:
248
+
249
+ ```mermaid
250
+ graph TB
251
+ O[🚀 MassGen Orchestrator<br/>📋 Task Distribution & Coordination]
252
+
253
+ subgraph Collaborative Agents
254
+ A1[Agent 1<br/>🏗️ Anthropic/Claude + Tools]
255
+ A2[Agent 2<br/>🌟 Google/Gemini + Tools]
256
+ A3[Agent 3<br/>🤖 OpenAI/GPT + Tools]
257
+ A4[Agent 4<br/>⚡ xAI/Grok + Tools]
258
+ end
259
+
260
+ H[🔄 Shared Collaboration Hub<br/>📡 Real-time Notification & Consensus]
261
+
262
+ O --> A1 & A2 & A3 & A4
263
+ A1 & A2 & A3 & A4 <--> H
264
+
265
+ classDef orchestrator fill:#e1f5fe,stroke:#0288d1,stroke-width:3px
266
+ classDef agent fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
267
+ classDef hub fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
268
+
269
+ class O orchestrator
270
+ class A1,A2,A3,A4 agent
271
+ class H hub
272
+ ```
273
+
274
+ The system's workflow is defined by the following key principles:
275
+
276
+ **Parallel Processing** - Multiple agents tackle the same task simultaneously, each leveraging their unique capabilities (different models, tools, and specialized approaches).
277
+
278
+ **Real-time Collaboration** - Agents continuously share their working summaries and insights through a notification system, allowing them to learn from each other's approaches and build upon collective knowledge.
279
+
280
+ **Convergence Detection** - The system intelligently monitors when agents have reached stability in their solutions and achieved consensus through natural collaboration rather than forced agreement.
281
+
282
+ **Adaptive Coordination** - Agents can restart and refine their work when they receive new insights from others, creating a dynamic and responsive problem-solving environment.
283
+
284
+ This collaborative approach ensures that the final output leverages collective intelligence from multiple AI systems, leading to more robust and well-rounded results than any single agent could achieve alone.
285
+
286
+ ---
287
+
288
+ > 📖 **Complete Documentation:** For comprehensive guides, API reference, and detailed examples, visit **[MassGen Official Documentation](https://docs.massgen.io/)**
289
+
290
+ ---
291
+
292
+ ## 🚀 Quick Start
293
+
294
+ ### 1. 📥 Installation
295
+
296
+ **Method 1: PyPI Installation** (Recommended - Python 3.11+):
297
+
298
+ ```bash
299
+ # Install MassGen via pip
300
+ pip install massgen
301
+
302
+ # Or with uv (faster)
303
+ uv pip install massgen
304
+
305
+ # Run the interactive setup wizard
306
+ massgen
307
+ ```
308
+
309
+ The wizard will guide you through:
310
+ - Configuring API keys
311
+ - Selecting your use case (Research, Code, Q&A, etc.)
312
+ - Choosing AI models
313
+ - Saving your configuration
314
+
315
+ After setup, you can run MassGen with:
316
+ ```bash
317
+ # Interactive mode
318
+ massgen
319
+
320
+ # Single query
321
+ massgen "Your question here"
322
+
323
+ # With example configurations
324
+ massgen --config @examples/basic/multi/three_agents_default "Your question"
325
+ ```
326
+
327
+ → See [Installation Guide](https://docs.massgen.io/en/latest/quickstart/installation.html) for complete setup instructions.
328
+
329
+ **Method 2: Development Installation** (for contributors):
330
+
331
+ ```bash
332
+ # Clone the repository
333
+ git clone https://github.com/Leezekun/MassGen.git
334
+ cd MassGen
335
+
336
+ # Install in editable mode with pip
337
+ pip install -e .
338
+
339
+ # Or with uv (faster)
340
+ uv pip install -e .
341
+
342
+ # Optional: AG2 framework integration
343
+ pip install -e ".[external]"
344
+ ```
345
+
346
+ <details>
347
+ <summary><b>Alternative Installation Methods</b> (click to expand)</summary>
348
+
349
+ **Using uv with venv:**
350
+ ```bash
351
+ git clone https://github.com/Leezekun/MassGen.git
352
+ cd MassGen
353
+ uv venv
354
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
355
+ uv pip install -e .
356
+ ```
357
+
358
+ **Using traditional Python venv:**
359
+ ```bash
360
+ git clone https://github.com/Leezekun/MassGen.git
361
+ cd MassGen
362
+ python -m venv .venv
363
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
364
+ pip install -e .
365
+ ```
366
+
367
+ **Global installation with uv tool:**
368
+ ```bash
369
+ git clone https://github.com/Leezekun/MassGen.git
370
+ cd MassGen
371
+ uv tool install -e .
372
+ # Now run from any directory
373
+ uv tool run massgen --config @examples/basic/multi/three_agents_default "Question"
374
+ ```
375
+
376
+ **Backwards compatibility (uv run):**
377
+ ```bash
378
+ cd /path/to/MassGen
379
+ uv run massgen --config @examples/basic/multi/three_agents_default "Question"
380
+ uv run python -m massgen.cli --config config.yaml "Question"
381
+ ```
382
+
383
+ </details>
384
+
385
+ **Optional CLI Tools:**
386
+ ```bash
387
+ # Claude Code CLI - Advanced coding assistant
388
+ npm install -g @anthropic-ai/claude-code
389
+
390
+ # LM Studio - Local model inference
391
+ # MacOS/Linux:
392
+ sudo ~/.lmstudio/bin/lms bootstrap
393
+ # Windows:
394
+ cmd /c %USERPROFILE%\.lmstudio\bin\lms.exe bootstrap
395
+ ```
396
+
397
+ ### 2. 🔐 API Configuration
398
+
399
+ **Create a `.env` file in your working directory with your API keys:**
400
+
401
+ ```bash
402
+ # Copy this template to .env and add your API keys
403
+ OPENAI_API_KEY=sk-...
404
+ ANTHROPIC_API_KEY=sk-ant-...
405
+ GOOGLE_API_KEY=...
406
+ XAI_API_KEY=...
407
+
408
+ # Optional: Additional providers
409
+ CEREBRAS_API_KEY=...
410
+ TOGETHER_API_KEY=...
411
+ GROQ_API_KEY=...
412
+ OPENROUTER_API_KEY=...
413
+ ```
414
+
415
+ MassGen automatically loads API keys from `.env` in your current directory.
416
+
417
+ → **Complete setup guide with all providers:** See [API Key Configuration](https://docs.massgen.io/en/latest/quickstart/installation.html#api-key-configuration) in the docs
418
+
419
+ **Get API keys:**
420
+ - [OpenAI](https://platform.openai.com/api-keys) | [Claude](https://docs.anthropic.com/en/api/overview) | [Gemini](https://ai.google.dev/gemini-api/docs) | [Grok](https://docs.x.ai/docs/overview)
421
+ - [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/) | [Cerebras](https://inference-docs.cerebras.ai/introduction) | [More providers...](https://docs.massgen.io/en/latest/reference/supported_models.html)
422
+
423
+ ### 3. 🧩 Supported Models and Tools
424
+
425
+ #### Models
426
+
427
+ The system currently supports multiple model providers with advanced capabilities:
428
+
429
+ **API-based Models:**
430
+ - **Azure OpenAI** (NEW in v0.0.10): GPT-4, GPT-4o, GPT-3.5-turbo, GPT-4.1, GPT-5-chat
431
+ - **Cerebras AI**: GPT-OSS-120B...
432
+ - **Claude**: Claude Haiku 3.5, Claude Sonnet 4, Claude Opus 4...
433
+ - **Claude Code**: Native Claude Code SDK with comprehensive dev tools
434
+ - **Gemini**: Gemini 2.5 Flash, Gemini 2.5 Pro...
435
+ - **Grok**: Grok-4, Grok-3, Grok-3-mini...
436
+ - **OpenAI**: GPT-5 series (GPT-5, GPT-5-mini, GPT-5-nano)...
437
+ - **Together AI**, **Fireworks AI**, **Groq**, **Kimi/Moonshot**, **Nebius AI Studio**, **OpenRouter**, **POE**: LLaMA, Mistral, Qwen...
438
+ - **Z AI**: GLM-4.5
439
+
440
+ **Local Model Support:**
441
+ - **vLLM & SGLang** (ENHANCED in v0.0.25): Unified inference backend supporting both vLLM and SGLang servers
442
+ - Auto-detection between vLLM (port 8000) and SGLang (port 30000) servers
443
+ - Support for both vLLM and SGLang-specific parameters (top_k, repetition_penalty, separate_reasoning)
444
+ - Mixed server deployments with configuration example: `two_qwen_vllm_sglang.yaml`
445
+
446
+ - **LM Studio** (v0.0.7+): Run open-weight models locally with automatic server management
447
+ - Automatic LM Studio CLI installation
448
+ - Auto-download and loading of models
449
+ - Zero-cost usage reporting
450
+ - Support for LLaMA, Mistral, Qwen and other open-weight models
451
+
452
+ → For complete model list and configuration details, see [Supported Models](https://docs.massgen.io/en/latest/reference/supported_models.html)
453
+
454
+ #### Tools
455
+
456
+ MassGen agents can leverage various tools to enhance their problem-solving capabilities. Both API-based and CLI-based backends support different tool capabilities.
457
+
458
+ **Supported Built-in Tools by Backend:**
459
+
460
+ | Backend | Live Search | Code Execution | File Operations | MCP Support | Multimodal (Image/Audio/Video) | Advanced Features |
461
+ |---------|:-----------:|:--------------:|:---------------:|:-----------:|:----------:|:-----------------|
462
+ | **Azure OpenAI** (NEW in v0.0.10) | ❌ | ❌ | ❌ | ❌ | ❌ | Code interpreter, Azure deployment management |
463
+ | **Claude API** | ✅ | ✅ | ✅ | ✅ | ✅ | Web search, code interpreter, **MCP integration** |
464
+ | **Claude Code** | ✅ | ✅ | ✅ | ✅ | ✅<br/>*Image* | **Native Claude Code SDK, comprehensive dev tools, MCP integration** |
465
+ | **Gemini API** | ✅ | ✅ | ✅ | ✅ | ✅<br/>*Image* | Web search, code execution, **MCP integration**|
466
+ | **Grok API** | ✅ | ❌ | ✅ | ✅ | ❌ | Web search, **MCP integration** |
467
+ | **OpenAI API** | ✅ | ✅ | ✅ | ✅ | ✅<br/>*Image* | Web search, code interpreter, **MCP integration** |
468
+ | **ZAI API** | ❌ | ❌ | ✅ | ✅ | ❌ | **MCP integration** |
469
+
470
+ **Note:** Audio/video multimodal support (NEW in v0.0.30) is available through Chat Completions-based providers like OpenRouter and Qwen API. See configuration examples: [`single_openrouter_audio_understanding.yaml`](massgen/configs/basic/single/single_openrouter_audio_understanding.yaml), [`single_qwen_video_understanding.yaml`](massgen/configs/basic/single/single_qwen_video_understanding.yaml)
471
+
472
+ → For detailed backend capabilities and tool integration guides, see [User Guide - Backends](https://docs.massgen.io/en/latest/user_guide/backends.html)
473
+
474
+ ---
475
+
476
+ ### 4. 🏃 Run MassGen
477
+
478
+ > **Complete Usage Guide:** For all usage modes, advanced features, and interactive multi-turn sessions, see [Running MassGen](https://docs.massgen.io/en/latest/quickstart/running-massgen.html)
479
+
480
+ #### 🚀 Getting Started
481
+
482
+ #### CLI Configuration Parameters
483
+
484
+ | Parameter | Description |
485
+ |-------------------|-------------|
486
+ | `--config` | Path to YAML configuration file with agent definitions, model parameters, backend parameters and UI settings |
487
+ | `--backend` | Backend type for quick setup without a config file (`claude`, `claude_code`, `gemini`, `grok`, `openai`, `azure_openai`, `zai`). Optional for [models with default backends](massgen/utils.py).|
488
+ | `--model` | Model name for quick setup (e.g., `gemini-2.5-flash`, `gpt-5-nano`, ...). `--config` and `--model` are mutually exclusive - use one or the other. |
489
+ | `--system-message` | System prompt for the agent in quick setup mode. If `--config` is provided, `--system-message` is omitted. |
490
+ | `--no-display` | Disable real-time streaming UI coordination display (fallback to simple text output).|
491
+ | `--no-logs` | Disable real-time logging.|
492
+ | `--debug` | Enable debug mode with verbose logging (NEW in v0.0.13). Shows detailed orchestrator activities, agent messages, backend operations, and tool calls. Debug logs are saved to `agent_outputs/log_{time}/massgen_debug.log`. |
493
+ | `"<your question>"` | Optional single-question input; if omitted, MassGen enters interactive chat mode. |
494
+
495
+
496
+ #### **1. Single Agent (Easiest Start)**
497
+
498
+ **Quick Start Commands:**
499
+ ```bash
500
+ # Quick test with any supported model - no configuration needed
501
+ uv run python -m massgen.cli --model claude-3-5-sonnet-latest "What is machine learning?"
502
+ uv run python -m massgen.cli --model gemini-2.5-flash "Explain quantum computing"
503
+ uv run python -m massgen.cli --model gpt-5-nano "Summarize the latest AI developments"
504
+ ```
505
+
506
+ **Configuration:**
507
+
508
+ Use the `agent` field to define a single agent with its backend and settings:
509
+
510
+ ```yaml
511
+ agent:
512
+ id: "<agent_name>"
513
+ backend:
514
+ type: "azure_openai" | "chatcompletion" | "claude" | "claude_code" | "gemini" | "grok" | "openai" | "zai" | "lmstudio" #Type of backend
515
+ model: "<model_name>" # Model name
516
+ api_key: "<optional_key>" # API key for backend. Uses env vars by default.
517
+ system_message: "..." # System Message for Single Agent
518
+ ```
519
+
520
+ → [See all single agent configs](massgen/configs/basic/single/)
521
+
522
+
523
+ #### **2. Multi-Agent Collaboration (Recommended)**
524
+
525
+ **Configuration:**
526
+
527
+ Use the `agents` field to define multiple agents, each with its own backend and config:
528
+
529
+ **Quick Start Commands:**
530
+
531
+ ```bash
532
+ # Three powerful agents working together - Gemini, GPT-5, and Grok
533
+ massgen --config @examples/basic/multi/three_agents_default \
534
+ "Analyze the pros and cons of renewable energy"
535
+ ```
536
+
537
+ **This showcases MassGen's core strength:**
538
+ - **Gemini 2.5 Flash** - Fast research with web search
539
+ - **GPT-5 Nano** - Advanced reasoning with code execution
540
+ - **Grok-3 Mini** - Real-time information and alternative perspectives
541
+
542
+ ```yaml
543
+ agents: # Multiple agents (alternative to 'agent')
544
+ - id: "<agent1 name>"
545
+ backend:
546
+ type: "azure_openai" | "chatcompletion" | "claude" | "claude_code" | "gemini" | "grok" | "openai" | "zai" | "lmstudio" #Type of backend
547
+ model: "<model_name>" # Model name
548
+ api_key: "<optional_key>" # API key for backend. Uses env vars by default.
549
+ system_message: "..." # System Message for Single Agent
550
+ - id: "..."
551
+ backend:
552
+ type: "..."
553
+ model: "..."
554
+ ...
555
+ system_message: "..."
556
+ ```
557
+
558
+ → [Explore more multi-agent setups](massgen/configs/basic/multi/)
559
+
560
+
561
+ #### **3. Model context protocol (MCP)**
562
+
563
+ The [Model context protocol](https://modelcontextprotocol.io/) (MCP) standardises how applications expose tools and context to language models. From the official documentation:
564
+
565
+ >MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools.
566
+
567
+ **MCP Configuration Parameters:**
568
+
569
+ | Parameter | Type | Required | Description |
570
+ |-----------|------|----------|-------------|
571
+ | `mcp_servers` | dict | **Yes** (for MCP) | Container for MCP server definitions |
572
+ | └─ `type` | string | Yes | Transport: `"stdio"` or `"streamable-http"` |
573
+ | └─ `command` | string | stdio only | Command to run the MCP server |
574
+ | └─ `args` | list | stdio only | Arguments for the command |
575
+ | └─ `url` | string | http only | Server endpoint URL |
576
+ | └─ `env` | dict | No | Environment variables to pass |
577
+ | `allowed_tools` | list | No | Whitelist specific tools (if omitted, all tools available) |
578
+ | `exclude_tools` | list | No | Blacklist dangerous/unwanted tools |
579
+
580
+
581
+ **Quick Start Commands ([Check backend MCP support here](#tools)):**
582
+
583
+ ```bash
584
+ # Weather service with GPT-5
585
+ massgen --config @examples/tools/mcp/gpt5_nano_mcp_example \
586
+ "What's the weather forecast for New York this week?"
587
+
588
+ # Multi-tool MCP with Gemini - Search + Weather + Filesystem (Requires BRAVE_API_KEY in .env)
589
+ massgen --config @examples/tools/mcp/multimcp_gemini \
590
+ "Find the best restaurants in Paris and save the recommendations to a file"
591
+ ```
592
+
593
+ **Configuration:**
594
+
595
+ ```yaml
596
+ agents:
597
+ # Basic MCP Configuration:
598
+ backend:
599
+ type: "openai" # Your backend choice
600
+ model: "gpt-5-mini" # Your model choice
601
+
602
+ # Add MCP servers here
603
+ mcp_servers:
604
+ weather: # Server name (you choose this)
605
+ type: "stdio" # Communication type
606
+ command: "npx" # Command to run
607
+ args: ["-y", "@modelcontextprotocol/server-weather"] # MCP server package
608
+
609
+ # That's it! The agent can now check weather.
610
+
611
+ # Multiple MCP Tools Example:
612
+ backend:
613
+ type: "gemini"
614
+ model: "gemini-2.5-flash"
615
+ mcp_servers:
616
+ # Web search
617
+ search:
618
+ type: "stdio"
619
+ command: "npx"
620
+ args: ["-y", "@modelcontextprotocol/server-brave-search"]
621
+ env:
622
+ BRAVE_API_KEY: "${BRAVE_API_KEY}" # Set in .env file
623
+
624
+ # HTTP-based MCP server (streamable-http transport)
625
+ custodm_api:
626
+ type: "streamable-http" # For HTTP/SSE servers
627
+ url: "http://localhost:8080/mcp/sse" # Server endpoint
628
+
629
+
630
+ # Tool configuration (MCP tools are auto-discovered)
631
+ allowed_tools: # Optional: whitelist specific tools
632
+ - "mcp__weather__get_current_weather"
633
+ - "mcp__test_server__mcp_echo"
634
+ - "mcp__test_server__add_numbers"
635
+
636
+ exclude_tools: # Optional: blacklist specific tools
637
+ - "mcp__test_server__current_time"
638
+ ```
639
+
640
+ → [View more MCP examples](massgen/configs/tools/mcp/)
641
+
642
+ → For comprehensive MCP integration guide, see [MCP Integration](https://docs.massgen.io/en/latest/user_guide/mcp_integration.html)
643
+
644
+ #### **4. File System Operations & Workspace Management**
645
+
646
+ MassGen provides comprehensive file system support through multiple backends, enabling agents to read, write, and manipulate files in organized workspaces.
647
+
648
+
649
+ **Filesystem Configuration Parameters:**
650
+
651
+ | Parameter | Type | Required | Description |
652
+ |-----------|------|----------|-------------|
653
+ | `cwd` | string | **Yes** (for file ops) | Working directory for file operations (agent-specific workspace) |
654
+ | `snapshot_storage` | string | Yes | Directory for workspace snapshots |
655
+ | `agent_temporary_workspace` | string | Yes | Parent directory for temporary workspaces |
656
+
657
+
658
+ **Quick Start Commands:**
659
+
660
+ ```bash
661
+ # File operations with Claude Code
662
+ massgen --config @examples/tools/filesystem/claude_code_single \
663
+ "Create a Python web scraper and save results to CSV"
664
+
665
+ # Multi-agent file collaboration
666
+ massgen --config @examples/tools/filesystem/claude_code_context_sharing \
667
+ "Generate a comprehensive project report with charts and analysis"
668
+ ```
669
+
670
+ **Configuration:**
671
+
672
+ ```yaml
673
+ # Basic Workspace Setup:
674
+ agents:
675
+ - id: "file-agent"
676
+ backend:
677
+ type: "claude_code" # Backend with file support
678
+ model: "claude-sonnet-4" # Your model choice
679
+ cwd: "workspace" # Isolated workspace for file operations
680
+
681
+ # Multi-Agent Workspace Isolation:
682
+ agents:
683
+ - id: "agent_a"
684
+ backend:
685
+ type: "claude_code"
686
+ cwd: "workspace1" # Agent-specific workspace
687
+
688
+ - id: "agent_b"
689
+ backend:
690
+ type: "gemini"
691
+ cwd: "workspace2" # Separate workspace
692
+
693
+ orchestrator:
694
+ snapshot_storage: "snapshots" # Shared snapshots directory
695
+ agent_temporary_workspace: "temp_workspaces" # Temporary workspace management
696
+ ```
697
+ **Available File Operations:**
698
+ - **Claude Code**: Built-in tools (Read, Write, Edit, MultiEdit, Bash, Grep, Glob, LS, TodoWrite)
699
+ - **Other Backends**: Via [MCP Filesystem Server](https://github.com/modelcontextprotocol/servers/blob/main/src%2Ffilesystem%2FREADME.md)
700
+
701
+ **Workspace Management:**
702
+ - **Isolated Workspaces**: Each agent's `cwd` is fully isolated and writable
703
+ - **Snapshot Storage**: Share workspace context between Claude Code agents
704
+ - **Temporary Workspaces**: Agents can access previous coordination results
705
+
706
+ → [View more filesystem examples](massgen/configs/tools/filesystem/)
707
+
708
+ > ⚠️ **IMPORTANT SAFETY WARNING**
709
+ >
710
+ > MassGen agents can **autonomously read, write, modify, and delete files** within their permitted directories.
711
+ >
712
+ > **Before running MassGen with filesystem access:**
713
+ > - Only grant access to directories you're comfortable with agents modifying
714
+ > - Use the permission system to restrict write access where needed
715
+ > - Consider testing in an isolated directory or virtual environment first
716
+ > - Back up important files before granting write access
717
+ > - Review the `context_paths` configuration carefully
718
+ >
719
+ > The agents will execute file operations without additional confirmation once permissions are granted.
720
+
721
+ → For comprehensive file operations guide, see [File Operations](https://docs.massgen.io/en/latest/user_guide/file_operations.html)
722
+
723
+ #### **5. Project Integration & User Context Paths (NEW in v0.0.21)**
724
+
725
+ Work directly with your existing projects! User Context Paths allow you to share specific directories with all agents while maintaining granular permission control. This enables secure multi-agent collaboration on your real codebases, documentation, and data.
726
+
727
+ MassGen automatically organizes all its working files under a `.massgen/` directory in your project root, keeping your project clean and making it easy to exclude MassGen's temporary files from version control.
728
+
729
+ **Project Integration Parameters:**
730
+
731
+ | Parameter | Type | Required | Description |
732
+ |-----------|------|----------|-------------|
733
+ | `context_paths` | list | **Yes** (for project integration) | Shared directories for all agents |
734
+ | └─ `path` | string | Yes | Absolute or relative path to your project directory (**must be directory, not file**) |
735
+ | └─ `permission` | string | Yes | Access level: `"read"` or `"write"` (write applies only to final agent) |
736
+ | └─ `protected_paths` | list | No | Files/directories immune from modification (relative to context path) |
737
+
738
+ **⚠️ Important Notes:**
739
+ - Context paths must point to **directories**, not individual files
740
+ - Paths can be **absolute** or **relative** (resolved against current working directory)
741
+ - **Write permissions** apply only to the **final agent** during presentation phase
742
+ - During coordination, all context paths are **read-only** to protect your files
743
+ - MassGen validates all paths during startup and will show clear error messages for missing paths or file paths
744
+
745
+
746
+ **Quick Start Commands:**
747
+
748
+ ```bash
749
+ # Multi-agent collaboration to improve the website in `massgen/configs/resources/v0.0.21-example
750
+ massgen --config @examples/tools/filesystem/gpt5mini_cc_fs_context_path "Enhance the website with: 1) A dark/light theme toggle with smooth transitions, 2) An interactive feature that helps users engage with the blog content (your choice - could be search, filtering by topic, reading time estimates, social sharing, reactions, etc.), and 3) Visual polish with CSS animations or transitions that make the site feel more modern and responsive. Use vanilla JavaScript and be creative with the implementation details."
751
+ ```
752
+
753
+ **Configuration:**
754
+
755
+ ```yaml
756
+ # Basic Project Integration:
757
+ agents:
758
+ - id: "code-reviewer"
759
+ backend:
760
+ type: "claude_code"
761
+ cwd: "workspace" # Agent's isolated work area
762
+
763
+ orchestrator:
764
+ context_paths:
765
+ - path: "." # Current directory (relative path)
766
+ permission: "write" # Final agent can create/modify files
767
+ protected_paths: # Optional: files immune from modification
768
+ - ".env"
769
+ - "config.json"
770
+ - path: "/home/user/my-project/src" # Absolute path example
771
+ permission: "read" # Agents can analyze your code
772
+
773
+ # Advanced: Multi-Agent Project Collaboration
774
+ agents:
775
+ - id: "analyzer"
776
+ backend:
777
+ type: "gemini"
778
+ cwd: "analysis_workspace"
779
+
780
+ - id: "implementer"
781
+ backend:
782
+ type: "claude_code"
783
+ cwd: "implementation_workspace"
784
+
785
+ orchestrator:
786
+ context_paths:
787
+ - path: "../legacy-app/src" # Relative path to existing codebase
788
+ permission: "read" # Read existing codebase
789
+ - path: "../legacy-app/tests"
790
+ permission: "write" # Final agent can write new tests
791
+ protected_paths: # Protect specific test files
792
+ - "integration_tests/production_data_test.py"
793
+ - path: "/home/user/modernized-app" # Absolute path
794
+ permission: "write" # Final agent can create modernized version
795
+ ```
796
+
797
+ **This showcases project integration:**
798
+ - **Real Project Access** - Work with your actual codebases, not copies
799
+ - **Secure Permissions** - Granular control over what agents can read/modify
800
+ - **Multi-Agent Collaboration** - Multiple agents safely work on the same project
801
+ - **Context Agents** (during coordination): Always READ-only access to protect your files
802
+ - **Final Agent** (final execution): Gets the configured permission (READ or write)
803
+
804
+ **Use Cases:**
805
+ - **Code Review**: Agents analyze your source code and suggest improvements
806
+ - **Documentation**: Agents read project docs to understand context and generate updates
807
+ - **Data Processing**: Agents access shared datasets and generate analysis reports
808
+ - **Project Migration**: Agents examine existing projects and create modernized versions
809
+
810
+ **Clean Project Organization:**
811
+ ```
812
+ your-project/
813
+ ├── .massgen/ # All MassGen state
814
+ │ ├── sessions/ # Multi-turn conversation history (if using interactively)
815
+ │ │ └── session_20240101_143022/
816
+ │ │ ├── turn_1/ # Results from turn 1
817
+ │ │ ├── turn_2/ # Results from turn 2
818
+ │ │ └── SESSION_SUMMARY.txt # Human-readable summary
819
+ │ ├── workspaces/ # Agent working directories
820
+ │ │ ├── agent1/ # Individual agent workspaces
821
+ │ │ └── agent2/
822
+ │ ├── snapshots/ # Workspace snapshots for coordination
823
+ │ └── temp_workspaces/ # Previous turn results for context
824
+ ├── massgen/
825
+ └── ...
826
+ ```
827
+
828
+ **Benefits:**
829
+ - ✅ **Clean Projects** - All MassGen files contained in one directory
830
+ - ✅ **Easy Gitignore** - Just add `.massgen/` to `.gitignore`
831
+ - ✅ **Portable** - Move or delete `.massgen/` without affecting your project
832
+ - ✅ **Multi-Turn Sessions** - Conversation history preserved across sessions
833
+
834
+ **Configuration Auto-Organization:**
835
+ ```yaml
836
+ orchestrator:
837
+ # User specifies simple names - MassGen organizes under .massgen/
838
+ snapshot_storage: "snapshots" # → .massgen/snapshots/
839
+ session_storage: "sessions" # → .massgen/sessions/
840
+ agent_temporary_workspace: "temp" # → .massgen/temp/
841
+
842
+ agents:
843
+ - backend:
844
+ cwd: "workspace1" # → .massgen/workspaces/workspace1/
845
+ ```
846
+
847
+ → [Learn more about project integration](massgen/mcp_tools/permissions_and_context_files.md)
848
+
849
+ → For comprehensive project integration guide, see [Project Integration](https://docs.massgen.io/en/latest/user_guide/project_integration.html)
850
+
851
+ **Security Considerations:**
852
+ - **Agent ID Safety**: Avoid using agent+incremental digits for IDs (e.g., `agent1`, `agent2`). This may cause ID exposure during voting
853
+ - **File Access Control**: Restrict file access using MCP server configurations when needed
854
+ - **Path Validation**: All context paths are validated to ensure they exist and are directories (not files)
855
+ - **Directory-Only Context Paths**: Context paths must point to directories, not individual files
856
+
857
+ ---
858
+
859
+ #### Additional Examples by Provider
860
+
861
+ **Claude (Recursive MCP Execution - v0.0.20+)**
862
+ ```bash
863
+ # Claude with advanced tool chaining
864
+ massgen --config @examples/tools/mcp/claude_mcp_example \
865
+ "Research and compare weather in Beijing and Shanghai"
866
+ ```
867
+
868
+ **OpenAI (GPT-5 Series with MCP - v0.0.17+)**
869
+ ```bash
870
+ # GPT-5 with weather and external tools
871
+ massgen --config @examples/tools/mcp/gpt5_nano_mcp_example \
872
+ "What's the weather of Tokyo"
873
+ ```
874
+
875
+ **Gemini (Multi-Server MCP - v0.0.15+)**
876
+ ```bash
877
+ # Gemini with multiple MCP services
878
+ massgen --config @examples/tools/mcp/multimcp_gemini \
879
+ "Find accommodations in Paris with neighborhood analysis" # (requires BRAVE_API_KEY in .env)
880
+ ```
881
+
882
+ **Claude Code (Development Tools)**
883
+ ```bash
884
+ # Professional development environment with auto-configured workspace
885
+ uv run python -m massgen.cli \
886
+ --backend claude_code \
887
+ --model sonnet \
888
+ "Create a Flask web app with authentication"
889
+
890
+ # Default workspace directories created automatically:
891
+ # - workspace1/ (working directory)
892
+ # - snapshots/ (workspace snapshots)
893
+ # - temp_workspaces/ (temporary agent workspaces)
894
+ ```
895
+
896
+ **Local Models (LM Studio - v0.0.7+)**
897
+ ```bash
898
+ # Run open-source models locally
899
+ massgen --config @examples/providers/local/lmstudio \
900
+ "Explain machine learning concepts"
901
+ ```
902
+
903
+ → [Browse by provider](massgen/configs/providers/) | [Browse by tools](massgen/configs/tools/) | [Browse teams](massgen/configs/teams/)
904
+
905
+ #### Additional Use Case Examples
906
+
907
+ **Question Answering & Research:**
908
+ ```bash
909
+ # Complex research with multiple perspectives
910
+ massgen --config @examples/basic/multi/gemini_4o_claude \
911
+ "What's best to do in Stockholm in October 2025"
912
+
913
+ # Specific research requirements
914
+ massgen --config @examples/basic/multi/gemini_4o_claude \
915
+ "Give me all the talks on agent frameworks in Berkeley Agentic AI Summit 2025"
916
+ ```
917
+
918
+ **Creative Writing:**
919
+ ```bash
920
+ # Story generation with multiple creative agents
921
+ massgen --config @examples/basic/multi/gemini_4o_claude \
922
+ "Write a short story about a robot who discovers music"
923
+ ```
924
+
925
+ **Development & Coding:**
926
+ ```bash
927
+ # Full-stack development with file operations
928
+ massgen --config @examples/tools/filesystem/claude_code_single \
929
+ "Create a Flask web app with authentication"
930
+ ```
931
+
932
+ **Web Automation:** (still in test)
933
+ ```bash
934
+ # Browser automation with screenshots and reporting
935
+ # Prerequisites: npm install @playwright/mcp@latest (for Playwright MCP server)
936
+ massgen --config @examples/tools/code-execution/multi_agent_playwright_automation \
937
+ "Browse three issues in https://github.com/Leezekun/MassGen and suggest documentation improvements. Include screenshots and suggestions in a website."
938
+
939
+ # Data extraction and analysis
940
+ massgen --config @examples/tools/code-execution/multi_agent_playwright_automation \
941
+ "Navigate to https://news.ycombinator.com, extract the top 10 stories, and create a summary report"
942
+ ```
943
+
944
+ → [**See detailed case studies**](docs/case_studies/README.md) with real session logs and outcomes
945
+
946
+ #### Interactive Mode & Advanced Usage
947
+
948
+ **Multi-Turn Conversations:**
949
+ ```bash
950
+ # Start interactive chat (no initial question)
951
+ massgen --config @examples/basic/multi/three_agents_default
952
+
953
+ # Debug mode for troubleshooting
954
+ massgen --config @examples/basic/multi/three_agents_default \
955
+ --debug "Your question"
956
+ ```
957
+
958
+ ## Configuration Files
959
+
960
+ MassGen configurations are organized by features and use cases. See the [Configuration Guide](massgen/configs/README.md) for detailed organization and examples.
961
+
962
+ **Quick navigation:**
963
+ - **Basic setups**: [Single agent](massgen/configs/basic/single/) | [Multi-agent](massgen/configs/basic/multi/)
964
+ - **Tool integrations**: [MCP servers](massgen/configs/tools/mcp/) | [Web search](massgen/configs/tools/web-search/) | [Filesystem](massgen/configs/tools/filesystem/)
965
+ - **Provider examples**: [OpenAI](massgen/configs/providers/openai/) | [Claude](massgen/configs/providers/claude/) | [Gemini](massgen/configs/providers/gemini/)
966
+ - **Specialized teams**: [Creative](massgen/configs/teams/creative/) | [Research](massgen/configs/teams/research/) | [Development](massgen/configs/teams/development/)
967
+
968
+ See MCP server setup guides: [Discord MCP](massgen/configs/docs/DISCORD_MCP_SETUP.md) | [Twitter MCP](massgen/configs/docs/TWITTER_MCP_ENESCINAR_SETUP.md)
969
+
970
+ #### Backend Configuration Reference
971
+
972
+ For detailed configuration of all supported backends (OpenAI, Claude, Gemini, Grok, etc.), see:
973
+
974
+ → **[Backend Configuration Guide](massgen/configs/BACKEND_CONFIGURATION.md)**
975
+
976
+ #### Interactive Multi-Turn Mode
977
+
978
+ MassGen supports an interactive mode where you can have ongoing conversations with the system:
979
+
980
+ ```bash
981
+ # Start interactive mode with a single agent (no tool enabled by default)
982
+ uv run python -m massgen.cli --model gpt-5-mini
983
+
984
+ # Start interactive mode with configuration file
985
+ uv run python -m massgen.cli \
986
+ --config massgen/configs/basic/multi/three_agents_default.yaml
987
+ ```
988
+
989
+ **Interactive Mode Features:**
990
+ - **Multi-turn conversations**: Multiple agents collaborate to chat with you in an ongoing conversation
991
+ - **Real-time coordination tracking**: Live visualization of agent interactions, votes, and decision-making processes
992
+ - **Interactive coordination table**: Press `r` to view complete history of agent coordination events and state transitions
993
+ - **Real-time feedback**: Displays real-time agent and system status with enhanced coordination visualization
994
+ - **Clear conversation history**: Type `/clear` to reset the conversation and start fresh
995
+ - **Easy exit**: Type `/quit`, `/exit`, `/q`, or press `Ctrl+C` to stop
996
+
997
+ **Watch the recorded demo:**
998
+
999
+ [![MassGen Case Study](https://img.youtube.com/vi/h1R7fxFJ0Zc/0.jpg)](https://www.youtube.com/watch?v=h1R7fxFJ0Zc)
1000
+
1001
+ ### 5. 📊 View Results
1002
+
1003
+ The system provides multiple ways to view and analyze results:
1004
+
1005
+ #### Real-time Display
1006
+ - **Live Collaboration View**: See agents working in parallel through a multi-region terminal display
1007
+ - **Status Updates**: Real-time phase transitions, voting progress, and consensus building
1008
+ - **Streaming Output**: Watch agents' reasoning and responses as they develop
1009
+
1010
+ **Watch an example here:**
1011
+
1012
+ [![MassGen Case Study](https://img.youtube.com/vi/Dp2oldJJImw/0.jpg)](https://www.youtube.com/watch?v=Dp2oldJJImw)
1013
+
1014
+ #### Comprehensive Logging
1015
+
1016
+ All sessions are automatically logged with detailed information for debugging and analysis.
1017
+
1018
+ **Real-time Interaction:**
1019
+ - Press `r` during execution to view the coordination table in your terminal
1020
+ - Watch agents collaborate, vote, and reach consensus in real-time
1021
+
1022
+ ##### Logging Storage Structure
1023
+
1024
+ ```
1025
+ .massgen/
1026
+ └── massgen_logs/
1027
+ └── log_YYYYMMDD_HHMMSS/ # Timestamped log directory
1028
+ ├── agent_<id>/ # Agent-specific coordination logs
1029
+ │ └── YYYYMMDD_HHMMSS_NNNNNN/ # Timestamped coordination steps
1030
+ │ ├── answer.txt # Agent's answer at this step
1031
+ │ ├── context.txt # Context available to agent
1032
+ │ └── workspace/ # Agent workspace (if filesystem tools used)
1033
+ ├── agent_outputs/ # Consolidated output files
1034
+ │ ├── agent_<id>.txt # Complete output from each agent
1035
+ │ ├── final_presentation_agent_<id>.txt # Winning agent's final answer
1036
+ │ ├── final_presentation_agent_<id>_latest.txt # Symlink to latest
1037
+ │ └── system_status.txt # System status and metadata
1038
+ ├── final/ # Final presentation phase
1039
+ │ └── agent_<id>/ # Winning agent's final work
1040
+ │ ├── answer.txt # Final answer
1041
+ │ └── context.txt # Final context
1042
+ ├── coordination_events.json # Structured coordination events
1043
+ ├── coordination_table.txt # Human-readable coordination table
1044
+ ├── vote.json # Final vote tallies and consensus data
1045
+ ├── massgen.log # Complete debug log (or massgen_debug.log in debug mode)
1046
+ ├── snapshot_mappings.json # Workspace snapshot metadata
1047
+ └── execution_metadata.yaml # Query, config, and execution details
1048
+ ```
1049
+
1050
+ ##### Key Log Files
1051
+
1052
+ - **Coordination Table** (`coordination_table.txt`): Complete visualization of multi-agent coordination with event timeline, voting patterns, and consensus building
1053
+ - **Coordination Events** (`coordination_events.json`): Structured JSON log of all events (started_streaming, new_answer, vote, restart, final_answer)
1054
+ - **Vote Summary** (`vote.json`): Final vote tallies, winning agent, and consensus information
1055
+ - **Execution Metadata** (`execution_metadata.yaml`): Original query, timestamp, configuration, and execution context for reproducibility
1056
+ - **Agent Outputs** (`agent_outputs/`): Complete output history and final presentations from all agents
1057
+ - **Debug Log** (`massgen.log`): Complete system operations, API calls, tool usage, and error traces (use `--debug` for verbose logging)
1058
+
1059
+ → For comprehensive logging guide and debugging techniques, see [Logging & Debugging](https://docs.massgen.io/en/latest/user_guide/logging.html)
1060
+
1061
+ ## 💡 Case Studies
1062
+
1063
+ To see how MassGen works in practice, check out these detailed case studies based on real session logs:
1064
+
1065
+ - [**MassGen Case Studies**](docs/case_studies/README.md)
1066
+ - [**Case Studies Documentation**](https://docs.massgen.io/en/latest/examples/case_studies.html) - Browse case studies online
1067
+
1068
+ ---
1069
+
1070
+
1071
+ ## 🗺️ Roadmap
1072
+
1073
+ MassGen is currently in its foundational stage, with a focus on parallel, asynchronous multi-agent collaboration and orchestration. Our roadmap is centered on transforming this foundation into a highly robust, intelligent, and user-friendly system, while enabling frontier research and exploration. An earlier version of MassGen can be found [here](./massgen/v1).
1074
+
1075
+ ⚠️ **Early Stage Notice:** As MassGen is in active development, please expect upcoming breaking architecture changes as we continue to refine and improve the system.
1076
+
1077
+ ### Recent Achievements (v0.1.0)
1078
+
1079
+ **🎉 Released: October 17, 2025**
1080
+
1081
+ #### PyPI Package Release
1082
+ - **Official Distribution**: MassGen now available via `pip install massgen`
1083
+ - **Simplified Installation**: No need to clone repository for standard usage
1084
+ - **Global Access**: Run `massgen` command from any directory after pip install
1085
+
1086
+ #### Comprehensive Documentation
1087
+ - **Sphinx Documentation**: Full documentation site at [MassGen Official Documentation](https://docs.massgen.io/en/latest/)
1088
+ - **Complete User Guide**: Installation, configuration, usage modes, and API reference
1089
+ - **Case Studies**: Real-world examples with session logs and outcomes
1090
+ - **Structured Navigation**: Getting Started, User Guide, Reference, Examples, and Development sections
1091
+
1092
+ #### Interactive Setup Wizard
1093
+ - **Guided Configuration**: Step-by-step wizard for first-time users
1094
+ - **Use Case Presets**: Research, Code, Q&A, Data Analysis, and more
1095
+ - **API Key Management**: Centralized configuration in `~/.config/massgen/`
1096
+ - **Smart Defaults**: Auto-configured tools based on selected use case
1097
+
1098
+ #### Enhanced CLI Experience
1099
+ - **Simplified Commands**: Clean `massgen` command with intuitive syntax
1100
+ - **Built-in Examples**: `@examples/` prefix for instant access to configurations
1101
+ - **Backwards Compatibility**: Existing git clone workflows continue to work
1102
+
1103
+ ### Previous Achievements (v0.0.3 - v0.0.32)
1104
+
1105
+ ✅ **Docker Execution Mode (v0.0.32)**: Container-based isolation with secure command execution in isolated Docker containers preventing host filesystem access, persistent state management with packages and dependencies persisting across conversation turns, multi-agent support with dedicated isolated containers for each agent, configurable security with resource limits (CPU, memory), network isolation modes, and read-only volume mounts
1106
+
1107
+ ✅ **MCP Architecture Refactoring (v0.0.32)**: Simplified client with renamed `MultiMCPClient` to `MCPClient` reflecting streamlined architecture, code consolidation by removing deprecated modules and consolidating duplicate MCP protocol handling, improved maintainability with standardized type hints, enhanced error handling, and cleaner code organization
1108
+
1109
+ ✅ **Claude Code Docker Integration (v0.0.32)**: Automatic tool management with Bash tool automatically disabled in Docker mode routing commands through execute_command, MCP auto-permissions with automatic approval for MCP tools while preserving security validation, enhanced guidance with system messages preventing git repository confusion between host and container environments
1110
+
1111
+ ✅ **Universal Command Execution (v0.0.31)**: MCP-based execute_command tool works across Claude, Gemini, OpenAI, and Chat Completions providers, AG2-inspired security with permission management and command filtering, code execution in planning mode for safer coordination
1112
+
1113
+ ✅ **AG2 Group Chat Integration (v0.0.31)**: Multi-agent conversations using AG2's GroupChat and GroupChatManager frameworks, smart speaker selection (automatic, round-robin, manual) powered by LLMs, enhanced AG2 adapter supporting native group chat coordination
1114
+
1115
+ ✅ **Audio & Video Generation (v0.0.31)**: Audio tools for text-to-speech and transcription, video generation using OpenAI's Sora-2 API, multimodal expansion beyond text and images
1116
+
1117
+ ✅ **Multimodal Support Extension (v0.0.30)**: Audio and video processing for Chat Completions and Claude backends (WAV, MP3, MP4, AVI, MOV, WEBM formats), flexible media input via local paths or URLs, extended base64 encoding for audio/video files, configurable file size limits
1118
+
1119
+ ✅ **Claude Agent SDK Migration (v0.0.30)**: Package migration from `claude-code-sdk` to `claude-agent-sdk>=0.0.22`, improved bash tool permission validation, enhanced system message handling
1120
+
1121
+ ✅ **Qwen API Integration (v0.0.30)**: Added Qwen API provider to Chat Completions ecosystem with `QWEN_API_KEY` support, video understanding configuration examples
1122
+
1123
+ ✅ **MCP Planning Mode (v0.0.29)**: Strategic planning coordination strategy for safer MCP tool usage, multi-backend support (Response API, Chat Completions, Gemini), agents plan without execution during coordination, 5 planning mode configurations
1124
+
1125
+ ✅ **File Operation Safety (v0.0.29)**: Read-before-delete enforcement with `FileOperationTracker` class, `PathPermissionManager` integration with operation tracking methods, enhanced file operation safety mechanisms
1126
+
1127
+ ✅ **AG2 Framework Integration (v0.0.28)**: Adapter system for external agent frameworks, AG2 ConversableAgent and AssistantAgent support with async execution, code execution in multiple environments (Local, Docker, Jupyter, YepCode), 4 ready-to-use AG2 configurations
1128
+
1129
+ ✅ **Multimodal Support - Image Processing (v0.0.27)**: New `stream_chunk` module for multimodal content, image generation and understanding capabilities, file upload and search for document Q&A, Claude Sonnet 4.5 support, enhanced workspace multimodal tools
1130
+
1131
+ ✅ **File Deletion and Workspace Management (v0.0.26)**: New MCP tools (`delete_file`, `delete_files_batch`, `compare_directories`, `compare_files`) for workspace cleanup and file comparison, consolidated `_workspace_tools_server.py`, enhanced path permission manager
1132
+
1133
+ ✅ **Protected Paths and File-Based Context Paths (v0.0.26)**: Protect specific files within write-permitted directories, grant access to individual files instead of entire directories
1134
+
1135
+ ✅ **Multi-Turn Filesystem Support (v0.0.25)**: Multi-turn conversation support with persistent context across turns, automatic `.massgen` directory structure, workspace snapshots and restoration, enhanced path permission system with smart exclusions, and comprehensive backend improvements
1136
+
1137
+ ✅ **SGLang Backend Integration (v0.0.25)**: Unified vLLM/SGLang backend with auto-detection, support for SGLang-specific parameters like `separate_reasoning`, and dual server support for mixed vLLM and SGLang deployments
1138
+
1139
+ ✅ **vLLM Backend Support (v0.0.24)**: Complete integration with vLLM for high-performance local model serving, POE provider support, GPT-5-Codex model recognition, backend utility modules refactoring, and comprehensive bug fixes including streaming chunk processing
1140
+
1141
+ ✅ **Backend Architecture Refactoring (v0.0.23)**: Major code consolidation with new `base_with_mcp.py` class reducing ~1,932 lines across backends, extracted formatter module for better code organization, and improved maintainability through unified MCP integration
1142
+
1143
+ ✅ **Workspace Copy Tools via MCP (v0.0.22)**: Seamless file copying capabilities between workspaces, configuration organization with hierarchical structure, and enhanced file operations for large-scale collaboration
1144
+
1145
+ ✅ **Grok MCP Integration (v0.0.21)**: Unified backend architecture with full MCP server support, filesystem capabilities through MCP servers, and enhanced configuration files
1146
+
1147
+ ✅ **Claude Backend MCP Support (v0.0.20)**: Extended MCP integration to Claude backend, full MCP protocol and filesystem support, robust error handling, and comprehensive documentation
1148
+
1149
+ ✅ **Comprehensive Coordination Tracking (v0.0.19)**: Complete coordination tracking and visualization system with event-based tracking, interactive coordination table display, and advanced debugging capabilities for multi-agent collaboration patterns
1150
+
1151
+ ✅ **Comprehensive MCP Integration (v0.0.18)**: Extended MCP to all Chat Completions backends (Cerebras AI, Together AI, Fireworks AI, Groq, Nebius AI Studio, OpenRouter), cross-provider function calling compatibility, 9 new MCP configuration examples
1152
+
1153
+ ✅ **OpenAI MCP Integration (v0.0.17)**: Extended MCP (Model Context Protocol) support to OpenAI backend with full tool discovery and execution capabilities for GPT models, unified MCP architecture across multiple backends, and enhanced debugging
1154
+
1155
+ ✅ **Unified Filesystem Support with MCP Integration (v0.0.16)**: Complete `FilesystemManager` class providing unified filesystem access for Gemini and Claude Code backends, with MCP-based operations for file manipulation and cross-agent collaboration
1156
+
1157
+ ✅ **MCP Integration Framework (v0.0.15)**: Complete MCP implementation for Gemini backend with multi-server support, circuit breaker patterns, and comprehensive security framework
1158
+
1159
+ ✅ **Enhanced Logging (v0.0.14)**: Improved logging system for better agents' answer debugging, new final answer directory structure, and detailed architecture documentation
1160
+
1161
+ ✅ **Unified Logging System (v0.0.13)**: Centralized logging infrastructure with debug mode and enhanced terminal display formatting
1162
+
1163
+ ✅ **Windows Platform Support (v0.0.13)**: Windows platform compatibility with improved path handling and process management
1164
+
1165
+ ✅ **Enhanced Claude Code Agent Context Sharing (v0.0.12)**: Claude Code agents now share workspace context by maintaining snapshots and temporary workspace in orchestrator's side
1166
+
1167
+ ✅ **Documentation Improvement (v0.0.12)**: Updated README with current features and improved setup instructions
1168
+
1169
+ ✅ **Custom System Messages (v0.0.11)**: Enhanced system message configuration and preservation with backend-specific system prompt customization
1170
+
1171
+ ✅ **Claude Code Backend Enhancements (v0.0.11)**: Improved integration with better system message handling, JSON response parsing, and coordination action descriptions
1172
+
1173
+ ✅ **Azure OpenAI Support (v0.0.10)**: Integration with Azure OpenAI services including GPT-4.1 and GPT-5-chat models with async streaming
1174
+
1175
+ ✅ **MCP (Model Context Protocol) Support (v0.0.9)**: Integration with MCP for advanced tool capabilities in Claude Code Agent, including Discord and Twitter integration
1176
+
1177
+ ✅ **Timeout Management System (v0.0.8)**: Orchestrator-level timeout with graceful fallback and enhanced error messages
1178
+
1179
+ ✅ **Local Model Support (v0.0.7)**: Complete LM Studio integration for running open-weight models locally with automatic server management
1180
+
1181
+ ✅ **GPT-5 Series Integration (v0.0.6)**: Support for OpenAI's GPT-5, GPT-5-mini, GPT-5-nano with advanced reasoning parameters
1182
+
1183
+ ✅ **Claude Code Integration (v0.0.5)**: Native Claude Code backend with streaming capabilities and tool support
1184
+
1185
+ ✅ **GLM-4.5 Model Support (v0.0.4)**: Integration with ZhipuAI's GLM-4.5 model family
1186
+
1187
+ ✅ **Foundation Architecture (v0.0.3)**: Complete multi-agent orchestration system with async streaming, builtin tools, and multi-backend support
1188
+
1189
+ ✅ **Extended Provider Ecosystem**: Support for 15+ providers including Cerebras AI, Together AI, Fireworks AI, Groq, Nebius AI Studio, and OpenRouter
1190
+
1191
+ ### Key Future Enhancements
1192
+
1193
+ - **Bug Fixes & Backend Improvements:** Fixing image generation path issues and adding Claude multimodal support
1194
+ - **Advanced Agent Collaboration:** Exploring improved communication patterns and consensus-building protocols to improve agent synergy
1195
+ - **Expanded Model Integration:** Adding support for more frontier models and local inference engines
1196
+ - **Improved Performance & Scalability:** Optimizing the streaming and logging mechanisms for better performance and resource management
1197
+ - **Enhanced Developer Experience:** Completing tool registration system and web interface for better visualization
1198
+
1199
+ We welcome community contributions to achieve these goals.
1200
+
1201
+ ### v0.1.1 Roadmap
1202
+
1203
+ Version 0.1.1 focuses on developer experience improvements and PyPI distribution:
1204
+
1205
+ #### Required Features
1206
+ - **Configuration Builder CLI**: Interactive command-line tool for generating and validating MassGen configurations
1207
+ - **PyPI Package Release v0.1.0**: Official PyPI package representing new usage paradigm with easy pip installation
1208
+
1209
+ #### Optional Features
1210
+ - **Nested Chat Integration**: Complete AG2 nested chat pattern support for hierarchical agent conversations
1211
+ - **DSPy Integration**: Framework integration for prompt optimization and systematic agent improvement
1212
+
1213
+ Key technical approach:
1214
+ - **Config Builder**: Interactive prompts, configuration templates, validation and error checking, preset support
1215
+ - **PyPI Package**: Production-ready distribution with proper dependencies, documentation, and migration guide
1216
+ - **Nested Chat**: AG2 integration for hierarchical conversations with parent-child agent relationships
1217
+ - **DSPy**: Prompt optimization, performance tuning, and systematic agent improvement workflows
1218
+
1219
+ For detailed milestones and technical specifications, see the [full v0.1.1 roadmap](ROADMAP.md).
1220
+
1221
+ ---
1222
+
1223
+ ## 🤝 Contributing
1224
+
1225
+ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
1226
+
1227
+ ---
1228
+
1229
+ ## 📄 License
1230
+
1231
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
1232
+
1233
+ ---
1234
+
1235
+ <div align="center">
1236
+
1237
+ **⭐ Star this repo if you find it useful! ⭐**
1238
+
1239
+ Made with ❤️ by the MassGen team
1240
+
1241
+ </div>
1242
+
1243
+ ## ⭐ Star History
1244
+
1245
+ [![Star History Chart](https://api.star-history.com/svg?repos=Leezekun/MassGen&type=Date)](https://www.star-history.com/#Leezekun/MassGen&Date)