massgen 0.1.0a3__py3-none-any.whl → 0.1.2__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 (120) 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 +15 -2
  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 +83 -0
  9. massgen/backend/{base_with_mcp.py → base_with_custom_tool_and_mcp.py} +286 -15
  10. massgen/backend/capabilities.py +6 -6
  11. massgen/backend/chat_completions.py +200 -103
  12. massgen/backend/claude.py +115 -18
  13. massgen/backend/claude_code.py +378 -14
  14. massgen/backend/docs/CLAUDE_API_RESEARCH.md +3 -3
  15. massgen/backend/gemini.py +1333 -1629
  16. massgen/backend/gemini_mcp_manager.py +545 -0
  17. massgen/backend/gemini_trackers.py +344 -0
  18. massgen/backend/gemini_utils.py +43 -0
  19. massgen/backend/grok.py +39 -6
  20. massgen/backend/response.py +147 -81
  21. massgen/cli.py +605 -110
  22. massgen/config_builder.py +376 -27
  23. massgen/configs/README.md +123 -80
  24. massgen/configs/basic/multi/three_agents_default.yaml +3 -3
  25. massgen/configs/basic/single/single_agent.yaml +1 -1
  26. massgen/configs/providers/openai/gpt5_nano.yaml +3 -3
  27. massgen/configs/tools/custom_tools/claude_code_custom_tool_example.yaml +32 -0
  28. massgen/configs/tools/custom_tools/claude_code_custom_tool_example_no_path.yaml +28 -0
  29. massgen/configs/tools/custom_tools/claude_code_custom_tool_with_mcp_example.yaml +40 -0
  30. massgen/configs/tools/custom_tools/claude_code_custom_tool_with_wrong_mcp_example.yaml +38 -0
  31. massgen/configs/tools/custom_tools/claude_code_wrong_custom_tool_with_mcp_example.yaml +38 -0
  32. massgen/configs/tools/custom_tools/claude_custom_tool_example.yaml +24 -0
  33. massgen/configs/tools/custom_tools/claude_custom_tool_example_no_path.yaml +22 -0
  34. massgen/configs/tools/custom_tools/claude_custom_tool_with_mcp_example.yaml +35 -0
  35. massgen/configs/tools/custom_tools/claude_custom_tool_with_wrong_mcp_example.yaml +33 -0
  36. massgen/configs/tools/custom_tools/claude_wrong_custom_tool_with_mcp_example.yaml +33 -0
  37. massgen/configs/tools/custom_tools/gemini_custom_tool_example.yaml +24 -0
  38. massgen/configs/tools/custom_tools/gemini_custom_tool_example_no_path.yaml +22 -0
  39. massgen/configs/tools/custom_tools/gemini_custom_tool_with_mcp_example.yaml +35 -0
  40. massgen/configs/tools/custom_tools/gemini_custom_tool_with_wrong_mcp_example.yaml +33 -0
  41. massgen/configs/tools/custom_tools/gemini_wrong_custom_tool_with_mcp_example.yaml +33 -0
  42. massgen/configs/tools/custom_tools/github_issue_market_analysis.yaml +94 -0
  43. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_example.yaml +24 -0
  44. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_example_no_path.yaml +22 -0
  45. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_mcp_example.yaml +35 -0
  46. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_wrong_mcp_example.yaml +33 -0
  47. massgen/configs/tools/custom_tools/gpt5_nano_wrong_custom_tool_with_mcp_example.yaml +33 -0
  48. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_example.yaml +25 -0
  49. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_example_no_path.yaml +23 -0
  50. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_mcp_example.yaml +34 -0
  51. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_wrong_mcp_example.yaml +34 -0
  52. massgen/configs/tools/custom_tools/gpt_oss_wrong_custom_tool_with_mcp_example.yaml +34 -0
  53. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_example.yaml +24 -0
  54. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_example_no_path.yaml +22 -0
  55. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_mcp_example.yaml +35 -0
  56. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_wrong_mcp_example.yaml +33 -0
  57. massgen/configs/tools/custom_tools/grok3_mini_wrong_custom_tool_with_mcp_example.yaml +33 -0
  58. massgen/configs/tools/custom_tools/qwen_api_custom_tool_example.yaml +25 -0
  59. massgen/configs/tools/custom_tools/qwen_api_custom_tool_example_no_path.yaml +23 -0
  60. massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_mcp_example.yaml +36 -0
  61. massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_wrong_mcp_example.yaml +34 -0
  62. massgen/configs/tools/custom_tools/qwen_api_wrong_custom_tool_with_mcp_example.yaml +34 -0
  63. massgen/configs/tools/custom_tools/qwen_local_custom_tool_example.yaml +24 -0
  64. massgen/configs/tools/custom_tools/qwen_local_custom_tool_example_no_path.yaml +22 -0
  65. massgen/configs/tools/custom_tools/qwen_local_custom_tool_with_mcp_example.yaml +35 -0
  66. massgen/configs/tools/custom_tools/qwen_local_custom_tool_with_wrong_mcp_example.yaml +33 -0
  67. massgen/configs/tools/custom_tools/qwen_local_wrong_custom_tool_with_mcp_example.yaml +33 -0
  68. massgen/configs/tools/filesystem/claude_code_context_sharing.yaml +1 -1
  69. massgen/configs/tools/planning/five_agents_discord_mcp_planning_mode.yaml +7 -29
  70. massgen/configs/tools/planning/five_agents_filesystem_mcp_planning_mode.yaml +5 -6
  71. massgen/configs/tools/planning/five_agents_notion_mcp_planning_mode.yaml +4 -4
  72. massgen/configs/tools/planning/five_agents_twitter_mcp_planning_mode.yaml +4 -4
  73. massgen/configs/tools/planning/gpt5_mini_case_study_mcp_planning_mode.yaml +2 -2
  74. massgen/configs/voting/gemini_gpt_voting_sensitivity.yaml +67 -0
  75. massgen/formatter/_chat_completions_formatter.py +104 -0
  76. massgen/formatter/_claude_formatter.py +120 -0
  77. massgen/formatter/_gemini_formatter.py +448 -0
  78. massgen/formatter/_response_formatter.py +88 -0
  79. massgen/frontend/coordination_ui.py +4 -2
  80. massgen/logger_config.py +35 -3
  81. massgen/message_templates.py +56 -6
  82. massgen/orchestrator.py +512 -16
  83. massgen/stream_chunk/base.py +3 -0
  84. massgen/tests/custom_tools_example.py +392 -0
  85. massgen/tests/mcp_test_server.py +17 -7
  86. massgen/tests/test_config_builder.py +423 -0
  87. massgen/tests/test_custom_tools.py +401 -0
  88. massgen/tests/test_intelligent_planning_mode.py +643 -0
  89. massgen/tests/test_tools.py +127 -0
  90. massgen/token_manager/token_manager.py +13 -4
  91. massgen/tool/README.md +935 -0
  92. massgen/tool/__init__.py +39 -0
  93. massgen/tool/_async_helpers.py +70 -0
  94. massgen/tool/_basic/__init__.py +8 -0
  95. massgen/tool/_basic/_two_num_tool.py +24 -0
  96. massgen/tool/_code_executors/__init__.py +10 -0
  97. massgen/tool/_code_executors/_python_executor.py +74 -0
  98. massgen/tool/_code_executors/_shell_executor.py +61 -0
  99. massgen/tool/_exceptions.py +39 -0
  100. massgen/tool/_file_handlers/__init__.py +10 -0
  101. massgen/tool/_file_handlers/_file_operations.py +218 -0
  102. massgen/tool/_manager.py +634 -0
  103. massgen/tool/_registered_tool.py +88 -0
  104. massgen/tool/_result.py +66 -0
  105. massgen/tool/_self_evolution/_github_issue_analyzer.py +369 -0
  106. massgen/tool/docs/builtin_tools.md +681 -0
  107. massgen/tool/docs/exceptions.md +794 -0
  108. massgen/tool/docs/execution_results.md +691 -0
  109. massgen/tool/docs/manager.md +887 -0
  110. massgen/tool/docs/workflow_toolkits.md +529 -0
  111. massgen/tool/workflow_toolkits/__init__.py +57 -0
  112. massgen/tool/workflow_toolkits/base.py +55 -0
  113. massgen/tool/workflow_toolkits/new_answer.py +126 -0
  114. massgen/tool/workflow_toolkits/vote.py +167 -0
  115. {massgen-0.1.0a3.dist-info → massgen-0.1.2.dist-info}/METADATA +87 -129
  116. {massgen-0.1.0a3.dist-info → massgen-0.1.2.dist-info}/RECORD +120 -44
  117. {massgen-0.1.0a3.dist-info → massgen-0.1.2.dist-info}/WHEEL +0 -0
  118. {massgen-0.1.0a3.dist-info → massgen-0.1.2.dist-info}/entry_points.txt +0 -0
  119. {massgen-0.1.0a3.dist-info → massgen-0.1.2.dist-info}/licenses/LICENSE +0 -0
  120. {massgen-0.1.0a3.dist-info → massgen-0.1.2.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"