massgen 0.0.3__py3-none-any.whl → 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of massgen might be problematic. Click here for more details.
- massgen/__init__.py +142 -8
- massgen/adapters/__init__.py +29 -0
- massgen/adapters/ag2_adapter.py +483 -0
- massgen/adapters/base.py +183 -0
- massgen/adapters/tests/__init__.py +0 -0
- massgen/adapters/tests/test_ag2_adapter.py +439 -0
- massgen/adapters/tests/test_agent_adapter.py +128 -0
- massgen/adapters/utils/__init__.py +2 -0
- massgen/adapters/utils/ag2_utils.py +236 -0
- massgen/adapters/utils/tests/__init__.py +0 -0
- massgen/adapters/utils/tests/test_ag2_utils.py +138 -0
- massgen/agent_config.py +329 -55
- massgen/api_params_handler/__init__.py +10 -0
- massgen/api_params_handler/_api_params_handler_base.py +99 -0
- massgen/api_params_handler/_chat_completions_api_params_handler.py +176 -0
- massgen/api_params_handler/_claude_api_params_handler.py +113 -0
- massgen/api_params_handler/_response_api_params_handler.py +130 -0
- massgen/backend/__init__.py +39 -4
- massgen/backend/azure_openai.py +385 -0
- massgen/backend/base.py +341 -69
- massgen/backend/base_with_mcp.py +1102 -0
- massgen/backend/capabilities.py +386 -0
- massgen/backend/chat_completions.py +577 -130
- massgen/backend/claude.py +1033 -537
- massgen/backend/claude_code.py +1203 -0
- massgen/backend/cli_base.py +209 -0
- massgen/backend/docs/BACKEND_ARCHITECTURE.md +126 -0
- massgen/backend/{CLAUDE_API_RESEARCH.md → docs/CLAUDE_API_RESEARCH.md} +18 -18
- massgen/backend/{GEMINI_API_DOCUMENTATION.md → docs/GEMINI_API_DOCUMENTATION.md} +9 -9
- massgen/backend/docs/Gemini MCP Integration Analysis.md +1050 -0
- massgen/backend/docs/MCP_IMPLEMENTATION_CLAUDE_BACKEND.md +177 -0
- massgen/backend/docs/MCP_INTEGRATION_RESPONSE_BACKEND.md +352 -0
- massgen/backend/docs/OPENAI_GPT5_MODELS.md +211 -0
- massgen/backend/{OPENAI_RESPONSES_API_FORMAT.md → docs/OPENAI_RESPONSE_API_TOOL_CALLS.md} +3 -3
- massgen/backend/docs/OPENAI_response_streaming.md +20654 -0
- massgen/backend/docs/inference_backend.md +257 -0
- massgen/backend/docs/permissions_and_context_files.md +1085 -0
- massgen/backend/external.py +126 -0
- massgen/backend/gemini.py +1850 -241
- massgen/backend/grok.py +40 -156
- massgen/backend/inference.py +156 -0
- massgen/backend/lmstudio.py +171 -0
- massgen/backend/response.py +1095 -322
- massgen/chat_agent.py +131 -113
- massgen/cli.py +1560 -275
- massgen/config_builder.py +2396 -0
- massgen/configs/BACKEND_CONFIGURATION.md +458 -0
- massgen/configs/README.md +559 -216
- massgen/configs/ag2/ag2_case_study.yaml +27 -0
- massgen/configs/ag2/ag2_coder.yaml +34 -0
- massgen/configs/ag2/ag2_coder_case_study.yaml +36 -0
- massgen/configs/ag2/ag2_gemini.yaml +27 -0
- massgen/configs/ag2/ag2_groupchat.yaml +108 -0
- massgen/configs/ag2/ag2_groupchat_gpt.yaml +118 -0
- massgen/configs/ag2/ag2_single_agent.yaml +21 -0
- massgen/configs/basic/multi/fast_timeout_example.yaml +37 -0
- massgen/configs/basic/multi/gemini_4o_claude.yaml +31 -0
- massgen/configs/basic/multi/gemini_gpt5nano_claude.yaml +36 -0
- massgen/configs/{gemini_4o_claude.yaml → basic/multi/geminicode_4o_claude.yaml} +3 -3
- massgen/configs/basic/multi/geminicode_gpt5nano_claude.yaml +36 -0
- massgen/configs/basic/multi/glm_gemini_claude.yaml +25 -0
- massgen/configs/basic/multi/gpt4o_audio_generation.yaml +30 -0
- massgen/configs/basic/multi/gpt4o_image_generation.yaml +31 -0
- massgen/configs/basic/multi/gpt5nano_glm_qwen.yaml +26 -0
- massgen/configs/basic/multi/gpt5nano_image_understanding.yaml +26 -0
- massgen/configs/{three_agents_default.yaml → basic/multi/three_agents_default.yaml} +8 -4
- massgen/configs/basic/multi/three_agents_opensource.yaml +27 -0
- massgen/configs/basic/multi/three_agents_vllm.yaml +20 -0
- massgen/configs/basic/multi/two_agents_gemini.yaml +19 -0
- massgen/configs/{two_agents.yaml → basic/multi/two_agents_gpt5.yaml} +14 -6
- massgen/configs/basic/multi/two_agents_opensource_lmstudio.yaml +31 -0
- massgen/configs/basic/multi/two_qwen_vllm_sglang.yaml +28 -0
- massgen/configs/{single_agent.yaml → basic/single/single_agent.yaml} +1 -1
- massgen/configs/{single_flash2.5.yaml → basic/single/single_flash2.5.yaml} +1 -2
- massgen/configs/basic/single/single_gemini2.5pro.yaml +16 -0
- massgen/configs/basic/single/single_gpt4o_audio_generation.yaml +22 -0
- massgen/configs/basic/single/single_gpt4o_image_generation.yaml +22 -0
- massgen/configs/basic/single/single_gpt4o_video_generation.yaml +24 -0
- massgen/configs/basic/single/single_gpt5nano.yaml +20 -0
- massgen/configs/basic/single/single_gpt5nano_file_search.yaml +18 -0
- massgen/configs/basic/single/single_gpt5nano_image_understanding.yaml +17 -0
- massgen/configs/basic/single/single_gptoss120b.yaml +15 -0
- massgen/configs/basic/single/single_openrouter_audio_understanding.yaml +15 -0
- massgen/configs/basic/single/single_qwen_video_understanding.yaml +15 -0
- massgen/configs/debug/code_execution/command_filtering_blacklist.yaml +29 -0
- massgen/configs/debug/code_execution/command_filtering_whitelist.yaml +28 -0
- massgen/configs/debug/code_execution/docker_verification.yaml +29 -0
- massgen/configs/debug/skip_coordination_test.yaml +27 -0
- massgen/configs/debug/test_sdk_migration.yaml +17 -0
- massgen/configs/docs/DISCORD_MCP_SETUP.md +208 -0
- massgen/configs/docs/TWITTER_MCP_ENESCINAR_SETUP.md +82 -0
- massgen/configs/providers/azure/azure_openai_multi.yaml +21 -0
- massgen/configs/providers/azure/azure_openai_single.yaml +19 -0
- massgen/configs/providers/claude/claude.yaml +14 -0
- massgen/configs/providers/gemini/gemini_gpt5nano.yaml +28 -0
- massgen/configs/providers/local/lmstudio.yaml +11 -0
- massgen/configs/providers/openai/gpt5.yaml +46 -0
- massgen/configs/providers/openai/gpt5_nano.yaml +46 -0
- massgen/configs/providers/others/grok_single_agent.yaml +19 -0
- massgen/configs/providers/others/zai_coding_team.yaml +108 -0
- massgen/configs/providers/others/zai_glm45.yaml +12 -0
- massgen/configs/{creative_team.yaml → teams/creative/creative_team.yaml} +16 -6
- massgen/configs/{travel_planning.yaml → teams/creative/travel_planning.yaml} +16 -6
- massgen/configs/{news_analysis.yaml → teams/research/news_analysis.yaml} +16 -6
- massgen/configs/{research_team.yaml → teams/research/research_team.yaml} +15 -7
- massgen/configs/{technical_analysis.yaml → teams/research/technical_analysis.yaml} +16 -6
- massgen/configs/tools/code-execution/basic_command_execution.yaml +25 -0
- massgen/configs/tools/code-execution/code_execution_use_case_simple.yaml +41 -0
- massgen/configs/tools/code-execution/docker_claude_code.yaml +32 -0
- massgen/configs/tools/code-execution/docker_multi_agent.yaml +32 -0
- massgen/configs/tools/code-execution/docker_simple.yaml +29 -0
- massgen/configs/tools/code-execution/docker_with_resource_limits.yaml +32 -0
- massgen/configs/tools/code-execution/multi_agent_playwright_automation.yaml +57 -0
- massgen/configs/tools/filesystem/cc_gpt5_gemini_filesystem.yaml +34 -0
- massgen/configs/tools/filesystem/claude_code_context_sharing.yaml +68 -0
- massgen/configs/tools/filesystem/claude_code_flash2.5.yaml +43 -0
- massgen/configs/tools/filesystem/claude_code_flash2.5_gptoss.yaml +49 -0
- massgen/configs/tools/filesystem/claude_code_gpt5nano.yaml +31 -0
- massgen/configs/tools/filesystem/claude_code_single.yaml +40 -0
- massgen/configs/tools/filesystem/fs_permissions_test.yaml +87 -0
- massgen/configs/tools/filesystem/gemini_gemini_workspace_cleanup.yaml +54 -0
- massgen/configs/tools/filesystem/gemini_gpt5_filesystem_casestudy.yaml +30 -0
- massgen/configs/tools/filesystem/gemini_gpt5nano_file_context_path.yaml +43 -0
- massgen/configs/tools/filesystem/gemini_gpt5nano_protected_paths.yaml +45 -0
- massgen/configs/tools/filesystem/gpt5mini_cc_fs_context_path.yaml +31 -0
- massgen/configs/tools/filesystem/grok4_gpt5_gemini_filesystem.yaml +32 -0
- massgen/configs/tools/filesystem/multiturn/grok4_gpt5_claude_code_filesystem_multiturn.yaml +58 -0
- massgen/configs/tools/filesystem/multiturn/grok4_gpt5_gemini_filesystem_multiturn.yaml +58 -0
- massgen/configs/tools/filesystem/multiturn/two_claude_code_filesystem_multiturn.yaml +47 -0
- massgen/configs/tools/filesystem/multiturn/two_gemini_flash_filesystem_multiturn.yaml +48 -0
- massgen/configs/tools/mcp/claude_code_discord_mcp_example.yaml +27 -0
- massgen/configs/tools/mcp/claude_code_simple_mcp.yaml +35 -0
- massgen/configs/tools/mcp/claude_code_twitter_mcp_example.yaml +32 -0
- massgen/configs/tools/mcp/claude_mcp_example.yaml +24 -0
- massgen/configs/tools/mcp/claude_mcp_test.yaml +27 -0
- massgen/configs/tools/mcp/five_agents_travel_mcp_test.yaml +157 -0
- massgen/configs/tools/mcp/five_agents_weather_mcp_test.yaml +103 -0
- massgen/configs/tools/mcp/gemini_mcp_example.yaml +24 -0
- massgen/configs/tools/mcp/gemini_mcp_filesystem_test.yaml +23 -0
- massgen/configs/tools/mcp/gemini_mcp_filesystem_test_sharing.yaml +23 -0
- massgen/configs/tools/mcp/gemini_mcp_filesystem_test_single_agent.yaml +17 -0
- massgen/configs/tools/mcp/gemini_mcp_filesystem_test_with_claude_code.yaml +24 -0
- massgen/configs/tools/mcp/gemini_mcp_test.yaml +27 -0
- massgen/configs/tools/mcp/gemini_notion_mcp.yaml +52 -0
- massgen/configs/tools/mcp/gpt5_nano_mcp_example.yaml +24 -0
- massgen/configs/tools/mcp/gpt5_nano_mcp_test.yaml +27 -0
- massgen/configs/tools/mcp/gpt5mini_claude_code_discord_mcp_example.yaml +38 -0
- massgen/configs/tools/mcp/gpt_oss_mcp_example.yaml +25 -0
- massgen/configs/tools/mcp/gpt_oss_mcp_test.yaml +28 -0
- massgen/configs/tools/mcp/grok3_mini_mcp_example.yaml +24 -0
- massgen/configs/tools/mcp/grok3_mini_mcp_test.yaml +27 -0
- massgen/configs/tools/mcp/multimcp_gemini.yaml +111 -0
- massgen/configs/tools/mcp/qwen_api_mcp_example.yaml +25 -0
- massgen/configs/tools/mcp/qwen_api_mcp_test.yaml +28 -0
- massgen/configs/tools/mcp/qwen_local_mcp_example.yaml +24 -0
- massgen/configs/tools/mcp/qwen_local_mcp_test.yaml +27 -0
- massgen/configs/tools/planning/five_agents_discord_mcp_planning_mode.yaml +140 -0
- massgen/configs/tools/planning/five_agents_filesystem_mcp_planning_mode.yaml +151 -0
- massgen/configs/tools/planning/five_agents_notion_mcp_planning_mode.yaml +151 -0
- massgen/configs/tools/planning/five_agents_twitter_mcp_planning_mode.yaml +155 -0
- massgen/configs/tools/planning/gpt5_mini_case_study_mcp_planning_mode.yaml +73 -0
- massgen/configs/tools/web-search/claude_streamable_http_test.yaml +43 -0
- massgen/configs/tools/web-search/gemini_streamable_http_test.yaml +43 -0
- massgen/configs/tools/web-search/gpt5_mini_streamable_http_test.yaml +43 -0
- massgen/configs/tools/web-search/gpt_oss_streamable_http_test.yaml +44 -0
- massgen/configs/tools/web-search/grok3_mini_streamable_http_test.yaml +43 -0
- massgen/configs/tools/web-search/qwen_api_streamable_http_test.yaml +44 -0
- massgen/configs/tools/web-search/qwen_local_streamable_http_test.yaml +43 -0
- massgen/coordination_tracker.py +708 -0
- massgen/docker/README.md +462 -0
- massgen/filesystem_manager/__init__.py +21 -0
- massgen/filesystem_manager/_base.py +9 -0
- massgen/filesystem_manager/_code_execution_server.py +545 -0
- massgen/filesystem_manager/_docker_manager.py +477 -0
- massgen/filesystem_manager/_file_operation_tracker.py +248 -0
- massgen/filesystem_manager/_filesystem_manager.py +813 -0
- massgen/filesystem_manager/_path_permission_manager.py +1261 -0
- massgen/filesystem_manager/_workspace_tools_server.py +1815 -0
- massgen/formatter/__init__.py +10 -0
- massgen/formatter/_chat_completions_formatter.py +284 -0
- massgen/formatter/_claude_formatter.py +235 -0
- massgen/formatter/_formatter_base.py +156 -0
- massgen/formatter/_response_formatter.py +263 -0
- massgen/frontend/__init__.py +1 -2
- massgen/frontend/coordination_ui.py +471 -286
- massgen/frontend/displays/base_display.py +56 -11
- massgen/frontend/displays/create_coordination_table.py +1956 -0
- massgen/frontend/displays/rich_terminal_display.py +1259 -619
- massgen/frontend/displays/simple_display.py +9 -4
- massgen/frontend/displays/terminal_display.py +27 -68
- massgen/logger_config.py +681 -0
- massgen/mcp_tools/README.md +232 -0
- massgen/mcp_tools/__init__.py +105 -0
- massgen/mcp_tools/backend_utils.py +1035 -0
- massgen/mcp_tools/circuit_breaker.py +195 -0
- massgen/mcp_tools/client.py +894 -0
- massgen/mcp_tools/config_validator.py +138 -0
- massgen/mcp_tools/docs/circuit_breaker.md +646 -0
- massgen/mcp_tools/docs/client.md +950 -0
- massgen/mcp_tools/docs/config_validator.md +478 -0
- massgen/mcp_tools/docs/exceptions.md +1165 -0
- massgen/mcp_tools/docs/security.md +854 -0
- massgen/mcp_tools/exceptions.py +338 -0
- massgen/mcp_tools/hooks.py +212 -0
- massgen/mcp_tools/security.py +780 -0
- massgen/message_templates.py +342 -64
- massgen/orchestrator.py +1515 -241
- massgen/stream_chunk/__init__.py +35 -0
- massgen/stream_chunk/base.py +92 -0
- massgen/stream_chunk/multimodal.py +237 -0
- massgen/stream_chunk/text.py +162 -0
- massgen/tests/mcp_test_server.py +150 -0
- massgen/tests/multi_turn_conversation_design.md +0 -8
- massgen/tests/test_azure_openai_backend.py +156 -0
- massgen/tests/test_backend_capabilities.py +262 -0
- massgen/tests/test_backend_event_loop_all.py +179 -0
- massgen/tests/test_chat_completions_refactor.py +142 -0
- massgen/tests/test_claude_backend.py +15 -28
- massgen/tests/test_claude_code.py +268 -0
- massgen/tests/test_claude_code_context_sharing.py +233 -0
- massgen/tests/test_claude_code_orchestrator.py +175 -0
- massgen/tests/test_cli_backends.py +180 -0
- massgen/tests/test_code_execution.py +679 -0
- massgen/tests/test_external_agent_backend.py +134 -0
- massgen/tests/test_final_presentation_fallback.py +237 -0
- massgen/tests/test_gemini_planning_mode.py +351 -0
- massgen/tests/test_grok_backend.py +7 -10
- massgen/tests/test_http_mcp_server.py +42 -0
- massgen/tests/test_integration_simple.py +198 -0
- massgen/tests/test_mcp_blocking.py +125 -0
- massgen/tests/test_message_context_building.py +29 -47
- massgen/tests/test_orchestrator_final_presentation.py +48 -0
- massgen/tests/test_path_permission_manager.py +2087 -0
- massgen/tests/test_rich_terminal_display.py +14 -13
- massgen/tests/test_timeout.py +133 -0
- massgen/tests/test_v3_3agents.py +11 -12
- massgen/tests/test_v3_simple.py +8 -13
- massgen/tests/test_v3_three_agents.py +11 -18
- massgen/tests/test_v3_two_agents.py +8 -13
- massgen/token_manager/__init__.py +7 -0
- massgen/token_manager/token_manager.py +400 -0
- massgen/utils.py +52 -16
- massgen/v1/agent.py +45 -91
- massgen/v1/agents.py +18 -53
- massgen/v1/backends/gemini.py +50 -153
- massgen/v1/backends/grok.py +21 -54
- massgen/v1/backends/oai.py +39 -111
- massgen/v1/cli.py +36 -93
- massgen/v1/config.py +8 -12
- massgen/v1/logging.py +43 -127
- massgen/v1/main.py +18 -32
- massgen/v1/orchestrator.py +68 -209
- massgen/v1/streaming_display.py +62 -163
- massgen/v1/tools.py +8 -12
- massgen/v1/types.py +9 -23
- massgen/v1/utils.py +5 -23
- massgen-0.1.0.dist-info/METADATA +1245 -0
- massgen-0.1.0.dist-info/RECORD +273 -0
- massgen-0.1.0.dist-info/entry_points.txt +2 -0
- massgen/frontend/logging/__init__.py +0 -9
- massgen/frontend/logging/realtime_logger.py +0 -197
- massgen-0.0.3.dist-info/METADATA +0 -568
- massgen-0.0.3.dist-info/RECORD +0 -76
- massgen-0.0.3.dist-info/entry_points.txt +0 -2
- /massgen/backend/{Function calling openai responses.md → docs/Function calling openai responses.md} +0 -0
- {massgen-0.0.3.dist-info → massgen-0.1.0.dist-info}/WHEEL +0 -0
- {massgen-0.0.3.dist-info → massgen-0.1.0.dist-info}/licenses/LICENSE +0 -0
- {massgen-0.0.3.dist-info → massgen-0.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
# Backend Configuration Guide
|
|
2
|
+
|
|
3
|
+
Complete configuration reference for all MassGen backends with examples and parameters.
|
|
4
|
+
|
|
5
|
+
## Quick Navigation
|
|
6
|
+
|
|
7
|
+
- [OpenAI](#openai)
|
|
8
|
+
- [Claude](#claude)
|
|
9
|
+
- [Claude Code](#claude-code)
|
|
10
|
+
- [Gemini](#gemini)
|
|
11
|
+
- [Grok](#grok)
|
|
12
|
+
- [Azure OpenAI](#azure-openai)
|
|
13
|
+
- [Chat Completions](#chat-completions)
|
|
14
|
+
- [Z AI](#z-ai)
|
|
15
|
+
- [LM Studio (Local Models)](#lm-studio)
|
|
16
|
+
|
|
17
|
+
## Common Parameters
|
|
18
|
+
|
|
19
|
+
These parameters are available across most backends:
|
|
20
|
+
|
|
21
|
+
| Parameter | Type | Description | Default |
|
|
22
|
+
|-----------|------|-------------|---------|
|
|
23
|
+
| `type` | string | Backend type identifier | Required |
|
|
24
|
+
| `model` | string | Model name/identifier | Required |
|
|
25
|
+
| `api_key` | string | API key (uses env vars if not set) | From environment |
|
|
26
|
+
| `temperature` | float | Creativity (0.0-1.0) | 0.7 |
|
|
27
|
+
| `max_tokens` | int | Maximum response length | Model default |
|
|
28
|
+
| `cwd` | string | Working directory for file operations | None |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## OpenAI
|
|
33
|
+
|
|
34
|
+
Full support for GPT-5 series with advanced reasoning and MCP integration (v0.0.17+).
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
backend:
|
|
38
|
+
type: "openai"
|
|
39
|
+
model: "gpt-5-mini" # gpt-5, gpt-5-mini, gpt-5-nano, gpt-4, etc.
|
|
40
|
+
api_key: "<optional_key>" # Uses OPENAI_API_KEY env var by default
|
|
41
|
+
temperature: 0.7 # Not supported for GPT-5 series and o-series
|
|
42
|
+
max_tokens: 2500 # Not supported for GPT-5 series and o-series
|
|
43
|
+
|
|
44
|
+
# GPT-5 specific parameters
|
|
45
|
+
text:
|
|
46
|
+
verbosity: "medium" # low/medium/high (GPT-5 only)
|
|
47
|
+
reasoning:
|
|
48
|
+
effort: "medium" # low/medium/high (GPT-5 and o-series)
|
|
49
|
+
summary: "auto" # Automatic reasoning summaries
|
|
50
|
+
|
|
51
|
+
# Builtin tools
|
|
52
|
+
enable_web_search: true # Web search capability
|
|
53
|
+
enable_code_interpreter: true # Code interpreter capability
|
|
54
|
+
|
|
55
|
+
# MCP servers (v0.0.17+)
|
|
56
|
+
mcp_servers:
|
|
57
|
+
weather:
|
|
58
|
+
type: "stdio"
|
|
59
|
+
command: "npx"
|
|
60
|
+
args: ["-y", "@modelcontextprotocol/server-weather"]
|
|
61
|
+
|
|
62
|
+
brave_search:
|
|
63
|
+
type: "stdio"
|
|
64
|
+
command: "npx"
|
|
65
|
+
args: ["-y", "@modelcontextprotocol/server-brave-search"]
|
|
66
|
+
env:
|
|
67
|
+
BRAVE_API_KEY: "${BRAVE_API_KEY}"
|
|
68
|
+
|
|
69
|
+
# Tool control
|
|
70
|
+
allowed_tools: # Whitelist specific tools
|
|
71
|
+
- "mcp__weather__get_current_weather"
|
|
72
|
+
- "mcp__brave_search__brave_web_search"
|
|
73
|
+
|
|
74
|
+
exclude_tools: # Blacklist specific tools
|
|
75
|
+
- "mcp__weather__debug_mode"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### OpenAI-Specific Features
|
|
79
|
+
- **GPT-5 Series**: Advanced reasoning with `text.verbosity` and `reasoning.effort` parameters
|
|
80
|
+
- **Code Interpreter**: Built-in code execution environment
|
|
81
|
+
- **Web Search**: Real-time web search capability
|
|
82
|
+
- **MCP Support**: Full MCP integration since v0.0.17
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Claude
|
|
87
|
+
|
|
88
|
+
Anthropic's Claude models with Messages API and MCP support (v0.0.20+).
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
backend:
|
|
92
|
+
type: "claude"
|
|
93
|
+
model: "claude-sonnet-4-20250514" # claude-opus-4, claude-sonnet-4, claude-haiku-3.5
|
|
94
|
+
api_key: "<optional_key>" # Uses ANTHROPIC_API_KEY env var by default
|
|
95
|
+
temperature: 0.7
|
|
96
|
+
max_tokens: 4096 # Claude supports larger context
|
|
97
|
+
|
|
98
|
+
# Builtin tools
|
|
99
|
+
enable_web_search: true
|
|
100
|
+
enable_code_execution: true
|
|
101
|
+
|
|
102
|
+
# MCP servers (v0.0.20+)
|
|
103
|
+
mcp_servers:
|
|
104
|
+
test_server:
|
|
105
|
+
type: "stdio"
|
|
106
|
+
command: "python"
|
|
107
|
+
args: ["-u", "-m", "massgen.tests.mcp_test_server"]
|
|
108
|
+
|
|
109
|
+
weather:
|
|
110
|
+
type: "stdio"
|
|
111
|
+
command: "npx"
|
|
112
|
+
args: ["-y", "@fak111/weather-mcp"]
|
|
113
|
+
|
|
114
|
+
# HTTP-based MCP server
|
|
115
|
+
api_server:
|
|
116
|
+
type: "streamable-http"
|
|
117
|
+
url: "http://localhost:5173/sse"
|
|
118
|
+
|
|
119
|
+
# Tool control
|
|
120
|
+
allowed_tools:
|
|
121
|
+
- "mcp__test_server__mcp_echo"
|
|
122
|
+
- "mcp__weather__get_current_weather"
|
|
123
|
+
|
|
124
|
+
exclude_tools:
|
|
125
|
+
- "mcp__test_server__current_time"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Claude-Specific Features
|
|
129
|
+
- **Large Context Window**: Up to 200K tokens context
|
|
130
|
+
- **Recursive MCP Execution**: Autonomous tool chaining (v0.0.20+)
|
|
131
|
+
- **Web Search & Code Execution**: Built-in capabilities
|
|
132
|
+
- **Streaming Support**: Full async streaming with tool use
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Claude Code
|
|
137
|
+
|
|
138
|
+
Native Claude Code SDK integration with comprehensive development tools.
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
backend:
|
|
142
|
+
type: "claude_code"
|
|
143
|
+
cwd: "claude_code_workspace" # Working directory for file operations
|
|
144
|
+
api_key: "<optional_key>" # Uses ANTHROPIC_API_KEY env var by default
|
|
145
|
+
|
|
146
|
+
# Claude Code specific options
|
|
147
|
+
system_prompt: "" # Custom system prompt to replace default
|
|
148
|
+
append_system_prompt: "" # Custom system prompt to append
|
|
149
|
+
max_thinking_tokens: 4096 # Maximum thinking tokens
|
|
150
|
+
|
|
151
|
+
# MCP servers
|
|
152
|
+
mcp_servers:
|
|
153
|
+
discord:
|
|
154
|
+
type: "stdio"
|
|
155
|
+
command: "npx"
|
|
156
|
+
args: ["-y", "mcp-discord", "--config", "YOUR_DISCORD_TOKEN"]
|
|
157
|
+
|
|
158
|
+
playwright:
|
|
159
|
+
type: "stdio"
|
|
160
|
+
command: "npx"
|
|
161
|
+
args: [
|
|
162
|
+
"@playwright/mcp@latest",
|
|
163
|
+
"--browser=chrome",
|
|
164
|
+
"--caps=vision,pdf",
|
|
165
|
+
"--user-data-dir=/tmp/playwright-profile",
|
|
166
|
+
"--save-trace"
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
# Native Claude Code tools
|
|
170
|
+
allowed_tools:
|
|
171
|
+
- "Read" # Read files
|
|
172
|
+
- "Write" # Write files
|
|
173
|
+
- "Edit" # Edit files
|
|
174
|
+
- "MultiEdit" # Multiple edits
|
|
175
|
+
- "Bash" # Shell commands
|
|
176
|
+
- "Grep" # Search in files
|
|
177
|
+
- "Glob" # Find files
|
|
178
|
+
- "LS" # List directory
|
|
179
|
+
- "WebSearch" # Web search
|
|
180
|
+
- "WebFetch" # Fetch web content
|
|
181
|
+
- "TodoWrite" # Task management
|
|
182
|
+
- "NotebookEdit" # Jupyter notebooks
|
|
183
|
+
# MCP tools are auto-discovered
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Claude Code-Specific Features
|
|
187
|
+
- **Native File Operations**: Built-in filesystem tools
|
|
188
|
+
- **Development Environment**: Complete coding assistant
|
|
189
|
+
- **Task Management**: TodoWrite for tracking progress
|
|
190
|
+
- **Jupyter Support**: Notebook editing capabilities
|
|
191
|
+
- **MCP Integration**: Supports external MCP servers
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Gemini
|
|
196
|
+
|
|
197
|
+
Google's Gemini models with Chat API and comprehensive MCP support (v0.0.15+).
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
backend:
|
|
201
|
+
type: "gemini"
|
|
202
|
+
model: "gemini-2.5-flash" # gemini-2.5-flash, gemini-2.5-pro
|
|
203
|
+
api_key: "<optional_key>" # Uses GOOGLE_API_KEY env var by default
|
|
204
|
+
temperature: 0.7
|
|
205
|
+
max_tokens: 2500
|
|
206
|
+
top_p: 0.95 # Nucleus sampling parameter
|
|
207
|
+
|
|
208
|
+
# Builtin tools
|
|
209
|
+
enable_web_search: true
|
|
210
|
+
enable_code_execution: true
|
|
211
|
+
|
|
212
|
+
# MCP servers (v0.0.15+)
|
|
213
|
+
mcp_servers:
|
|
214
|
+
weather:
|
|
215
|
+
type: "stdio"
|
|
216
|
+
command: "npx"
|
|
217
|
+
args: ["-y", "@fak111/weather-mcp"]
|
|
218
|
+
|
|
219
|
+
brave_search:
|
|
220
|
+
type: "stdio"
|
|
221
|
+
command: "npx"
|
|
222
|
+
args: ["-y", "@modelcontextprotocol/server-brave-search"]
|
|
223
|
+
env:
|
|
224
|
+
BRAVE_API_KEY: "${BRAVE_API_KEY}"
|
|
225
|
+
|
|
226
|
+
airbnb:
|
|
227
|
+
type: "stdio"
|
|
228
|
+
command: "npx"
|
|
229
|
+
args: ["-y", "@openbnb/mcp-server-airbnb", "--ignore-robots-txt"]
|
|
230
|
+
|
|
231
|
+
# HTTP-based server
|
|
232
|
+
custom_api:
|
|
233
|
+
type: "streamable-http"
|
|
234
|
+
url: "http://localhost:5173/sse"
|
|
235
|
+
|
|
236
|
+
# Tool control
|
|
237
|
+
allowed_tools:
|
|
238
|
+
- "mcp__weather__get_current_weather"
|
|
239
|
+
- "mcp__brave_search__brave_web_search"
|
|
240
|
+
- "mcp__airbnb__airbnb_search"
|
|
241
|
+
|
|
242
|
+
exclude_tools:
|
|
243
|
+
- "mcp__airbnb__debug_mode"
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Gemini-Specific Features
|
|
247
|
+
- **Multimodal Support**: Image and text understanding
|
|
248
|
+
- **Fast Inference**: Optimized for speed (Flash models)
|
|
249
|
+
- **Code Execution**: Built-in code interpreter
|
|
250
|
+
- **Multi-Server MCP**: Support for multiple MCP servers simultaneously
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Grok
|
|
255
|
+
|
|
256
|
+
xAI's Grok models with Live Search and MCP integration (v0.0.21+).
|
|
257
|
+
|
|
258
|
+
```yaml
|
|
259
|
+
backend:
|
|
260
|
+
type: "grok"
|
|
261
|
+
model: "grok-3-mini" # grok-3, grok-3-mini, grok-4
|
|
262
|
+
api_key: "<optional_key>" # Uses XAI_API_KEY env var by default
|
|
263
|
+
temperature: 0.7
|
|
264
|
+
max_tokens: 2500
|
|
265
|
+
|
|
266
|
+
# Grok Live Search
|
|
267
|
+
enable_web_search: true # Uses default: mode="auto", return_citations=true
|
|
268
|
+
|
|
269
|
+
# Automatic filesystem MCP when cwd is provided
|
|
270
|
+
cwd: "workspace" # Enables filesystem MCP server
|
|
271
|
+
|
|
272
|
+
# MCP servers (v0.0.21+)
|
|
273
|
+
mcp_servers:
|
|
274
|
+
weather:
|
|
275
|
+
type: "stdio"
|
|
276
|
+
command: "npx"
|
|
277
|
+
args: ["-y", "@fak111/weather-mcp"]
|
|
278
|
+
|
|
279
|
+
# Alternative: Manual search parameters (conflicts with enable_web_search)
|
|
280
|
+
# extra_body:
|
|
281
|
+
# search_parameters:
|
|
282
|
+
# mode: "auto"
|
|
283
|
+
# return_citations: true
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Grok-Specific Features
|
|
287
|
+
- **Live Search**: Real-time web search with citations
|
|
288
|
+
- **Automatic Filesystem MCP**: When `cwd` is set
|
|
289
|
+
- **Cost-Effective Mini Models**: Lower pricing for mini variants
|
|
290
|
+
- **Full MCP Support**: Since v0.0.21
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Azure OpenAI
|
|
295
|
+
|
|
296
|
+
Microsoft Azure-hosted OpenAI models with deployment management.
|
|
297
|
+
|
|
298
|
+
```yaml
|
|
299
|
+
backend:
|
|
300
|
+
type: "azure_openai"
|
|
301
|
+
model: "gpt-4.1" # Your Azure deployment name
|
|
302
|
+
base_url: "https://your-resource.openai.azure.com/" # Your Azure endpoint
|
|
303
|
+
api_key: "<optional_key>" # Uses AZURE_OPENAI_API_KEY env var by default
|
|
304
|
+
api_version: "2024-02-15-preview" # Azure API version
|
|
305
|
+
temperature: 0.7
|
|
306
|
+
max_tokens: 2500
|
|
307
|
+
|
|
308
|
+
# Azure-specific features
|
|
309
|
+
enable_code_interpreter: true # Code interpreter capability
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Azure-Specific Features
|
|
313
|
+
- **Enterprise Security**: Azure AD integration
|
|
314
|
+
- **Regional Deployment**: Data residency compliance
|
|
315
|
+
- **Code Interpreter**: Built-in code execution
|
|
316
|
+
- **Custom Deployments**: Use your own fine-tuned models
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Chat Completions
|
|
321
|
+
|
|
322
|
+
Generic backend supporting multiple providers (v0.0.18+ with MCP).
|
|
323
|
+
|
|
324
|
+
Supports: Cerebras AI, Together AI, Fireworks AI, Groq, Nebius AI Studio, OpenRouter, Kimi/Moonshot, and any OpenAI-compatible API.
|
|
325
|
+
|
|
326
|
+
```yaml
|
|
327
|
+
backend:
|
|
328
|
+
type: "chatcompletion"
|
|
329
|
+
model: "llama3.3-70b" # Model varies by provider
|
|
330
|
+
base_url: "https://api.together.xyz/v1" # Provider endpoint
|
|
331
|
+
api_key: "<optional_key>" # Provider-specific API key
|
|
332
|
+
temperature: 0.7
|
|
333
|
+
max_tokens: 2500
|
|
334
|
+
|
|
335
|
+
# MCP servers (v0.0.18+)
|
|
336
|
+
mcp_servers:
|
|
337
|
+
weather:
|
|
338
|
+
type: "stdio"
|
|
339
|
+
command: "npx"
|
|
340
|
+
args: ["-y", "@fak111/weather-mcp"]
|
|
341
|
+
|
|
342
|
+
test_server:
|
|
343
|
+
type: "stdio"
|
|
344
|
+
command: "python"
|
|
345
|
+
args: ["-u", "-m", "massgen.tests.mcp_test_server"]
|
|
346
|
+
|
|
347
|
+
# Tool control
|
|
348
|
+
allowed_tools:
|
|
349
|
+
- "mcp__weather__get_current_weather"
|
|
350
|
+
- "mcp__test_server__mcp_echo"
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Provider-Specific Base URLs
|
|
354
|
+
- **Cerebras**: `https://api.cerebras.ai/v1`
|
|
355
|
+
- **Together AI**: `https://api.together.xyz/v1`
|
|
356
|
+
- **Fireworks**: `https://api.fireworks.ai/inference/v1`
|
|
357
|
+
- **Groq**: `https://api.groq.com/openai/v1`
|
|
358
|
+
- **OpenRouter**: `https://openrouter.ai/api/v1`
|
|
359
|
+
- **Kimi/Moonshot**: `https://api.moonshot.cn/v1`
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## Z AI
|
|
364
|
+
|
|
365
|
+
ZhipuAI's GLM models with advanced Chinese language support.
|
|
366
|
+
|
|
367
|
+
```yaml
|
|
368
|
+
backend:
|
|
369
|
+
type: "zai"
|
|
370
|
+
model: "glm-4.5" # GLM model variant
|
|
371
|
+
base_url: "https://api.z.ai/api/paas/v4/" # Z AI endpoint
|
|
372
|
+
api_key: "<optional_key>" # Uses ZAI_API_KEY env var by default
|
|
373
|
+
temperature: 0.7
|
|
374
|
+
top_p: 0.7 # Nucleus sampling
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Z AI-Specific Features
|
|
378
|
+
- **Chinese Language**: Optimized for Chinese text
|
|
379
|
+
- **GLM-4.5 Series**: Latest GLM models
|
|
380
|
+
- **Competitive Pricing**: Cost-effective for Asian markets
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## LM Studio
|
|
385
|
+
|
|
386
|
+
Run open-source models locally with automatic server management (v0.0.7+).
|
|
387
|
+
|
|
388
|
+
```yaml
|
|
389
|
+
backend:
|
|
390
|
+
type: "lmstudio"
|
|
391
|
+
model: "qwen2.5-7b-instruct" # Model to load
|
|
392
|
+
temperature: 0.7
|
|
393
|
+
max_tokens: 2000
|
|
394
|
+
|
|
395
|
+
# LM Studio automatically handles:
|
|
396
|
+
# - Server startup
|
|
397
|
+
# - Model downloading
|
|
398
|
+
# - Model loading
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### LM Studio-Specific Features
|
|
402
|
+
- **Zero Cost**: Run models locally
|
|
403
|
+
- **Privacy**: Data never leaves your machine
|
|
404
|
+
- **Model Library**: Support for LLaMA, Mistral, Qwen, etc.
|
|
405
|
+
- **Automatic Management**: Server and model handled automatically
|
|
406
|
+
|
|
407
|
+
### Installation
|
|
408
|
+
```bash
|
|
409
|
+
# MacOS/Linux
|
|
410
|
+
sudo ~/.lmstudio/bin/lms bootstrap
|
|
411
|
+
|
|
412
|
+
# Windows
|
|
413
|
+
cmd /c %USERPROFILE%/.lmstudio/bin/lms.exe bootstrap
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## Environment Variables
|
|
419
|
+
|
|
420
|
+
Set these in your `.env` file:
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
# API Keys
|
|
424
|
+
OPENAI_API_KEY=your-openai-key
|
|
425
|
+
ANTHROPIC_API_KEY=your-anthropic-key
|
|
426
|
+
GOOGLE_API_KEY=your-google-key
|
|
427
|
+
XAI_API_KEY=your-xai-key
|
|
428
|
+
AZURE_OPENAI_API_KEY=your-azure-key
|
|
429
|
+
ZAI_API_KEY=your-zai-key
|
|
430
|
+
|
|
431
|
+
# Provider-specific
|
|
432
|
+
TOGETHER_API_KEY=your-together-key
|
|
433
|
+
CEREBRAS_API_KEY=your-cerebras-key
|
|
434
|
+
GROQ_API_KEY=your-groq-key
|
|
435
|
+
MOONSHOT_API_KEY=your-kimi-key
|
|
436
|
+
|
|
437
|
+
# MCP Services
|
|
438
|
+
BRAVE_API_KEY=your-brave-search-key
|
|
439
|
+
OPENWEATHER_API_KEY=your-weather-key
|
|
440
|
+
NOTION_API_KEY=your-notion-key
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## Full Examples
|
|
446
|
+
|
|
447
|
+
- **Single Agent**: [massgen/configs/basic/single/](../../massgen/configs/basic/single/)
|
|
448
|
+
- **Multi-Agent**: [massgen/configs/basic/multi/](../../massgen/configs/basic/multi/)
|
|
449
|
+
- **MCP Integration**: [massgen/configs/tools/mcp/](../../massgen/configs/tools/mcp/)
|
|
450
|
+
- **Provider-Specific**: [massgen/configs/providers/](../../massgen/configs/providers/)
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Need Help?
|
|
455
|
+
|
|
456
|
+
- [Join our Discord](https://discord.massgen.ai)
|
|
457
|
+
- [Report Issues](https://github.com/Leezekun/MassGen/issues)
|
|
458
|
+
- [View Documentation](https://github.com/Leezekun/MassGen)
|