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.

Files changed (111) hide show
  1. massgen/__init__.py +1 -1
  2. massgen/agent_config.py +17 -0
  3. massgen/api_params_handler/_api_params_handler_base.py +1 -0
  4. massgen/api_params_handler/_chat_completions_api_params_handler.py +8 -1
  5. massgen/api_params_handler/_claude_api_params_handler.py +8 -1
  6. massgen/api_params_handler/_gemini_api_params_handler.py +73 -0
  7. massgen/api_params_handler/_response_api_params_handler.py +8 -1
  8. massgen/backend/base.py +31 -0
  9. massgen/backend/{base_with_mcp.py → base_with_custom_tool_and_mcp.py} +282 -11
  10. massgen/backend/chat_completions.py +182 -92
  11. massgen/backend/claude.py +115 -18
  12. massgen/backend/claude_code.py +378 -14
  13. massgen/backend/docs/CLAUDE_API_RESEARCH.md +3 -3
  14. massgen/backend/gemini.py +1275 -1607
  15. massgen/backend/gemini_mcp_manager.py +545 -0
  16. massgen/backend/gemini_trackers.py +344 -0
  17. massgen/backend/gemini_utils.py +43 -0
  18. massgen/backend/response.py +129 -70
  19. massgen/cli.py +643 -132
  20. massgen/config_builder.py +381 -32
  21. massgen/configs/README.md +111 -80
  22. massgen/configs/basic/multi/three_agents_default.yaml +1 -1
  23. massgen/configs/basic/single/single_agent.yaml +1 -1
  24. massgen/configs/providers/openai/gpt5_nano.yaml +3 -3
  25. massgen/configs/tools/custom_tools/claude_code_custom_tool_example.yaml +32 -0
  26. massgen/configs/tools/custom_tools/claude_code_custom_tool_example_no_path.yaml +28 -0
  27. massgen/configs/tools/custom_tools/claude_code_custom_tool_with_mcp_example.yaml +40 -0
  28. massgen/configs/tools/custom_tools/claude_code_custom_tool_with_wrong_mcp_example.yaml +38 -0
  29. massgen/configs/tools/custom_tools/claude_code_wrong_custom_tool_with_mcp_example.yaml +38 -0
  30. massgen/configs/tools/custom_tools/claude_custom_tool_example.yaml +24 -0
  31. massgen/configs/tools/custom_tools/claude_custom_tool_example_no_path.yaml +22 -0
  32. massgen/configs/tools/custom_tools/claude_custom_tool_with_mcp_example.yaml +35 -0
  33. massgen/configs/tools/custom_tools/claude_custom_tool_with_wrong_mcp_example.yaml +33 -0
  34. massgen/configs/tools/custom_tools/claude_wrong_custom_tool_with_mcp_example.yaml +33 -0
  35. massgen/configs/tools/custom_tools/gemini_custom_tool_example.yaml +24 -0
  36. massgen/configs/tools/custom_tools/gemini_custom_tool_example_no_path.yaml +22 -0
  37. massgen/configs/tools/custom_tools/gemini_custom_tool_with_mcp_example.yaml +35 -0
  38. massgen/configs/tools/custom_tools/gemini_custom_tool_with_wrong_mcp_example.yaml +33 -0
  39. massgen/configs/tools/custom_tools/gemini_wrong_custom_tool_with_mcp_example.yaml +33 -0
  40. massgen/configs/tools/custom_tools/github_issue_market_analysis.yaml +94 -0
  41. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_example.yaml +24 -0
  42. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_example_no_path.yaml +22 -0
  43. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_mcp_example.yaml +35 -0
  44. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_wrong_mcp_example.yaml +33 -0
  45. massgen/configs/tools/custom_tools/gpt5_nano_wrong_custom_tool_with_mcp_example.yaml +33 -0
  46. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_example.yaml +25 -0
  47. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_example_no_path.yaml +23 -0
  48. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_mcp_example.yaml +34 -0
  49. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_wrong_mcp_example.yaml +34 -0
  50. massgen/configs/tools/custom_tools/gpt_oss_wrong_custom_tool_with_mcp_example.yaml +34 -0
  51. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_example.yaml +24 -0
  52. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_example_no_path.yaml +22 -0
  53. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_mcp_example.yaml +35 -0
  54. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_wrong_mcp_example.yaml +33 -0
  55. massgen/configs/tools/custom_tools/grok3_mini_wrong_custom_tool_with_mcp_example.yaml +33 -0
  56. massgen/configs/tools/custom_tools/qwen_api_custom_tool_example.yaml +25 -0
  57. massgen/configs/tools/custom_tools/qwen_api_custom_tool_example_no_path.yaml +23 -0
  58. massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_mcp_example.yaml +36 -0
  59. massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_wrong_mcp_example.yaml +34 -0
  60. massgen/configs/tools/custom_tools/qwen_api_wrong_custom_tool_with_mcp_example.yaml +34 -0
  61. massgen/configs/tools/custom_tools/qwen_local_custom_tool_example.yaml +24 -0
  62. massgen/configs/tools/custom_tools/qwen_local_custom_tool_example_no_path.yaml +22 -0
  63. massgen/configs/tools/custom_tools/qwen_local_custom_tool_with_mcp_example.yaml +35 -0
  64. massgen/configs/tools/custom_tools/qwen_local_custom_tool_with_wrong_mcp_example.yaml +33 -0
  65. massgen/configs/tools/custom_tools/qwen_local_wrong_custom_tool_with_mcp_example.yaml +33 -0
  66. massgen/configs/tools/filesystem/claude_code_context_sharing.yaml +1 -1
  67. massgen/configs/voting/gemini_gpt_voting_sensitivity.yaml +67 -0
  68. massgen/formatter/_chat_completions_formatter.py +104 -0
  69. massgen/formatter/_claude_formatter.py +120 -0
  70. massgen/formatter/_gemini_formatter.py +448 -0
  71. massgen/formatter/_response_formatter.py +88 -0
  72. massgen/frontend/coordination_ui.py +4 -2
  73. massgen/logger_config.py +35 -3
  74. massgen/message_templates.py +56 -6
  75. massgen/orchestrator.py +179 -10
  76. massgen/stream_chunk/base.py +3 -0
  77. massgen/tests/custom_tools_example.py +392 -0
  78. massgen/tests/mcp_test_server.py +17 -7
  79. massgen/tests/test_config_builder.py +423 -0
  80. massgen/tests/test_custom_tools.py +401 -0
  81. massgen/tests/test_tools.py +127 -0
  82. massgen/tool/README.md +935 -0
  83. massgen/tool/__init__.py +39 -0
  84. massgen/tool/_async_helpers.py +70 -0
  85. massgen/tool/_basic/__init__.py +8 -0
  86. massgen/tool/_basic/_two_num_tool.py +24 -0
  87. massgen/tool/_code_executors/__init__.py +10 -0
  88. massgen/tool/_code_executors/_python_executor.py +74 -0
  89. massgen/tool/_code_executors/_shell_executor.py +61 -0
  90. massgen/tool/_exceptions.py +39 -0
  91. massgen/tool/_file_handlers/__init__.py +10 -0
  92. massgen/tool/_file_handlers/_file_operations.py +218 -0
  93. massgen/tool/_manager.py +634 -0
  94. massgen/tool/_registered_tool.py +88 -0
  95. massgen/tool/_result.py +66 -0
  96. massgen/tool/_self_evolution/_github_issue_analyzer.py +369 -0
  97. massgen/tool/docs/builtin_tools.md +681 -0
  98. massgen/tool/docs/exceptions.md +794 -0
  99. massgen/tool/docs/execution_results.md +691 -0
  100. massgen/tool/docs/manager.md +887 -0
  101. massgen/tool/docs/workflow_toolkits.md +529 -0
  102. massgen/tool/workflow_toolkits/__init__.py +57 -0
  103. massgen/tool/workflow_toolkits/base.py +55 -0
  104. massgen/tool/workflow_toolkits/new_answer.py +126 -0
  105. massgen/tool/workflow_toolkits/vote.py +167 -0
  106. {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/METADATA +89 -131
  107. {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/RECORD +111 -36
  108. {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/WHEEL +0 -0
  109. {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/entry_points.txt +0 -0
  110. {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/licenses/LICENSE +0 -0
  111. {massgen-0.1.0a2.dist-info → massgen-0.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,34 @@
1
+ # MassGen Configuration: Gemini with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/gpt_oss_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "gpt-oss-custom_tool" # Cerebras AI GPT-OSS
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "gpt-oss-120b"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: ["two_num_tool"]
12
+ function: ["two_num_tool"]
13
+ mcp_servers:
14
+ - name: "weather"
15
+ type: "stdio"
16
+ command: "npx"
17
+ args: ["-y", "@fak111/weather-mcp"]
18
+ system_message: |
19
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP 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
+
27
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
28
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
29
+
30
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
31
+ response and provide concise, up-to-date information using the integrated tools.
32
+ ui:
33
+ display_type: "simple"
34
+ logging_enabled: true
@@ -0,0 +1,34 @@
1
+ # MassGen Configuration: Gemini with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/gpt_oss_custom_tool_with_wrong_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "gpt-oss-custom_tool" # Cerebras AI GPT-OSS
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "gpt-oss-120b"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: ["two_num_tool"]
12
+ function: ["two_num_tool"]
13
+ mcp_servers:
14
+ - name: "weather"
15
+ type: "stdio"
16
+ command: "python"
17
+ args: ["-u", "-m", "aaa.bbb"] # Wrong MCP command to demonstrate error handling
18
+ system_message: |
19
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP 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
+
27
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
28
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
29
+
30
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
31
+ response and provide concise, up-to-date information using the integrated tools.
32
+ ui:
33
+ display_type: "simple"
34
+ logging_enabled: true
@@ -0,0 +1,34 @@
1
+ # MassGen Configuration: Gemini with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/gpt_oss_wrong_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "gpt-oss-custom_tool" # Cerebras AI GPT-OSS
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "gpt-oss-120b"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: ["two_num_tool"]
12
+ function: ["wrong_two_num_tool"]
13
+ mcp_servers:
14
+ - name: "weather"
15
+ type: "stdio"
16
+ command: "npx"
17
+ args: ["-y", "@fak111/weather-mcp"]
18
+ system_message: |
19
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP 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
+
27
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
28
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
29
+
30
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
31
+ response and provide concise, up-to-date information using the integrated tools.
32
+ ui:
33
+ display_type: "simple"
34
+ logging_enabled: true
@@ -0,0 +1,24 @@
1
+ # MassGen Configuration: Gemini with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/grok3_mini_custom_tool_example "whats the sum of 123 and 456?"
4
+ agents:
5
+ - id: "grok3_mini_custom_tool"
6
+ backend:
7
+ type: "grok"
8
+ model: "grok-3-mini"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ category: "math"
12
+ path: "massgen/tool/_basic/_two_num_tool.py"
13
+ function: "two_num_tool"
14
+ system_message: |
15
+ You are an AI assistant with access to weather information through MCP (Model Context Protocol) integration.
16
+
17
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
18
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
19
+
20
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
21
+ response and provide concise, up-to-date information using the integrated tools.
22
+ ui:
23
+ display_type: "rich_terminal"
24
+ logging_enabled: true
@@ -0,0 +1,22 @@
1
+ # MassGen Configuration: Grok-3 Mini with Custom Tool (No Path)
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/grok3_mini_custom_tool_example_no_path "whats the sum of 123 and 456?"
4
+ agents:
5
+ - id: "grok3_mini_custom_tool"
6
+ backend:
7
+ type: "grok"
8
+ model: "grok-3-mini"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ function: "two_num_tool"
12
+ system_message: |
13
+ You are an AI assistant with access to a custom math calculation tool.
14
+
15
+ The two_num_tool is available as a custom tool that can add two numbers together.
16
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
17
+
18
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
19
+ a clear, accurate result.
20
+ ui:
21
+ display_type: "rich_terminal"
22
+ logging_enabled: true
@@ -0,0 +1,35 @@
1
+ # MassGen Configuration: Grok-3 Mini with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/grok3_mini_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "grok3_mini_custom_tool"
6
+ backend:
7
+ type: "grok"
8
+ model: "grok-3-mini"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ category: "math"
12
+ path: "massgen/tool/_basic/_two_num_tool.py"
13
+ function: "two_num_tool"
14
+ mcp_servers:
15
+ - name: "weather"
16
+ type: "stdio"
17
+ command: "npx"
18
+ args: ["-y", "@fak111/weather-mcp"]
19
+ system_message: |
20
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
21
+
22
+ The two_num_tool is available as a custom tool that can add two numbers together.
23
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
24
+
25
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
26
+ a clear, accurate result.
27
+
28
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
29
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
30
+
31
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
32
+ response and provide concise, up-to-date information using the integrated tools.
33
+ ui:
34
+ display_type: "rich_terminal"
35
+ logging_enabled: true
@@ -0,0 +1,33 @@
1
+ # MassGen Configuration: Grok-3 Mini with Wrong MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/grok3_mini_custom_tool_with_wrong_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "grok3_mini_custom_tool"
6
+ backend:
7
+ type: "grok"
8
+ model: "grok-3-mini"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ function: "two_num_tool"
12
+ mcp_servers:
13
+ - name: "weather"
14
+ type: "stdio"
15
+ command: "python"
16
+ args: ["-u", "-m", "aaa.bbb"] # Wrong MCP command to demonstrate error handling
17
+ system_message: |
18
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
19
+
20
+ The two_num_tool is available as a custom tool that can add two numbers together.
21
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
22
+
23
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
24
+ a clear, accurate result.
25
+
26
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
27
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
28
+
29
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
30
+ response and provide concise, up-to-date information using the integrated tools.
31
+ ui:
32
+ display_type: "rich_terminal"
33
+ logging_enabled: true
@@ -0,0 +1,33 @@
1
+ # MassGen Configuration: Grok-3 Mini with Wrong Custom Tool and MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/grok3_mini_wrong_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "grok3_mini_custom_tool"
6
+ backend:
7
+ type: "grok"
8
+ model: "grok-3-mini"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ function: "wrong_two_num_tool"
12
+ mcp_servers:
13
+ - name: "weather"
14
+ type: "stdio"
15
+ command: "npx"
16
+ args: ["-y", "@fak111/weather-mcp"]
17
+ system_message: |
18
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
19
+
20
+ The two_num_tool is available as a custom tool that can add two numbers together.
21
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
22
+
23
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
24
+ a clear, accurate result.
25
+
26
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
27
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
28
+
29
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
30
+ response and provide concise, up-to-date information using the integrated tools.
31
+ ui:
32
+ display_type: "rich_terminal"
33
+ logging_enabled: true
@@ -0,0 +1,25 @@
1
+ # MassGen Configuration: Gemini with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_api_custom_tool_example "whats the sum of 123 and 456?"
4
+ agents:
5
+ - id: "qwen-mcp_weather" # Cerebras AI
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "qwen-3-235b-a22b-instruct-2507"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: "two_num_tool"
12
+ category: "math"
13
+ path: "massgen/tool/_basic/_two_num_tool.py"
14
+ function: "two_num_tool"
15
+ system_message: |
16
+ You are an AI assistant with access to weather information through MCP (Model Context Protocol) integration.
17
+
18
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
19
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
20
+
21
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
22
+ response and provide concise, up-to-date information using the integrated tools.
23
+ ui:
24
+ display_type: "rich_terminal"
25
+ logging_enabled: true
@@ -0,0 +1,23 @@
1
+ # MassGen Configuration: Qwen API with Custom Tool (No Path)
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_api_custom_tool_example_no_path "whats the sum of 123 and 456?"
4
+ agents:
5
+ - id: "qwen-mcp_weather" # Cerebras AI
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "qwen-3-235b-a22b-instruct-2507"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: "two_num_tool"
12
+ function: "two_num_tool"
13
+ system_message: |
14
+ You are an AI assistant with access to a custom math calculation tool.
15
+
16
+ The two_num_tool is available as a custom tool that can add two numbers together.
17
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
18
+
19
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
20
+ a clear, accurate result.
21
+ ui:
22
+ display_type: "rich_terminal"
23
+ logging_enabled: true
@@ -0,0 +1,36 @@
1
+ # MassGen Configuration: Qwen API with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_api_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "qwen-mcp_weather" # Cerebras AI
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "qwen-3-235b-a22b-instruct-2507"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: "two_num_tool"
12
+ category: "math"
13
+ path: "massgen/tool/_basic/_two_num_tool.py"
14
+ function: "two_num_tool"
15
+ mcp_servers:
16
+ - name: "weather"
17
+ type: "stdio"
18
+ command: "npx"
19
+ args: ["-y", "@fak111/weather-mcp"]
20
+ system_message: |
21
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
22
+
23
+ The two_num_tool is available as a custom tool that can add two numbers together.
24
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
25
+
26
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
27
+ a clear, accurate result.
28
+
29
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
30
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
31
+
32
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
33
+ response and provide concise, up-to-date information using the integrated tools.
34
+ ui:
35
+ display_type: "rich_terminal"
36
+ logging_enabled: true
@@ -0,0 +1,34 @@
1
+ # MassGen Configuration: Qwen API with Wrong MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_api_custom_tool_with_wrong_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "qwen-mcp_weather" # Cerebras AI
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "qwen-3-235b-a22b-instruct-2507"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: "two_num_tool"
12
+ function: "two_num_tool"
13
+ mcp_servers:
14
+ - name: "weather"
15
+ type: "stdio"
16
+ command: "python"
17
+ args: ["-u", "-m", "aaa.bbb"] # Wrong MCP command to demonstrate error handling
18
+ system_message: |
19
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP 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
+
27
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
28
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
29
+
30
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
31
+ response and provide concise, up-to-date information using the integrated tools.
32
+ ui:
33
+ display_type: "rich_terminal"
34
+ logging_enabled: true
@@ -0,0 +1,34 @@
1
+ # MassGen Configuration: Qwen API with Wrong Custom Tool and MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_api_wrong_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "qwen-mcp_weather" # Cerebras AI
6
+ backend:
7
+ type: "chatcompletion"
8
+ model: "qwen-3-235b-a22b-instruct-2507"
9
+ base_url: "https://api.cerebras.ai/v1"
10
+ custom_tools:
11
+ - name: "two_num_tool"
12
+ function: "wrong_two_num_tool"
13
+ mcp_servers:
14
+ - name: "weather"
15
+ type: "stdio"
16
+ command: "npx"
17
+ args: ["-y", "@fak111/weather-mcp"]
18
+ system_message: |
19
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP 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
+
27
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
28
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
29
+
30
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
31
+ response and provide concise, up-to-date information using the integrated tools.
32
+ ui:
33
+ display_type: "rich_terminal"
34
+ logging_enabled: true
@@ -0,0 +1,24 @@
1
+ # MassGen Configuration: Gemini with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_local_custom_tool_example "whats the sum of 123 and 456?"
4
+ agents:
5
+ - id: "qwen3-4b-custom_tool" # Qwen-3-4B Local
6
+ backend:
7
+ type: "lmstudio"
8
+ model: "qwen/qwen3-4b-2507"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ category: "math"
12
+ path: "massgen/tool/_basic/_two_num_tool.py"
13
+ function: "two_num_tool"
14
+ system_message: |
15
+ You are an AI assistant with access to weather information through MCP (Model Context Protocol) integration.
16
+
17
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
18
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
19
+
20
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
21
+ response and provide concise, up-to-date information using the integrated tools.
22
+ ui:
23
+ display_type: "simple"
24
+ logging_enabled: true
@@ -0,0 +1,22 @@
1
+ # MassGen Configuration: Qwen Local with Custom Tool (No Path)
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_local_custom_tool_example_no_path "whats the sum of 123 and 456?"
4
+ agents:
5
+ - id: "qwen3-4b-custom_tool" # Qwen-3-4B Local
6
+ backend:
7
+ type: "lmstudio"
8
+ model: "qwen/qwen3-4b-2507"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ function: "two_num_tool"
12
+ system_message: |
13
+ You are an AI assistant with access to a custom math calculation tool.
14
+
15
+ The two_num_tool is available as a custom tool that can add two numbers together.
16
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
17
+
18
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
19
+ a clear, accurate result.
20
+ ui:
21
+ display_type: "simple"
22
+ logging_enabled: true
@@ -0,0 +1,35 @@
1
+ # MassGen Configuration: Qwen Local with MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_local_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "qwen3-4b-custom_tool" # Qwen-3-4B Local
6
+ backend:
7
+ type: "lmstudio"
8
+ model: "qwen/qwen3-4b-2507"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ category: "math"
12
+ path: "massgen/tool/_basic/_two_num_tool.py"
13
+ function: "two_num_tool"
14
+ mcp_servers:
15
+ - name: "weather"
16
+ type: "stdio"
17
+ command: "npx"
18
+ args: ["-y", "@fak111/weather-mcp"]
19
+ system_message: |
20
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
21
+
22
+ The two_num_tool is available as a custom tool that can add two numbers together.
23
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
24
+
25
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
26
+ a clear, accurate result.
27
+
28
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
29
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
30
+
31
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
32
+ response and provide concise, up-to-date information using the integrated tools.
33
+ ui:
34
+ display_type: "simple"
35
+ logging_enabled: true
@@ -0,0 +1,33 @@
1
+ # MassGen Configuration: Qwen Local with Wrong MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_local_custom_tool_with_wrong_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "qwen3-4b-custom_tool" # Qwen-3-4B Local
6
+ backend:
7
+ type: "lmstudio"
8
+ model: "qwen/qwen3-4b-2507"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ function: "two_num_tool"
12
+ mcp_servers:
13
+ - name: "weather"
14
+ type: "stdio"
15
+ command: "python"
16
+ args: ["-u", "-m", "aaa.bbb"] # Wrong MCP command to demonstrate error handling
17
+ system_message: |
18
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
19
+
20
+ The two_num_tool is available as a custom tool that can add two numbers together.
21
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
22
+
23
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
24
+ a clear, accurate result.
25
+
26
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
27
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
28
+
29
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
30
+ response and provide concise, up-to-date information using the integrated tools.
31
+ ui:
32
+ display_type: "simple"
33
+ logging_enabled: true
@@ -0,0 +1,33 @@
1
+ # MassGen Configuration: Qwen Local with Wrong Custom Tool and MCP Integration
2
+ # Usage:
3
+ # massgen --config @examples/tools/custom_tools/qwen_local_wrong_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ agents:
5
+ - id: "qwen3-4b-custom_tool" # Qwen-3-4B Local
6
+ backend:
7
+ type: "lmstudio"
8
+ model: "qwen/qwen3-4b-2507"
9
+ custom_tools:
10
+ - name: "two_num_tool"
11
+ function: "wrong_two_num_tool"
12
+ mcp_servers:
13
+ - name: "weather"
14
+ type: "stdio"
15
+ command: "npx"
16
+ args: ["-y", "@fak111/weather-mcp"]
17
+ system_message: |
18
+ You are an AI assistant with access to a custom math calculation tool and a weather information MCP tool.
19
+
20
+ The two_num_tool is available as a custom tool that can add two numbers together.
21
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
22
+
23
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
24
+ a clear, accurate result.
25
+
26
+ Weather tools are available via MCP sessions and will be called automatically by the system when needed.
27
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
28
+
29
+ When users ask about weather conditions, forecasts, or alerts, include the location and time frame in your
30
+ response and provide concise, up-to-date information using the integrated tools.
31
+ ui:
32
+ display_type: "simple"
33
+ logging_enabled: true
@@ -61,7 +61,7 @@ agents:
61
61
  orchestrator:
62
62
  snapshot_storage: "claude_code_snapshots" # Directory to store workspace snapshots
63
63
  agent_temporary_workspace: "claude_code_temp_workspaces" # Directory for temporary agent workspaces
64
-
64
+
65
65
  # UI Configuration
66
66
  ui:
67
67
  type: "rich_terminal"
@@ -0,0 +1,67 @@
1
+ # MassGen Voting Sensitivity Configuration Example
2
+ #
3
+ # How to run:
4
+ # massgen --config configs/voting/gemini_gpt_voting_sensitivity.yaml "Your question here"
5
+ #
6
+ # Or in interactive mode:
7
+ # massgen --config configs/voting/gemini_gpt_voting_sensitivity.yaml
8
+ #
9
+ # Try different sensitivity levels by changing the voting_sensitivity value below
10
+
11
+ agents:
12
+ - id: "gemini2.5flash"
13
+ backend:
14
+ type: "gemini"
15
+ model: "gemini-2.5-flash"
16
+ enable_web_search: true
17
+
18
+ - id: "gpt5nano"
19
+ backend:
20
+ type: "openai"
21
+ model: "gpt-5-nano"
22
+ text:
23
+ verbosity: "medium"
24
+ reasoning:
25
+ effort: "medium"
26
+ summary: "auto"
27
+ enable_web_search: true
28
+ enable_code_interpreter: true
29
+
30
+ orchestrator:
31
+ # voting_sensitivity controls how critical agents are when evaluating answers
32
+ #
33
+ # Options:
34
+ # - "lenient" (default): Agents vote for existing answers more readily, fewer new answers
35
+ # Use when you want faster convergence
36
+ #
37
+ # - "balanced": Agents apply detailed criteria (comprehensive, accurate, complete?) before voting,
38
+ # more new answers. Use when you want thorough evaluation
39
+ #
40
+ # - "strict": Agents apply high standards of excellence (all aspects, edge cases, reference-quality) before voting,
41
+ # most new answers. Use when you need maximum quality
42
+ #
43
+ voting_sensitivity: "balanced"
44
+
45
+ # max_new_answers_per_agent controls how many new answers each agent can provide
46
+ # Once an agent reaches this limit, they can only vote (not provide new answers)
47
+ #
48
+ # Options:
49
+ # - null (default): No limit - agents can provide unlimited new answers
50
+ # - 1, 2, 3, etc.: Cap the number of new answers per agent
51
+ #
52
+ # Example: Set to 2 for thorough evaluation but bounded duration
53
+ max_new_answers_per_agent: 2
54
+
55
+ # answer_novelty_requirement controls how different new answers must be from existing ones
56
+ #
57
+ # Options:
58
+ # - "lenient" (default): No additional checks - current behavior (fastest)
59
+ # - "balanced": Reject if >70% token overlap - requires meaningful differences
60
+ # - "strict": Reject if >50% token overlap - requires substantially different solutions
61
+ #
62
+ # Example: Use "balanced" to prevent agents from just rephrasing the same answer
63
+ answer_novelty_requirement: "balanced"
64
+
65
+ ui:
66
+ display_type: "rich_terminal"
67
+ logging_enabled: true