massgen 0.1.0a2__py3-none-any.whl → 0.1.1__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.
- massgen/__init__.py +1 -1
- massgen/agent_config.py +17 -0
- massgen/api_params_handler/_api_params_handler_base.py +1 -0
- massgen/api_params_handler/_chat_completions_api_params_handler.py +8 -1
- massgen/api_params_handler/_claude_api_params_handler.py +8 -1
- massgen/api_params_handler/_gemini_api_params_handler.py +73 -0
- massgen/api_params_handler/_response_api_params_handler.py +8 -1
- massgen/backend/base.py +31 -0
- massgen/backend/{base_with_mcp.py → base_with_custom_tool_and_mcp.py} +282 -11
- massgen/backend/chat_completions.py +182 -92
- massgen/backend/claude.py +115 -18
- massgen/backend/claude_code.py +378 -14
- massgen/backend/docs/CLAUDE_API_RESEARCH.md +3 -3
- massgen/backend/gemini.py +1275 -1607
- massgen/backend/gemini_mcp_manager.py +545 -0
- massgen/backend/gemini_trackers.py +344 -0
- massgen/backend/gemini_utils.py +43 -0
- massgen/backend/response.py +129 -70
- massgen/cli.py +643 -132
- massgen/config_builder.py +381 -32
- massgen/configs/README.md +111 -80
- massgen/configs/basic/multi/three_agents_default.yaml +1 -1
- massgen/configs/basic/single/single_agent.yaml +1 -1
- massgen/configs/providers/openai/gpt5_nano.yaml +3 -3
- massgen/configs/tools/custom_tools/claude_code_custom_tool_example.yaml +32 -0
- massgen/configs/tools/custom_tools/claude_code_custom_tool_example_no_path.yaml +28 -0
- massgen/configs/tools/custom_tools/claude_code_custom_tool_with_mcp_example.yaml +40 -0
- massgen/configs/tools/custom_tools/claude_code_custom_tool_with_wrong_mcp_example.yaml +38 -0
- massgen/configs/tools/custom_tools/claude_code_wrong_custom_tool_with_mcp_example.yaml +38 -0
- massgen/configs/tools/custom_tools/claude_custom_tool_example.yaml +24 -0
- massgen/configs/tools/custom_tools/claude_custom_tool_example_no_path.yaml +22 -0
- massgen/configs/tools/custom_tools/claude_custom_tool_with_mcp_example.yaml +35 -0
- massgen/configs/tools/custom_tools/claude_custom_tool_with_wrong_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/claude_wrong_custom_tool_with_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/gemini_custom_tool_example.yaml +24 -0
- massgen/configs/tools/custom_tools/gemini_custom_tool_example_no_path.yaml +22 -0
- massgen/configs/tools/custom_tools/gemini_custom_tool_with_mcp_example.yaml +35 -0
- massgen/configs/tools/custom_tools/gemini_custom_tool_with_wrong_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/gemini_wrong_custom_tool_with_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/github_issue_market_analysis.yaml +94 -0
- massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_example.yaml +24 -0
- massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_example_no_path.yaml +22 -0
- massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_mcp_example.yaml +35 -0
- massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_wrong_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/gpt5_nano_wrong_custom_tool_with_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/gpt_oss_custom_tool_example.yaml +25 -0
- massgen/configs/tools/custom_tools/gpt_oss_custom_tool_example_no_path.yaml +23 -0
- massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_mcp_example.yaml +34 -0
- massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_wrong_mcp_example.yaml +34 -0
- massgen/configs/tools/custom_tools/gpt_oss_wrong_custom_tool_with_mcp_example.yaml +34 -0
- massgen/configs/tools/custom_tools/grok3_mini_custom_tool_example.yaml +24 -0
- massgen/configs/tools/custom_tools/grok3_mini_custom_tool_example_no_path.yaml +22 -0
- massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_mcp_example.yaml +35 -0
- massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_wrong_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/grok3_mini_wrong_custom_tool_with_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/qwen_api_custom_tool_example.yaml +25 -0
- massgen/configs/tools/custom_tools/qwen_api_custom_tool_example_no_path.yaml +23 -0
- massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_mcp_example.yaml +36 -0
- massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_wrong_mcp_example.yaml +34 -0
- massgen/configs/tools/custom_tools/qwen_api_wrong_custom_tool_with_mcp_example.yaml +34 -0
- massgen/configs/tools/custom_tools/qwen_local_custom_tool_example.yaml +24 -0
- massgen/configs/tools/custom_tools/qwen_local_custom_tool_example_no_path.yaml +22 -0
- massgen/configs/tools/custom_tools/qwen_local_custom_tool_with_mcp_example.yaml +35 -0
- massgen/configs/tools/custom_tools/qwen_local_custom_tool_with_wrong_mcp_example.yaml +33 -0
- massgen/configs/tools/custom_tools/qwen_local_wrong_custom_tool_with_mcp_example.yaml +33 -0
- massgen/configs/tools/filesystem/claude_code_context_sharing.yaml +1 -1
- massgen/configs/voting/gemini_gpt_voting_sensitivity.yaml +67 -0
- massgen/formatter/_chat_completions_formatter.py +104 -0
- massgen/formatter/_claude_formatter.py +120 -0
- massgen/formatter/_gemini_formatter.py +448 -0
- massgen/formatter/_response_formatter.py +88 -0
- massgen/frontend/coordination_ui.py +4 -2
- massgen/logger_config.py +35 -3
- massgen/message_templates.py +56 -6
- massgen/orchestrator.py +179 -10
- massgen/stream_chunk/base.py +3 -0
- massgen/tests/custom_tools_example.py +392 -0
- massgen/tests/mcp_test_server.py +17 -7
- massgen/tests/test_config_builder.py +423 -0
- massgen/tests/test_custom_tools.py +401 -0
- massgen/tests/test_tools.py +127 -0
- massgen/tool/README.md +935 -0
- massgen/tool/__init__.py +39 -0
- massgen/tool/_async_helpers.py +70 -0
- massgen/tool/_basic/__init__.py +8 -0
- massgen/tool/_basic/_two_num_tool.py +24 -0
- massgen/tool/_code_executors/__init__.py +10 -0
- massgen/tool/_code_executors/_python_executor.py +74 -0
- massgen/tool/_code_executors/_shell_executor.py +61 -0
- massgen/tool/_exceptions.py +39 -0
- massgen/tool/_file_handlers/__init__.py +10 -0
- massgen/tool/_file_handlers/_file_operations.py +218 -0
- massgen/tool/_manager.py +634 -0
- massgen/tool/_registered_tool.py +88 -0
- massgen/tool/_result.py +66 -0
- massgen/tool/_self_evolution/_github_issue_analyzer.py +369 -0
- massgen/tool/docs/builtin_tools.md +681 -0
- massgen/tool/docs/exceptions.md +794 -0
- massgen/tool/docs/execution_results.md +691 -0
- massgen/tool/docs/manager.md +887 -0
- massgen/tool/docs/workflow_toolkits.md +529 -0
- massgen/tool/workflow_toolkits/__init__.py +57 -0
- massgen/tool/workflow_toolkits/base.py +55 -0
- massgen/tool/workflow_toolkits/new_answer.py +126 -0
- massgen/tool/workflow_toolkits/vote.py +167 -0
- {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/METADATA +89 -131
- {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/RECORD +111 -36
- {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/WHEEL +0 -0
- {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/entry_points.txt +0 -0
- {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/top_level.txt +0 -0
massgen/configs/README.md
CHANGED
|
@@ -48,7 +48,7 @@ massgen/configs/
|
|
|
48
48
|
**Best starting point for multi-agent collaboration:**
|
|
49
49
|
```bash
|
|
50
50
|
# Three powerful agents (Gemini, GPT-5, Grok) with enhanced workspace tools
|
|
51
|
-
|
|
51
|
+
massgen --config @examples/basic/multi/three_agents_default "Your complex task"
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
This configuration combines:
|
|
@@ -61,25 +61,25 @@ This configuration combines:
|
|
|
61
61
|
**Single agent with model name only:**
|
|
62
62
|
```bash
|
|
63
63
|
# Quick test with any supported model - no configuration needed
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
massgen --model claude-3-5-sonnet-latest "What is machine learning?"
|
|
65
|
+
massgen --model gemini-2.5-flash "Explain quantum computing"
|
|
66
|
+
massgen --model gpt-5-nano "Summarize the latest AI developments"
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
**Interactive Mode:**
|
|
70
70
|
```bash
|
|
71
71
|
# Start interactive chat (no initial question)
|
|
72
|
-
|
|
72
|
+
massgen --config @examples/basic/multi/three_agents_default
|
|
73
73
|
|
|
74
74
|
# Debug mode for troubleshooting
|
|
75
|
-
|
|
75
|
+
massgen --config @examples/basic/multi/three_agents_default --debug "Your question"
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
### Basic Usage
|
|
79
79
|
|
|
80
80
|
For simple single-agent setups:
|
|
81
81
|
```bash
|
|
82
|
-
|
|
82
|
+
massgen --config @examples/basic/single/single_agent "Your question"
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
### Tool-Enabled Configurations
|
|
@@ -88,32 +88,33 @@ uv run python -m massgen.cli --config massgen/configs/basic/single/single_agent.
|
|
|
88
88
|
MCP enables agents to use external tools and services:
|
|
89
89
|
```bash
|
|
90
90
|
# Weather queries
|
|
91
|
-
|
|
91
|
+
massgen --config @examples/tools/mcp/gemini_mcp_example "What's the weather in Tokyo?"
|
|
92
92
|
|
|
93
93
|
# Discord integration
|
|
94
|
-
|
|
94
|
+
massgen --config @examples/tools/mcp/claude_code_discord_mcp_example "Extract latest messages"
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
#### Web Search
|
|
98
98
|
For agents with web search capabilities:
|
|
99
99
|
```bash
|
|
100
|
-
|
|
100
|
+
massgen --config @examples/tools/web-search/claude_streamable_http_test "Search for latest news"
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
#### Code Execution
|
|
104
104
|
For code interpretation and execution:
|
|
105
105
|
```bash
|
|
106
|
-
|
|
106
|
+
massgen --config @examples/tools/code-execution/multi_agent_playwright_automation \
|
|
107
|
+
"Browse three issues in https://github.com/Leezekun/MassGen and suggest documentation improvements. Include screenshots and suggestions in a website."
|
|
107
108
|
```
|
|
108
109
|
|
|
109
110
|
#### Filesystem Operations
|
|
110
111
|
For file manipulation, workspace management, and copy tools:
|
|
111
112
|
```bash
|
|
112
113
|
# Single agent with enhanced file operations
|
|
113
|
-
|
|
114
|
+
massgen --config @examples/tools/filesystem/claude_code_single "Analyze this codebase"
|
|
114
115
|
|
|
115
116
|
# Multi-agent workspace collaboration with copy tools (NEW in v0.0.22)
|
|
116
|
-
|
|
117
|
+
massgen --config @examples/tools/filesystem/claude_code_context_sharing "Create shared workspace files"
|
|
117
118
|
```
|
|
118
119
|
|
|
119
120
|
### Provider-Specific Examples
|
|
@@ -122,22 +123,22 @@ Each provider has unique features and capabilities:
|
|
|
122
123
|
|
|
123
124
|
#### OpenAI (GPT-5 Series)
|
|
124
125
|
```bash
|
|
125
|
-
|
|
126
|
+
massgen --config @examples/providers/openai/gpt5 "Complex reasoning task"
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
#### Claude
|
|
129
130
|
```bash
|
|
130
|
-
|
|
131
|
+
massgen --config @examples/providers/claude/claude_mcp_example "Creative writing task"
|
|
131
132
|
```
|
|
132
133
|
|
|
133
134
|
#### Gemini
|
|
134
135
|
```bash
|
|
135
|
-
|
|
136
|
+
massgen --config @examples/providers/gemini/gemini_mcp_example "Research task"
|
|
136
137
|
```
|
|
137
138
|
|
|
138
139
|
#### Local Models
|
|
139
140
|
```bash
|
|
140
|
-
|
|
141
|
+
massgen --config @examples/providers/local/lmstudio "Run with local model"
|
|
141
142
|
```
|
|
142
143
|
|
|
143
144
|
### Pre-Configured Teams
|
|
@@ -146,17 +147,17 @@ Teams are specialized multi-agent setups for specific domains:
|
|
|
146
147
|
|
|
147
148
|
#### Creative Teams
|
|
148
149
|
```bash
|
|
149
|
-
|
|
150
|
+
massgen --config @examples/teams/creative/creative_team "Write a story"
|
|
150
151
|
```
|
|
151
152
|
|
|
152
153
|
#### Research Teams
|
|
153
154
|
```bash
|
|
154
|
-
|
|
155
|
+
massgen --config @examples/teams/research/research_team "Analyze market trends"
|
|
155
156
|
```
|
|
156
157
|
|
|
157
158
|
#### Development Teams
|
|
158
159
|
```bash
|
|
159
|
-
|
|
160
|
+
massgen --config @examples/teams/development/zai_coding_team "Build a web app"
|
|
160
161
|
```
|
|
161
162
|
|
|
162
163
|
## Configuration File Format
|
|
@@ -219,14 +220,69 @@ backend:
|
|
|
219
220
|
|
|
220
221
|
## Environment Variables
|
|
221
222
|
|
|
222
|
-
Most configurations use environment variables for API keys:
|
|
223
|
+
Most configurations use environment variables for API keys:so
|
|
223
224
|
- Set up your `.env` file based on `.env.example`
|
|
224
225
|
- Provider-specific keys: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.
|
|
225
226
|
- MCP server keys: `DISCORD_BOT_TOKEN`, `BRAVE_API_KEY`, etc.
|
|
226
227
|
|
|
227
228
|
## Release History & Examples
|
|
228
229
|
|
|
229
|
-
### v0.
|
|
230
|
+
### v0.1.1 - Latest
|
|
231
|
+
**New Features:** Custom Tools System, Voting Sensitivity Controls, Interactive Configuration Builder, Backend Enhancements, Self-Evolution
|
|
232
|
+
|
|
233
|
+
**Configuration Files:**
|
|
234
|
+
- `massgen/configs/tools/custom_tools/` - 40+ custom tool examples (calculator, weather, data processing)
|
|
235
|
+
- `massgen/configs/tools/custom_tools/github_issue_market_analysis.yaml` - GitHub issue market analysis with custom tools
|
|
236
|
+
- `massgen/configs/voting/gemini_gpt_voting_sensitivity.yaml` - Voting sensitivity demonstration
|
|
237
|
+
|
|
238
|
+
**Case Study:**
|
|
239
|
+
- [Custom Tools with GitHub Issue Market Analysis](../../docs/case_studies/github-issue-market-analysis.md)
|
|
240
|
+
|
|
241
|
+
**Key Features:**
|
|
242
|
+
- **Custom Tools**: Register your own Python functions as tools using `ToolManager` class
|
|
243
|
+
- **Voting Controls**: Three-tier quality system (lenient/balanced/strict) for multi-agent consensus
|
|
244
|
+
- **Backend Registry**: New capabilities tracking in `massgen/backend/capabilities.py`
|
|
245
|
+
- **40+ Examples**: Custom tools configurations in `massgen/configs/tools/custom_tools/`
|
|
246
|
+
- **Self-Evolution**: Agents autonomously analyze GitHub issues and market trends for data-driven roadmaps
|
|
247
|
+
- **Gemini Refactoring**: Enhanced architecture with separate MCP manager and tracking modules
|
|
248
|
+
|
|
249
|
+
**Try it:**
|
|
250
|
+
```bash
|
|
251
|
+
# Install or upgrade
|
|
252
|
+
pip install --upgrade massgen
|
|
253
|
+
|
|
254
|
+
# Create custom configuration interactively
|
|
255
|
+
massgen --setup
|
|
256
|
+
|
|
257
|
+
# Try custom tools with agents
|
|
258
|
+
massgen --config @examples/tools/custom_tools/claude_custom_tool_example \
|
|
259
|
+
"What's the sum of 123 and 456?"
|
|
260
|
+
|
|
261
|
+
# Test voting sensitivity controls
|
|
262
|
+
massgen --config @examples/voting/gemini_gpt_voting_sensitivity \
|
|
263
|
+
"What are the pros and cons of renewable energy?"
|
|
264
|
+
|
|
265
|
+
# Self-evolution with GitHub issue analysis
|
|
266
|
+
massgen --config @examples/tools/custom_tools/github_issue_market_analysis \
|
|
267
|
+
"Analyze the massgen dir and MassGen GitHub issues to understand what features users are requesting. Also research current trends in multi-agent AI systems and LLM orchestration. Based on the existing code, the open issues and market trends, write a prioritized recommendation report for the next release."
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### v0.1.0
|
|
271
|
+
**New Features:** PyPI Package Release, Comprehensive Documentation, Interactive Setup Wizard, Enhanced CLI
|
|
272
|
+
|
|
273
|
+
**Key Features:**
|
|
274
|
+
- Official PyPI distribution: `pip install massgen` with global CLI command
|
|
275
|
+
- Interactive Setup Wizard with smart defaults for API keys and model selection
|
|
276
|
+
- Comprehensive documentation at [docs.massgen.ai](https://docs.massgen.ai/)
|
|
277
|
+
- Simplified command syntax: `massgen "question"` with `@examples/` prefix
|
|
278
|
+
|
|
279
|
+
**Try it:**
|
|
280
|
+
```bash
|
|
281
|
+
pip install massgen && massgen
|
|
282
|
+
massgen --config @examples/basic/multi/three_agents_default "What is 2+2?"
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### v0.0.32
|
|
230
286
|
**New Features:** Docker Execution Mode, MCP Architecture Refactoring, Claude Code Docker Integration
|
|
231
287
|
|
|
232
288
|
**Configuration Files:**
|
|
@@ -247,23 +303,19 @@ Most configurations use environment variables for API keys:
|
|
|
247
303
|
**Try it:**
|
|
248
304
|
```bash
|
|
249
305
|
# Docker isolated execution - secure command execution in containers
|
|
250
|
-
|
|
251
|
-
--config massgen/configs/tools/code-execution/docker_simple.yaml \
|
|
306
|
+
massgen --config @examples/tools/code-execution/docker_simple \
|
|
252
307
|
"Write a factorial function and test it"
|
|
253
308
|
|
|
254
309
|
# Multi-agent Docker deployment - each agent in isolated container
|
|
255
|
-
|
|
256
|
-
--config massgen/configs/tools/code-execution/docker_multi_agent.yaml \
|
|
310
|
+
massgen --config @examples/tools/code-execution/docker_multi_agent \
|
|
257
311
|
"Build a Flask website about Bob Dylan"
|
|
258
312
|
|
|
259
313
|
# Claude Code with Docker - automatic tool management
|
|
260
|
-
|
|
261
|
-
--config massgen/configs/tools/code-execution/docker_claude_code.yaml \
|
|
314
|
+
massgen --config @examples/tools/code-execution/docker_claude_code \
|
|
262
315
|
"Build a Flask website about Bob Dylan"
|
|
263
316
|
|
|
264
317
|
# Resource-limited Docker execution - production-ready setup
|
|
265
|
-
|
|
266
|
-
--config massgen/configs/tools/code-execution/docker_with_resource_limits.yaml \
|
|
318
|
+
massgen --config @examples/tools/code-execution/docker_with_resource_limits \
|
|
267
319
|
"Fetch data from an API and analyze it"
|
|
268
320
|
```
|
|
269
321
|
|
|
@@ -281,9 +333,11 @@ uv run python -m massgen.cli \
|
|
|
281
333
|
- `massgen/configs/basic/multi/gpt4o_audio_generation.yaml` - Multi-agent audio generation with GPT-4o
|
|
282
334
|
- `massgen/configs/basic/single/single_gpt4o_video_generation.yaml` - Video generation with OpenAI Sora-2
|
|
283
335
|
|
|
336
|
+
**Case Study:**
|
|
337
|
+
- [Universal Code Execution via MCP](../../docs/case_studies/universal-code-execution-mcp.md)
|
|
338
|
+
|
|
284
339
|
**Key Features:**
|
|
285
340
|
- Universal `execute_command` tool works across Claude, Gemini, OpenAI (Response API), and Chat Completions providers (Grok, ZAI, etc.)
|
|
286
|
-
- AG2 group chat integration with speaker selection modes (auto, round-robin, manual)
|
|
287
341
|
- Audio tools: text-to-speech, audio transcription, audio generation
|
|
288
342
|
- Video tools: text-to-video generation via Sora-2 API
|
|
289
343
|
- Code execution in planning mode for safer coordination
|
|
@@ -292,28 +346,23 @@ uv run python -m massgen.cli \
|
|
|
292
346
|
**Try it:**
|
|
293
347
|
```bash
|
|
294
348
|
# Universal code execution - works with any backend
|
|
295
|
-
|
|
296
|
-
--config massgen/configs/tools/code-execution/basic_command_execution.yaml \
|
|
349
|
+
massgen --config @examples/tools/code-execution/basic_command_execution \
|
|
297
350
|
"Write a Python function to calculate factorial and test it"
|
|
298
351
|
|
|
299
352
|
# AG2 group chat - multi-agent conversations
|
|
300
|
-
|
|
301
|
-
--config massgen/configs/ag2/ag2_groupchat.yaml \
|
|
353
|
+
massgen --config @examples/ag2/ag2_groupchat \
|
|
302
354
|
"Write a Python function to calculate factorial."
|
|
303
355
|
|
|
304
356
|
# Mixed MassGen + AG2 agents - GPT-5-nano collaborating with AG2 team
|
|
305
|
-
|
|
306
|
-
--config massgen/configs/ag2/ag2_groupchat_gpt.yaml \
|
|
357
|
+
massgen --config @examples/ag2/ag2_groupchat_gpt \
|
|
307
358
|
"Write a Python function to calculate factorial."
|
|
308
359
|
|
|
309
360
|
# Audio generation
|
|
310
|
-
|
|
311
|
-
--config massgen/configs/basic/single/single_gpt4o_audio_generation.yaml \
|
|
361
|
+
massgen --config @examples/basic/single/single_gpt4o_audio_generation \
|
|
312
362
|
"I want to you tell me a very short introduction about Sherlock Homes in one sentence, and I want you to use emotion voice to read it out loud."
|
|
313
363
|
|
|
314
364
|
# Video generation with Sora-2
|
|
315
|
-
|
|
316
|
-
--config massgen/configs/basic/single/single_gpt4o_video_generation.yaml \
|
|
365
|
+
massgen --config @examples/basic/single/single_gpt4o_video_generation \
|
|
317
366
|
"Generate a 4 seconds video with neon-lit alley at night, light rain, slow push-in, cinematic."
|
|
318
367
|
```
|
|
319
368
|
|
|
@@ -332,18 +381,15 @@ uv run python -m massgen.cli \
|
|
|
332
381
|
**Try it:**
|
|
333
382
|
```bash
|
|
334
383
|
# Audio understanding with OpenRouter
|
|
335
|
-
|
|
336
|
-
--config massgen/configs/basic/single/single_openrouter_audio_understanding.yaml \
|
|
384
|
+
massgen --config @examples/basic/single/single_openrouter_audio_understanding \
|
|
337
385
|
"What is in this recording?"
|
|
338
386
|
|
|
339
387
|
# Video understanding with Qwen API
|
|
340
|
-
|
|
341
|
-
--config massgen/configs/basic/single/single_qwen_video_understanding.yaml \
|
|
388
|
+
massgen --config @examples/basic/single/single_qwen_video_understanding \
|
|
342
389
|
"Describe what happens in this video"
|
|
343
390
|
|
|
344
391
|
# Multi-agent filesystem collaboration
|
|
345
|
-
|
|
346
|
-
--config massgen/configs/tools/filesystem/cc_gpt5_gemini_filesystem.yaml \
|
|
392
|
+
massgen --config @examples/tools/filesystem/cc_gpt5_gemini_filesystem \
|
|
347
393
|
"Create a comprehensive project with documentation"
|
|
348
394
|
```
|
|
349
395
|
|
|
@@ -366,18 +412,15 @@ uv run python -m massgen.cli \
|
|
|
366
412
|
**Try it:**
|
|
367
413
|
```bash
|
|
368
414
|
# Planning mode with filesystem operations
|
|
369
|
-
|
|
370
|
-
--config massgen/configs/tools/planning/five_agents_filesystem_mcp_planning_mode.yaml \
|
|
415
|
+
massgen --config @examples/tools/planning/five_agents_filesystem_mcp_planning_mode \
|
|
371
416
|
"Create a comprehensive project structure with documentation"
|
|
372
417
|
|
|
373
418
|
# Multi-agent weather MCP testing
|
|
374
|
-
|
|
375
|
-
--config massgen/configs/tools/mcp/five_agents_weather_mcp_test.yaml \
|
|
419
|
+
massgen --config @examples/tools/mcp/five_agents_weather_mcp_test \
|
|
376
420
|
"Compare weather forecasts for New York, London, and Tokyo"
|
|
377
421
|
|
|
378
422
|
# Planning mode with Twitter integration
|
|
379
|
-
|
|
380
|
-
--config massgen/configs/tools/planning/five_agents_twitter_mcp_planning_mode.yaml \
|
|
423
|
+
massgen --config @examples/tools/planning/five_agents_twitter_mcp_planning_mode \
|
|
381
424
|
"Draft and plan tweet series about AI advancements"
|
|
382
425
|
```
|
|
383
426
|
|
|
@@ -396,19 +439,16 @@ uv run python -m massgen.cli \
|
|
|
396
439
|
**Try it:**
|
|
397
440
|
```bash
|
|
398
441
|
# AG2 single agent with code execution
|
|
399
|
-
|
|
400
|
-
--config massgen/configs/ag2/ag2_coder.yaml \
|
|
442
|
+
massgen --config @examples/ag2/ag2_coder \
|
|
401
443
|
"Create a factorial function and calculate the factorial of 8. Show the result?"
|
|
402
444
|
|
|
403
445
|
# Mixed team: AG2 agent + Gemini agent
|
|
404
|
-
|
|
405
|
-
--config massgen/configs/ag2/ag2_gemini.yaml \
|
|
446
|
+
massgen --config @examples/ag2/ag2_gemini \
|
|
406
447
|
"what is quantum computing?"
|
|
407
448
|
|
|
408
449
|
# AG2 case study: Compare AG2 and MassGen (requires external dependency)
|
|
409
450
|
uv pip install -e ".[external]"
|
|
410
|
-
|
|
411
|
-
--config massgen/configs/ag2/ag2_coder_case_study.yaml \
|
|
451
|
+
massgen --config @examples/ag2/ag2_coder_case_study \
|
|
412
452
|
"Output a summary comparing the differences between AG2 (https://github.com/ag2ai/ag2) and MassGen (https://github.com/Leezekun/MassGen) for LLM agents."
|
|
413
453
|
```
|
|
414
454
|
|
|
@@ -425,18 +465,15 @@ uv run python -m massgen.cli \
|
|
|
425
465
|
**Try it:**
|
|
426
466
|
```bash
|
|
427
467
|
# Image generation with single agent
|
|
428
|
-
|
|
429
|
-
--config massgen/configs/basic/single/single_gpt4o_image_generation.yaml \
|
|
468
|
+
massgen --config @examples/basic/single/single_gpt4o_image_generation \
|
|
430
469
|
"Generate an image of gray tabby cat hugging an otter with an orange scarf. Limit image size within 5kb."
|
|
431
470
|
|
|
432
471
|
# Image understanding with multiple agents
|
|
433
|
-
|
|
434
|
-
--config massgen/configs/basic/multi/gpt5nano_image_understanding.yaml \
|
|
472
|
+
massgen --config @examples/basic/multi/gpt5nano_image_understanding \
|
|
435
473
|
"Please summarize the content in this image."
|
|
436
474
|
|
|
437
475
|
# File search for document Q&A
|
|
438
|
-
|
|
439
|
-
--config massgen/configs/basic/single/single_gpt5nano_file_search.yaml \
|
|
476
|
+
massgen --config @examples/basic/single/single_gpt5nano_file_search \
|
|
440
477
|
"What is humanity's last exam score for OpenAI Deep Research? Also, provide details about the other models mentioned in the PDF?"
|
|
441
478
|
```
|
|
442
479
|
|
|
@@ -450,13 +487,11 @@ uv run python -m massgen.cli \
|
|
|
450
487
|
**Try it:**
|
|
451
488
|
```bash
|
|
452
489
|
# Protected paths - keep reference files safe
|
|
453
|
-
|
|
454
|
-
--config massgen/configs/tools/filesystem/gemini_gpt5nano_protected_paths.yaml \
|
|
490
|
+
massgen --config @examples/tools/filesystem/gemini_gpt5nano_protected_paths \
|
|
455
491
|
"Review the HTML and CSS files, then improve the styling"
|
|
456
492
|
|
|
457
493
|
# File-based context paths - grant access to specific files
|
|
458
|
-
|
|
459
|
-
--config massgen/configs/tools/filesystem/gemini_gpt5nano_file_context_path.yaml \
|
|
494
|
+
massgen --config @examples/tools/filesystem/gemini_gpt5nano_file_context_path \
|
|
460
495
|
"Analyze the CSS file and make modern improvements"
|
|
461
496
|
```
|
|
462
497
|
|
|
@@ -491,8 +526,7 @@ Turn 2: Can you (1) remove the image placeholder? we will not use image directly
|
|
|
491
526
|
```bash
|
|
492
527
|
# Try vLLM backend with local models (requires vLLM server running)
|
|
493
528
|
# First start vLLM server: python -m vllm.entrypoints.openai.api_server --model Qwen/Qwen3-0.6B --host 0.0.0.0 --port 8000
|
|
494
|
-
|
|
495
|
-
--config massgen/configs/basic/multi/two_qwen_vllm.yaml \
|
|
529
|
+
massgen --config @examples/basic/multi/two_qwen_vllm \
|
|
496
530
|
"What is machine learning?"
|
|
497
531
|
```
|
|
498
532
|
|
|
@@ -510,7 +544,7 @@ uv run python -m massgen.cli \
|
|
|
510
544
|
**Case Study:** [Advanced Filesystem with User Context Path Support](../../docs/case_studies/v0.0.21-v0.0.22-filesystem-permissions.md)
|
|
511
545
|
```bash
|
|
512
546
|
# Multi-agent collaboration with granular filesystem permissions
|
|
513
|
-
|
|
547
|
+
massgen --config @examples/tools/filesystem/gpt5mini_cc_fs_context_path "Enhance the website in massgen/configs/resources 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."
|
|
514
548
|
```
|
|
515
549
|
|
|
516
550
|
### v0.0.21
|
|
@@ -522,8 +556,7 @@ uv run python -m massgen.cli --config massgen/configs/tools/filesystem/gpt5mini_
|
|
|
522
556
|
**Try it:**
|
|
523
557
|
```bash
|
|
524
558
|
# Grok with MCP tools
|
|
525
|
-
|
|
526
|
-
--config massgen/configs/tools/mcp/grok3_mini_mcp_example.yaml \
|
|
559
|
+
massgen --config @examples/tools/mcp/grok3_mini_mcp_example \
|
|
527
560
|
"What's the weather in Tokyo?"
|
|
528
561
|
```
|
|
529
562
|
|
|
@@ -535,8 +568,7 @@ uv run python -m massgen.cli \
|
|
|
535
568
|
**Try it:**
|
|
536
569
|
```bash
|
|
537
570
|
# Claude with MCP tools
|
|
538
|
-
|
|
539
|
-
--config massgen/configs/tools/mcp/claude_mcp_example.yaml \
|
|
571
|
+
massgen --config @examples/tools/mcp/claude_mcp_example \
|
|
540
572
|
"What's the current weather?"
|
|
541
573
|
```
|
|
542
574
|
|
|
@@ -548,8 +580,7 @@ uv run python -m massgen.cli \
|
|
|
548
580
|
**Try it:**
|
|
549
581
|
```bash
|
|
550
582
|
# Claude with MCP tools
|
|
551
|
-
|
|
552
|
-
--config massgen/configs/tools/mcp/gpt5_nano_mcp_example.yaml \
|
|
583
|
+
massgen --config @examples/tools/mcp/gpt5_nano_mcp_example \
|
|
553
584
|
"whats the weather of Tokyo?"
|
|
554
585
|
```
|
|
555
586
|
|
|
@@ -559,7 +590,7 @@ uv run python -m massgen.cli \
|
|
|
559
590
|
**Case Study:** [Cross-Backend Collaboration with Gemini MCP Filesystem](../../docs/case_studies/unified-filesystem-mcp-integration.md)
|
|
560
591
|
```bash
|
|
561
592
|
# Gemini and Claude Code agents with unified filesystem via MCP
|
|
562
|
-
|
|
593
|
+
massgen --config @examples/tools/mcp/gemini_mcp_filesystem_test_with_claude_code "Create a presentation that teaches a reinforcement learning algorithm and output it in LaTeX Beamer format. No figures should be added."
|
|
563
594
|
```
|
|
564
595
|
|
|
565
596
|
### v0.0.15
|
|
@@ -572,7 +603,7 @@ uv run python -m massgen.cli --config massgen/configs/tools/mcp/gemini_mcp_files
|
|
|
572
603
|
**Case Study:** [Claude Code Workspace Management with Comprehensive Logging](../../docs/case_studies/claude-code-workspace-management.md)
|
|
573
604
|
```bash
|
|
574
605
|
# Multi-agent Claude Code collaboration with enhanced workspace isolation
|
|
575
|
-
|
|
606
|
+
massgen --config @examples/tools/filesystem/claude_code_context_sharing "Create a website about a diverse set of fun facts about LLMs, placing the output in one index.html file"
|
|
576
607
|
```
|
|
577
608
|
|
|
578
609
|
### v0.0.10
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MassGen Three Agent Configuration
|
|
2
2
|
# Gemini-2.5-flash, GPT-5-nano, and Grok-3-mini with builtin tools enabled
|
|
3
|
-
|
|
3
|
+
# uv run python -m massgen.cli --config massgen/configs/basic/multi/three_agents_default.yaml "What is 2+2?"
|
|
4
4
|
agents:
|
|
5
5
|
- id: "gemini2.5flash"
|
|
6
6
|
backend:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Example Gemini configuration for MassGen
|
|
2
|
-
# Usage: uv run python -m massgen.cli --config
|
|
2
|
+
# Usage: uv run python -m massgen.cli --config massgen/configs/basic/single/single_agent.yaml "What is 2+2?"
|
|
3
3
|
|
|
4
4
|
# Single agent configuration
|
|
5
5
|
agent:
|
|
@@ -6,7 +6,7 @@ agents:
|
|
|
6
6
|
backend:
|
|
7
7
|
type: "openai"
|
|
8
8
|
model: "gpt-5-nano"
|
|
9
|
-
text:
|
|
9
|
+
text:
|
|
10
10
|
verbosity: "medium"
|
|
11
11
|
reasoning:
|
|
12
12
|
effort: "low"
|
|
@@ -19,7 +19,7 @@ agents:
|
|
|
19
19
|
backend:
|
|
20
20
|
type: "openai"
|
|
21
21
|
model: "gpt-5-nano"
|
|
22
|
-
text:
|
|
22
|
+
text:
|
|
23
23
|
verbosity: "medium"
|
|
24
24
|
reasoning:
|
|
25
25
|
effort: "medium"
|
|
@@ -32,7 +32,7 @@ agents:
|
|
|
32
32
|
backend:
|
|
33
33
|
type: "openai"
|
|
34
34
|
model: "gpt-5-nano"
|
|
35
|
-
text:
|
|
35
|
+
text:
|
|
36
36
|
verbosity: "medium"
|
|
37
37
|
reasoning:
|
|
38
38
|
effort: "high"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# MassGen Configuration: Claude Code with Custom Tools
|
|
2
|
+
# Usage:
|
|
3
|
+
# massgen --config @examples/tools/custom_tools/claude_code_custom_tool_example "whats the sum of 123 and 456?"
|
|
4
|
+
|
|
5
|
+
orchestrator:
|
|
6
|
+
snapshot_storage: "claude_code_snapshots"
|
|
7
|
+
agent_temporary_workspace: "claude_code_temp"
|
|
8
|
+
|
|
9
|
+
agents:
|
|
10
|
+
- id: "claude_code_custom_tools"
|
|
11
|
+
backend:
|
|
12
|
+
type: "claude_code"
|
|
13
|
+
model: "claude-sonnet-4-20250514"
|
|
14
|
+
cwd: "claude_code_workspace"
|
|
15
|
+
custom_tools:
|
|
16
|
+
- name: ["two_num_tool"]
|
|
17
|
+
category: "math"
|
|
18
|
+
path: "massgen/tool/_basic/_two_num_tool.py"
|
|
19
|
+
function: ["two_num_tool"]
|
|
20
|
+
description: ["Add two numbers together"]
|
|
21
|
+
append_system_prompt: |
|
|
22
|
+
You are an AI assistant with access to custom calculation tools in addition to your built-in Claude Code tools.
|
|
23
|
+
|
|
24
|
+
When users ask about calculations or math operations, check if a custom tool is available and use it.
|
|
25
|
+
The custom tools will be described in your system prompt, and you should call them using the JSON format specified.
|
|
26
|
+
|
|
27
|
+
Remember to use your built-in tools (Read, Write, Bash, etc.) for file operations and system tasks,
|
|
28
|
+
but use custom tools for specialized calculations when appropriate.
|
|
29
|
+
|
|
30
|
+
ui:
|
|
31
|
+
display_type: "simple"
|
|
32
|
+
logging_enabled: true
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# MassGen Configuration: Claude Code with Custom Tools Integration
|
|
2
|
+
# Usage:
|
|
3
|
+
# massgen --config @examples/tools/custom_tools/claude_code_custom_tool_example_no_path "whats the sum of 123 and 456?"
|
|
4
|
+
|
|
5
|
+
orchestrator:
|
|
6
|
+
snapshot_storage: "claude_code_snapshots"
|
|
7
|
+
agent_temporary_workspace: "claude_code_temp"
|
|
8
|
+
|
|
9
|
+
agents:
|
|
10
|
+
- id: "claude_code_custom_tool" # Claude Code with custom tools
|
|
11
|
+
backend:
|
|
12
|
+
type: "claude_code"
|
|
13
|
+
model: "claude-sonnet-4-20250514"
|
|
14
|
+
cwd: "claude_code_workspace"
|
|
15
|
+
custom_tools:
|
|
16
|
+
- name: ["two_num_tool"]
|
|
17
|
+
function: ["two_num_tool"]
|
|
18
|
+
append_system_prompt: |
|
|
19
|
+
You are an AI assistant with access to a custom math calculation tool.
|
|
20
|
+
|
|
21
|
+
The two_num_tool is available as a custom tool that can add two numbers together.
|
|
22
|
+
Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
|
|
23
|
+
|
|
24
|
+
When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
|
|
25
|
+
a clear, accurate result.
|
|
26
|
+
ui:
|
|
27
|
+
display_type: "simple"
|
|
28
|
+
logging_enabled: true
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# MassGen Configuration: Claude Code with MCP Integration
|
|
2
|
+
# Usage:
|
|
3
|
+
# massgen --config @examples/tools/custom_tools/claude_code_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
|
|
4
|
+
orchestrator:
|
|
5
|
+
snapshot_storage: "claude_code_snapshots"
|
|
6
|
+
agent_temporary_workspace: "claude_code_temp"
|
|
7
|
+
|
|
8
|
+
agents:
|
|
9
|
+
- id: "claude_code_custom_tool" # Claude Code with custom tools and MCP
|
|
10
|
+
backend:
|
|
11
|
+
type: "claude_code"
|
|
12
|
+
model: "claude-sonnet-4-20250514"
|
|
13
|
+
cwd: "claude_code_workspace"
|
|
14
|
+
custom_tools:
|
|
15
|
+
- name: ["two_num_tool"]
|
|
16
|
+
category: "math"
|
|
17
|
+
path: "massgen/tool/_basic/_two_num_tool.py"
|
|
18
|
+
function: ["two_num_tool"]
|
|
19
|
+
mcp_servers:
|
|
20
|
+
- name: "weather"
|
|
21
|
+
type: "stdio"
|
|
22
|
+
command: "npx"
|
|
23
|
+
args: ["-y", "@fak111/weather-mcp"]
|
|
24
|
+
append_system_prompt: |
|
|
25
|
+
You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
|
|
26
|
+
|
|
27
|
+
The two_num_tool is available as a custom tool that can add two numbers together.
|
|
28
|
+
Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
|
|
29
|
+
|
|
30
|
+
When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
|
|
31
|
+
a clear, accurate result.
|
|
32
|
+
|
|
33
|
+
Weather tools are available via MCP sessions and will be called automatically by the system when needed.
|
|
34
|
+
Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
|
|
35
|
+
|
|
36
|
+
When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
|
|
37
|
+
response and provide concise, up-to-date information using the integrated tools.
|
|
38
|
+
ui:
|
|
39
|
+
display_type: "simple"
|
|
40
|
+
logging_enabled: true
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# MassGen Configuration: Claude Code with MCP Integration
|
|
2
|
+
# Usage:
|
|
3
|
+
# massgen --config @examples/tools/custom_tools/claude_code_custom_tool_with_wrong_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
|
|
4
|
+
orchestrator:
|
|
5
|
+
snapshot_storage: "claude_code_snapshots"
|
|
6
|
+
agent_temporary_workspace: "claude_code_temp"
|
|
7
|
+
|
|
8
|
+
agents:
|
|
9
|
+
- id: "claude_code_custom_tool" # Claude Code with custom tools and wrong MCP
|
|
10
|
+
backend:
|
|
11
|
+
type: "claude_code"
|
|
12
|
+
model: "claude-sonnet-4-20250514"
|
|
13
|
+
cwd: "claude_code_workspace"
|
|
14
|
+
custom_tools:
|
|
15
|
+
- name: ["two_num_tool"]
|
|
16
|
+
function: ["two_num_tool"]
|
|
17
|
+
mcp_servers:
|
|
18
|
+
- name: "weather"
|
|
19
|
+
type: "stdio"
|
|
20
|
+
command: "python"
|
|
21
|
+
args: ["-u", "-m", "aaa.bbb"] # Wrong MCP command to demonstrate error handling
|
|
22
|
+
append_system_prompt: |
|
|
23
|
+
You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
|
|
24
|
+
|
|
25
|
+
The two_num_tool is available as a custom tool that can add two numbers together.
|
|
26
|
+
Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
|
|
27
|
+
|
|
28
|
+
When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
|
|
29
|
+
a clear, accurate result.
|
|
30
|
+
|
|
31
|
+
Weather tools are available via MCP sessions and will be called automatically by the system when needed.
|
|
32
|
+
Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
|
|
33
|
+
|
|
34
|
+
When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
|
|
35
|
+
response and provide concise, up-to-date information using the integrated tools.
|
|
36
|
+
ui:
|
|
37
|
+
display_type: "simple"
|
|
38
|
+
logging_enabled: true
|