massgen 0.1.5__py3-none-any.whl → 0.1.6__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 (57) hide show
  1. massgen/__init__.py +1 -1
  2. massgen/backend/base_with_custom_tool_and_mcp.py +453 -23
  3. massgen/backend/capabilities.py +39 -0
  4. massgen/backend/chat_completions.py +111 -197
  5. massgen/backend/claude.py +210 -181
  6. massgen/backend/gemini.py +1015 -1559
  7. massgen/backend/grok.py +3 -2
  8. massgen/backend/response.py +160 -220
  9. massgen/cli.py +73 -6
  10. massgen/config_builder.py +20 -54
  11. massgen/config_validator.py +931 -0
  12. massgen/configs/README.md +51 -8
  13. massgen/configs/tools/custom_tools/claude_code_custom_tool_with_mcp_example.yaml +1 -0
  14. massgen/configs/tools/custom_tools/claude_custom_tool_example_no_path.yaml +1 -1
  15. massgen/configs/tools/custom_tools/claude_custom_tool_with_mcp_example.yaml +1 -0
  16. massgen/configs/tools/custom_tools/computer_use_browser_example.yaml +1 -1
  17. massgen/configs/tools/custom_tools/computer_use_docker_example.yaml +1 -1
  18. massgen/configs/tools/custom_tools/gemini_custom_tool_with_mcp_example.yaml +1 -0
  19. massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_mcp_example.yaml +1 -0
  20. massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_mcp_example.yaml +1 -0
  21. massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_mcp_example.yaml +1 -0
  22. massgen/configs/tools/custom_tools/interop/ag2_and_langgraph_lesson_planner.yaml +65 -0
  23. massgen/configs/tools/custom_tools/interop/ag2_and_openai_assistant_lesson_planner.yaml +65 -0
  24. massgen/configs/tools/custom_tools/interop/ag2_lesson_planner_example.yaml +48 -0
  25. massgen/configs/tools/custom_tools/interop/agentscope_lesson_planner_example.yaml +48 -0
  26. massgen/configs/tools/custom_tools/interop/langgraph_lesson_planner_example.yaml +49 -0
  27. massgen/configs/tools/custom_tools/interop/openai_assistant_lesson_planner_example.yaml +50 -0
  28. massgen/configs/tools/custom_tools/interop/smolagent_lesson_planner_example.yaml +49 -0
  29. massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_mcp_example.yaml +1 -0
  30. massgen/configs/tools/custom_tools/two_models_with_tools_example.yaml +44 -0
  31. massgen/formatter/_gemini_formatter.py +61 -15
  32. massgen/tests/test_ag2_lesson_planner.py +223 -0
  33. massgen/tests/test_config_validator.py +1156 -0
  34. massgen/tests/test_langgraph_lesson_planner.py +223 -0
  35. massgen/tool/__init__.py +2 -9
  36. massgen/tool/_decorators.py +52 -0
  37. massgen/tool/_extraframework_agents/ag2_lesson_planner_tool.py +251 -0
  38. massgen/tool/_extraframework_agents/agentscope_lesson_planner_tool.py +303 -0
  39. massgen/tool/_extraframework_agents/langgraph_lesson_planner_tool.py +275 -0
  40. massgen/tool/_extraframework_agents/openai_assistant_lesson_planner_tool.py +247 -0
  41. massgen/tool/_extraframework_agents/smolagent_lesson_planner_tool.py +180 -0
  42. massgen/tool/_manager.py +102 -16
  43. massgen/tool/_registered_tool.py +3 -0
  44. massgen/tool/_result.py +3 -0
  45. {massgen-0.1.5.dist-info → massgen-0.1.6.dist-info}/METADATA +104 -76
  46. {massgen-0.1.5.dist-info → massgen-0.1.6.dist-info}/RECORD +50 -39
  47. massgen/backend/gemini_mcp_manager.py +0 -545
  48. massgen/backend/gemini_trackers.py +0 -344
  49. massgen/configs/tools/custom_tools/multimodal_tools/playwright_with_img_understanding.yaml +0 -98
  50. massgen/configs/tools/custom_tools/multimodal_tools/understand_video_example.yaml +0 -54
  51. massgen/tools/__init__.py +0 -8
  52. massgen/tools/_planning_mcp_server.py +0 -520
  53. massgen/tools/planning_dataclasses.py +0 -434
  54. {massgen-0.1.5.dist-info → massgen-0.1.6.dist-info}/WHEEL +0 -0
  55. {massgen-0.1.5.dist-info → massgen-0.1.6.dist-info}/entry_points.txt +0 -0
  56. {massgen-0.1.5.dist-info → massgen-0.1.6.dist-info}/licenses/LICENSE +0 -0
  57. {massgen-0.1.5.dist-info → massgen-0.1.6.dist-info}/top_level.txt +0 -0
massgen/configs/README.md CHANGED
@@ -227,22 +227,63 @@ Most configurations use environment variables for API keys:so
227
227
 
228
228
  ## Release History & Examples
229
229
 
230
- ### v0.1.5 - Latest
230
+ ### v0.1.6 - Latest
231
+ **New Features:** Framework Interoperability & Backend Refactoring
232
+
233
+ **Configuration Files:**
234
+ - `ag2_lesson_planner_example.yaml` - AG2 nested chat as custom tool (supports streaming)
235
+ - `langgraph_lesson_planner_example.yaml` - LangGraph workflows integrated as tools
236
+ - `agentscope_lesson_planner_example.yaml` - AgentScope agent system integration
237
+ - `openai_assistant_lesson_planner_example.yaml` - OpenAI Assistants as tools
238
+ - `smolagent_lesson_planner_example.yaml` - HuggingFace SmoLAgent integration
239
+ - `ag2_and_langgraph_lesson_planner.yaml` - Multi-framework collaboration (AG2 + LangGraph)
240
+ - `ag2_and_openai_assistant_lesson_planner.yaml` - AG2 + OpenAI Assistants combination
241
+ - `two_models_with_tools_example.yaml` - Multiple models with custom tools
242
+
243
+ **Key Features:**
244
+ - **Framework Interoperability**: Use agents from external frameworks (AG2, LangGraph, AgentScope, OpenAI Assistants, SmoLAgent) as MassGen tools
245
+ - **Streaming Support**: AG2 supports streaming; other frameworks return complete results
246
+ - **Configuration Validator**: Pre-flight YAML validation with detailed error messages
247
+ - **Unified Tool Execution**: ToolExecutionConfig dataclass for consistent tool handling
248
+ - **Gemini Simplification**: Major backend cleanup reducing codebase by 1,598 lines
249
+
250
+ **Try It:**
251
+ ```bash
252
+ # Use AG2 agents for lesson planning (supports streaming)
253
+ # Requirements: pip install pyautogen, OPENAI_API_KEY must be set
254
+ massgen --config massgen/configs/tools/custom_tools/ag2_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
255
+
256
+ # Use LangGraph workflows as tools
257
+ # Requirements: pip install langgraph langchain-openai langchain-core, OPENAI_API_KEY must be set
258
+ massgen --config massgen/configs/tools/custom_tools/langgraph_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
259
+
260
+ # Use AgentScope multi-agent framework as tools
261
+ # Requirements: pip install agentscope, OPENAI_API_KEY must be set
262
+ massgen --config massgen/configs/tools/custom_tools/agentscope_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
263
+
264
+ # Use OpenAI Assistants API as tools
265
+ # Requirements: pip install openai, OPENAI_API_KEY must be set
266
+ massgen --config massgen/configs/tools/custom_tools/openai_assistant_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
267
+
268
+ # Use SmolAgent (HuggingFace) as tools
269
+ # Requirements: pip install smolagents, OPENAI_API_KEY must be set
270
+ massgen --config massgen/configs/tools/custom_tools/smolagent_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
271
+
272
+ # Combine multiple frameworks
273
+ # Requirements: pip install pyautogen langgraph langchain-openai langchain-core, OPENAI_API_KEY must be set
274
+ massgen --config massgen/configs/tools/custom_tools/ag2_and_langgraph_lesson_planner.yaml "Create a lesson plan for photosynthesis"
275
+ ```
276
+
277
+ ### v0.1.5
231
278
  **New Features:** Memory System with Semantic Retrieval
232
279
 
233
280
  **Configuration Files:**
234
281
  - `gpt5mini_gemini_context_window_management.yaml` - Multi-agent with automatic context compression
235
- - `gpt5mini_gemini_research_to_implementation.yaml` - **Research-to-implementation workflow** (featured in case study)
282
+ - `gpt5mini_gemini_research_to_implementation.yaml` - Research-to-implementation workflow (featured in case study)
236
283
  - `gpt5mini_high_reasoning_gemini.yaml` - High reasoning agents with memory integration
237
284
  - `gpt5mini_gemini_baseline_research_to_implementation.yaml` - Baseline research workflow
238
285
  - `single_agent_compression_test.yaml` - Testing context compression behavior
239
286
 
240
- **Documentation & Case Studies:**
241
- - `docs/source/user_guide/memory.rst` - Complete memory system user guide
242
- - `docs/source/examples/case_studies/multi-turn-persistent-memory.md` - **Memory case study with demo video**
243
- - Memory design decisions and architecture documentation
244
- - API reference for PersistentMemory, ConversationMemory, and ContextMonitor
245
-
246
287
  **Key Features:**
247
288
  - **Long-Term Memory**: Semantic storage via mem0 with vector database integration
248
289
  - **Context Compression**: Automatic compression when approaching token limits
@@ -270,9 +311,11 @@ massgen --config @examples/memory/gpt5mini_gemini_research_to_implementation \
270
311
 
271
312
  # Session 2 - Implementation analysis (continue in same session):
272
313
  # "Based on the multi-agent research from earlier, which techniques should we implement in MassGen to make it more state-of-the-art? Consider MassGen's current architecture and what would be most impactful."
314
+ ```
273
315
 
274
316
  → See [Multi-Turn Persistent Memory Case Study](../../docs/source/examples/case_studies/multi-turn-persistent-memory.md) for detailed analysis
275
317
 
318
+ ```bash
276
319
  # Test automatic context compression
277
320
  massgen --config @examples/memory/single_agent_compression_test \
278
321
  "Analyze the MassGen codebase comprehensively. Create an architecture document that explains: (1) Core components and their responsibilities, (2) How different modules interact, (3) Key design patterns used, (4) Main entry points and request flows. Read > 30 files to build a complete understanding."
@@ -1,6 +1,7 @@
1
1
  # MassGen Configuration: Claude Code with MCP Integration
2
2
  # Usage:
3
3
  # massgen --config @examples/tools/custom_tools/claude_code_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/claude_code_custom_tool_with_mcp_example.yaml "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
5
  orchestrator:
5
6
  snapshot_storage: "claude_code_snapshots"
6
7
  agent_temporary_workspace: "claude_code_temp"
@@ -18,5 +18,5 @@ agents:
18
18
  When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
19
19
  a clear, accurate result.
20
20
  ui:
21
- display_type: "simple"
21
+ display_type: "rich_terminal"
22
22
  logging_enabled: true
@@ -1,6 +1,7 @@
1
1
  # MassGen Configuration: Claude with MCP Integration
2
2
  # Usage:
3
3
  # massgen --config @examples/tools/custom_tools/claude_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/claude_custom_tool_with_mcp_example.yaml "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
5
  agents:
5
6
  - id: "claude_custom_tool" # Anthropic Claude
6
7
  backend:
@@ -51,6 +51,6 @@ agents:
51
51
  - Be specific about what you're looking for on the page
52
52
 
53
53
  ui:
54
- display_type: "detailed"
54
+ display_type: "rich_terminal"
55
55
  logging_enabled: true
56
56
  show_screenshots: true
@@ -59,7 +59,7 @@ agents:
59
59
  - Consider screen resolution (1280x800)
60
60
 
61
61
  ui:
62
- display_type: "detailed"
62
+ display_type: "rich_terminal"
63
63
  logging_enabled: true
64
64
  show_screenshots: true
65
65
  show_reasoning: true
@@ -1,6 +1,7 @@
1
1
  # MassGen Configuration: Gemini with MCP Integration
2
2
  # Usage:
3
3
  # massgen --config @examples/tools/custom_tools/gemini_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/gemini_custom_tool_with_mcp_example.yaml "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
5
  agents:
5
6
  - id: "gemini2.5flash_custom_tool" # Google Gemini 2.5 Flash
6
7
  backend:
@@ -1,6 +1,7 @@
1
1
  # MassGen Configuration: GPT-5 Nano with MCP Integration
2
2
  # Usage:
3
3
  # massgen --config @examples/tools/custom_tools/gpt5_nano_custom_tool_with_mcp_example "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/gpt5_nano_custom_tool_with_mcp_example.yaml "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
5
  agents:
5
6
  - id: "gpt5_nano_custom_tool" # OpenAI GPT-5 Nano
6
7
  backend:
@@ -1,6 +1,7 @@
1
1
  # MassGen Configuration: Gemini with MCP Integration
2
2
  # Usage:
3
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
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/gpt_oss_custom_tool_with_mcp_example.yaml "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
5
  agents:
5
6
  - id: "gpt-oss-custom_tool" # Cerebras AI GPT-OSS
6
7
  backend:
@@ -1,6 +1,7 @@
1
1
  # MassGen Configuration: Grok-3 Mini with MCP Integration
2
2
  # Usage:
3
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
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/grok3_mini_custom_tool_with_mcp_example.yaml "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
5
  agents:
5
6
  - id: "grok3_mini_custom_tool"
6
7
  backend:
@@ -0,0 +1,65 @@
1
+ # MassGen Configuration: Lesson Planner Comparison
2
+ # This demonstrates interoperability by comparing AG2 and LangGraph lesson planner implementations
3
+ #
4
+ # Usage:
5
+ # massgen --config @examples/tools/custom_tools/interop/ag2_and_langgraph_lesson_planner.yaml "Create a lesson plan for photosynthesis"
6
+ # uv run python -m massgen.cli --config @examples/tools/custom_tools/interop/ag2_and_langgraph_lesson_planner.yaml "Create a lesson plan for photosynthesis"
7
+ #
8
+ # Description:
9
+ # This configuration provides access to both AG2 (AutoGen) and LangGraph lesson planning tools,
10
+ # allowing you to compare different multi-agent framework approaches within MassGen.
11
+ #
12
+ # AG2 Version:
13
+ # - Uses AutoGen's nested chat architecture
14
+ # - Multiple agents in group chat collaboration
15
+ # - Demonstrates AutoGen → MassGen interoperability
16
+ #
17
+ # LangGraph Version:
18
+ # - Uses LangGraph's state graph architecture
19
+ # - Sequential workflow with state management
20
+ # - Demonstrates LangGraph → MassGen interoperability
21
+ #
22
+ # Requirements:
23
+ # - pip install pyautogen langgraph langchain-openai langchain-core
24
+ # - OPENAI_API_KEY environment variable must be set
25
+
26
+ agents:
27
+ - id: "ag2_planner" # AG2 (AutoGen) implementation
28
+ backend:
29
+ type: "openai"
30
+ model: "gpt-4o"
31
+ custom_tools:
32
+ - name: ["ag2_lesson_planner"]
33
+ category: "education"
34
+ path: "massgen/tool/_extraframework_agents/ag2_lesson_planner_tool.py"
35
+ function: ["ag2_lesson_planner"]
36
+ system_message: |
37
+ You are an AI assistant with access to the AG2 (AutoGen) lesson planning tool.
38
+
39
+ The ag2_lesson_planner tool creates comprehensive fourth-grade lesson plans using AutoGen's
40
+ nested chat architecture with multiple collaborative agents.
41
+
42
+ When users ask for a lesson plan, use the ag2_lesson_planner tool. After receiving the result,
43
+ present it clearly and mention that this was generated using the AG2 (AutoGen) framework.
44
+
45
+ - id: "langgraph_planner" # LangGraph implementation
46
+ backend:
47
+ type: "openai"
48
+ model: "gpt-4o"
49
+ custom_tools:
50
+ - name: ["langgraph_lesson_planner"]
51
+ category: "education"
52
+ path: "massgen/tool/_extraframework_agents/langgraph_lesson_planner_tool.py"
53
+ function: ["langgraph_lesson_planner"]
54
+ system_message: |
55
+ You are an AI assistant with access to the LangGraph lesson planning tool.
56
+
57
+ The langgraph_lesson_planner tool creates comprehensive fourth-grade lesson plans using
58
+ LangGraph's state graph architecture with sequential workflow nodes.
59
+
60
+ When users ask for a lesson plan, use the langgraph_lesson_planner tool. After receiving the result,
61
+ present it clearly and mention that this was generated using the LangGraph framework.
62
+
63
+ ui:
64
+ display_type: "rich_terminal"
65
+ logging_enabled: true
@@ -0,0 +1,65 @@
1
+ # MassGen Configuration: Lesson Planner Comparison
2
+ # This demonstrates interoperability by comparing AG2 and OpenAI Assistant lesson planner implementations
3
+ #
4
+ # Usage:
5
+ # massgen --config @examples/tools/custom_tools/interop/ag2_and_openai_assistant_lesson_planner.yaml "Create a lesson plan for photosynthesis"
6
+ # uv run python -m massgen.cli --config @examples/tools/custom_tools/interop/ag2_and_openai_assistant_lesson_planner.yaml "Create a lesson plan for photosynthesis"
7
+ #
8
+ # Description:
9
+ # This configuration provides access to both AG2 (AutoGen) and OpenAI Assistant lesson planning tools,
10
+ # allowing you to compare different multi-agent framework approaches within MassGen.
11
+ #
12
+ # AG2 Version:
13
+ # - Uses AutoGen's nested chat architecture
14
+ # - Multiple agents in group chat collaboration
15
+ # - Demonstrates AutoGen → MassGen interoperability
16
+ #
17
+ # OpenAI Assistant Version:
18
+ # - Uses OpenAI's Chat Completions API with streaming
19
+ # - Multi-agent collaboration pattern with sequential workflow
20
+ # - Demonstrates OpenAI Assistant → MassGen interoperability
21
+ #
22
+ # Requirements:
23
+ # - pip install pyautogen openai
24
+ # - OPENAI_API_KEY environment variable must be set
25
+
26
+ agents:
27
+ - id: "ag2_planner" # AG2 (AutoGen) implementation
28
+ backend:
29
+ type: "openai"
30
+ model: "gpt-4o"
31
+ custom_tools:
32
+ - name: ["ag2_lesson_planner"]
33
+ category: "education"
34
+ path: "massgen/tool/_extraframework_agents/ag2_lesson_planner_tool.py"
35
+ function: ["ag2_lesson_planner"]
36
+ system_message: |
37
+ You are an AI assistant with access to the AG2 (AutoGen) lesson planning tool.
38
+
39
+ The ag2_lesson_planner tool creates comprehensive fourth-grade lesson plans using AutoGen's
40
+ nested chat architecture with multiple collaborative agents.
41
+
42
+ When users ask for a lesson plan, use the ag2_lesson_planner tool. After receiving the result,
43
+ present it clearly and mention that this was generated using the AG2 (AutoGen) framework.
44
+
45
+ - id: "openai_assistant_planner" # OpenAI Assistant implementation
46
+ backend:
47
+ type: "openai"
48
+ model: "gpt-4o"
49
+ custom_tools:
50
+ - name: ["openai_assistant_lesson_planner"]
51
+ category: "education"
52
+ path: "massgen/tool/_extraframework_agents/openai_assistant_lesson_planner_tool.py"
53
+ function: ["openai_assistant_lesson_planner"]
54
+ system_message: |
55
+ You are an AI assistant with access to the OpenAI Assistant lesson planning tool.
56
+
57
+ The openai_assistant_lesson_planner tool creates comprehensive fourth-grade lesson plans using
58
+ OpenAI's Chat Completions API with multi-agent collaboration pattern and streaming support.
59
+
60
+ When users ask for a lesson plan, use the openai_assistant_lesson_planner tool. After receiving the result,
61
+ present it clearly and mention that this was generated using the OpenAI Assistant framework.
62
+
63
+ ui:
64
+ display_type: "rich_terminal"
65
+ logging_enabled: true
@@ -0,0 +1,48 @@
1
+ # MassGen Configuration: AG2 (AutoGen) Lesson Planner Tool
2
+ # This demonstrates interoperability by using AutoGen's nested chat as a custom tool
3
+ #
4
+ # Usage:
5
+ # massgen --config @examples/tools/custom_tools/interop/ag2_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
6
+ # uv run python -m massgen.cli --config @examples/tools/custom_tools/interop/ag2_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
7
+ #
8
+ # Description:
9
+ # This configuration uses the AG2 (AutoGen) nested chat architecture to create comprehensive
10
+ # lesson plans. The tool uses multiple AutoGen agents working together:
11
+ # - Curriculum Agent: Determines standards and objectives
12
+ # - Lesson Planner Agent: Creates detailed lesson plans
13
+ # - Lesson Reviewer Agent: Reviews and provides feedback
14
+ # - Lesson Formatter Agent: Formats the final output
15
+ #
16
+ # Requirements:
17
+ # - pip install pyautogen
18
+ # - OPENAI_API_KEY environment variable must be set
19
+
20
+ agents:
21
+ - id: "ag2_lesson_planner" # OpenAI GPT-4o with AG2 custom tool
22
+ backend:
23
+ type: "openai"
24
+ model: "gpt-4o"
25
+ custom_tools:
26
+ - name: ["ag2_lesson_planner"]
27
+ category: "education"
28
+ path: "massgen/tool/_extraframework_agents/ag2_lesson_planner_tool.py"
29
+ function: ["ag2_lesson_planner"]
30
+ system_message: |
31
+ You are an AI assistant with access to an advanced lesson planning tool powered by AutoGen.
32
+
33
+ The ag2_lesson_planner tool is available as a custom tool that creates comprehensive fourth-grade
34
+ lesson plans using a multi-agent collaborative approach. This tool demonstrates interoperability
35
+ between MassGen and AutoGen frameworks.
36
+
37
+ When users ask for a lesson plan on any topic, use the ag2_lesson_planner tool. The tool will coordinate multiple specialized agents to:
38
+ 1. Identify relevant curriculum standards and learning objectives
39
+ 2. Design engaging lesson activities with proper timing
40
+ 3. Review the plan for age-appropriateness and effectiveness
41
+ 4. Format the final lesson plan in a structured format
42
+
43
+ After receiving the lesson plan, present it clearly to the user and offer to make any adjustments
44
+ they'd like.
45
+
46
+ ui:
47
+ display_type: "rich_terminal"
48
+ logging_enabled: true
@@ -0,0 +1,48 @@
1
+ # MassGen Configuration: AgentScope Lesson Planner Tool
2
+ # This demonstrates interoperability by using AgentScope's multi-agent framework as a custom tool
3
+ #
4
+ # Usage:
5
+ # massgen --config @examples/tools/custom_tools/interop/agentscope_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
6
+ # uv run python -m massgen.cli --config @examples/tools/custom_tools/interop/agentscope_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
7
+ #
8
+ # Description:
9
+ # This configuration uses AgentScope to create comprehensive lesson plans through a multi-agent
10
+ # sequential pipeline. The tool uses multiple specialized AgentScope DialogAgents:
11
+ # - Curriculum Standards Expert: Determines standards and objectives
12
+ # - Lesson Planning Specialist: Creates detailed lesson plans
13
+ # - Lesson Plan Reviewer: Reviews and improves the plan
14
+ # - Lesson Plan Formatter: Formats the final output
15
+ #
16
+ # Requirements:
17
+ # - pip install agentscope
18
+ # - OPENAI_API_KEY environment variable must be set
19
+
20
+ agents:
21
+ - id: "agentscope_lesson_planner" # OpenAI GPT-4o with AgentScope custom tool
22
+ backend:
23
+ type: "openai"
24
+ model: "gpt-4o"
25
+ custom_tools:
26
+ - name: ["agentscope_lesson_planner"]
27
+ category: "education"
28
+ path: "massgen/tool/_extraframework_agents/agentscope_lesson_planner_tool.py"
29
+ function: ["agentscope_lesson_planner"]
30
+ system_message: |
31
+ You are an AI assistant with access to an advanced lesson planning tool powered by AgentScope.
32
+
33
+ The agentscope_lesson_planner tool is available as a custom tool that creates comprehensive fourth-grade
34
+ lesson plans using AgentScope's multi-agent framework. This tool demonstrates interoperability
35
+ between MassGen and AgentScope.
36
+
37
+ When users ask for a lesson plan on any topic, use the agentscope_lesson_planner tool. The tool will coordinate multiple specialized agents in a sequential pipeline to:
38
+ 1. Identify relevant curriculum standards and learning objectives
39
+ 2. Design engaging lesson activities with proper timing
40
+ 3. Review the plan for age-appropriateness and effectiveness
41
+ 4. Format the final lesson plan in a structured format
42
+
43
+ After receiving the lesson plan, present it clearly to the user and offer to make any adjustments
44
+ they'd like.
45
+
46
+ ui:
47
+ display_type: "rich_terminal"
48
+ logging_enabled: true
@@ -0,0 +1,49 @@
1
+ # MassGen Configuration: LangGraph Lesson Planner Tool
2
+ # This demonstrates interoperability by using LangGraph's state graph framework as a custom tool
3
+ #
4
+ # Usage:
5
+ # massgen --config @examples/tools/custom_tools/interop/langgraph_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
6
+ # uv run python -m massgen.cli --config @examples/tools/custom_tools/interop/langgraph_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
7
+ #
8
+ # Description:
9
+ # This configuration uses LangGraph to create comprehensive lesson plans through a state graph
10
+ # workflow. The tool orchestrates multiple specialized nodes in a sequential graph:
11
+ # - Curriculum Node: Determines standards and objectives
12
+ # - Planner Node: Creates detailed lesson plans
13
+ # - Reviewer Node: Reviews and improves the plan
14
+ # - Formatter Node: Formats the final output
15
+ #
16
+ # Requirements:
17
+ # - pip install langgraph langchain-openai langchain-core
18
+ # - OPENAI_API_KEY environment variable must be set
19
+
20
+ agents:
21
+ - id: "langgraph_lesson_planner" # OpenAI GPT-4o with LangGraph custom tool
22
+ backend:
23
+ type: "openai"
24
+ model: "gpt-4o"
25
+ custom_tools:
26
+ - name: ["langgraph_lesson_planner"]
27
+ category: "education"
28
+ path: "massgen/tool/_extraframework_agents/langgraph_lesson_planner_tool.py"
29
+ function: ["langgraph_lesson_planner"]
30
+ system_message: |
31
+ You are an AI assistant with access to an advanced lesson planning tool powered by LangGraph.
32
+
33
+ The langgraph_lesson_planner tool is available as a custom tool that creates comprehensive fourth-grade
34
+ lesson plans using LangGraph's state graph architecture. This tool demonstrates interoperability
35
+ between MassGen and LangGraph/LangChain frameworks.
36
+
37
+ When users ask for a lesson plan on any topic, use the langgraph_lesson_planner tool. The tool will execute
38
+ a state graph workflow with multiple nodes to:
39
+ 1. Identify relevant curriculum standards and learning objectives
40
+ 2. Design engaging lesson activities with proper timing
41
+ 3. Review the plan for age-appropriateness and effectiveness
42
+ 4. Format the final lesson plan in a structured format
43
+
44
+ After receiving the lesson plan, present it clearly to the user and offer to make any adjustments
45
+ they'd like.
46
+
47
+ ui:
48
+ display_type: "rich_terminal"
49
+ logging_enabled: true
@@ -0,0 +1,50 @@
1
+ # MassGen Configuration: OpenAI Lesson Planner Tool
2
+ # This demonstrates interoperability by using OpenAI's Chat Completions API as a custom tool
3
+ #
4
+ # Usage:
5
+ # massgen --config @examples/tools/custom_tools/interop/openai_assistant_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
6
+ # uv run python -m massgen.cli --config @examples/tools/custom_tools/interop/openai_assistant_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
7
+ #
8
+ # Description:
9
+ # This configuration uses OpenAI's Chat Completions API with multi-agent collaboration to create comprehensive lesson plans.
10
+ # The tool uses multiple specialized agents (similar to AG2) that work sequentially:
11
+ # 1. Curriculum Agent: Identifies relevant curriculum standards and learning objectives
12
+ # 2. Lesson Planner Agent: Designs engaging lesson activities with proper timing
13
+ # 3. Lesson Reviewer Agent: Reviews the plan for age-appropriateness and effectiveness
14
+ # 4. Formatter Agent: Formats the final lesson plan in a structured format
15
+ # This demonstrates interoperability between MassGen and OpenAI's API using a role-based collaboration pattern.
16
+ #
17
+ # Requirements:
18
+ # - pip install openai
19
+ # - OPENAI_API_KEY environment variable must be set
20
+
21
+ agents:
22
+ - id: "openai_assistant_lesson_planner" # OpenAI GPT-4o with OpenAI Assistant custom tool
23
+ backend:
24
+ type: "openai"
25
+ model: "gpt-4o"
26
+ custom_tools:
27
+ - name: ["openai_assistant_lesson_planner"]
28
+ category: "education"
29
+ path: "massgen/tool/_extraframework_agents/openai_assistant_lesson_planner_tool.py"
30
+ function: ["openai_assistant_lesson_planner"]
31
+ system_message: |
32
+ You are an AI assistant with access to an advanced lesson planning tool powered by OpenAI's Chat Completions API.
33
+
34
+ The openai_assistant_lesson_planner tool is available as a custom tool that creates comprehensive fourth-grade
35
+ lesson plans using OpenAI's Chat Completions API with multi-agent collaboration (similar to AG2/AutoGen pattern).
36
+ This tool demonstrates interoperability between MassGen and OpenAI's framework.
37
+
38
+ When users ask for a lesson plan on any topic, use the openai_assistant_lesson_planner tool. The tool uses
39
+ multiple specialized agents that collaborate sequentially:
40
+ 1. Curriculum Agent: Identifies relevant curriculum standards and learning objectives
41
+ 2. Lesson Planner Agent: Designs engaging lesson activities with proper timing
42
+ 3. Lesson Reviewer Agent: Reviews the plan for age-appropriateness and effectiveness
43
+ 4. Formatter Agent: Formats the final lesson plan in a structured format
44
+
45
+ After receiving the lesson plan, present it clearly to the user and offer to make any adjustments
46
+ they'd like.
47
+
48
+ ui:
49
+ display_type: "rich_terminal"
50
+ logging_enabled: true
@@ -0,0 +1,49 @@
1
+ # MassGen Configuration: SmolAgent Lesson Planner Tool
2
+ # This demonstrates interoperability by using HuggingFace's SmolAgent as a custom tool
3
+ #
4
+ # Usage:
5
+ # massgen --config @examples/tools/custom_tools/interop/smolagent_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
6
+ # uv run python -m massgen.cli --config @examples/tools/custom_tools/interop/smolagent_lesson_planner_example.yaml "Create a lesson plan for photosynthesis"
7
+ #
8
+ # Description:
9
+ # This configuration uses SmolAgent (HuggingFace's lightweight agent framework) to create comprehensive
10
+ # lesson plans. The tool uses SmolAgent's CodeAgent with custom tools:
11
+ # - get_curriculum_standards: Determines standards and objectives
12
+ # - create_lesson_plan: Creates detailed lesson plans
13
+ # - review_lesson_plan: Reviews and provides feedback
14
+ # - format_lesson_plan: Formats the final output
15
+ #
16
+ # Requirements:
17
+ # - pip install smolagents
18
+ # - OPENAI_API_KEY environment variable must be set
19
+
20
+ agents:
21
+ - id: "smolagent_lesson_planner" # OpenAI GPT-4o with SmolAgent custom tool
22
+ backend:
23
+ type: "openai"
24
+ model: "gpt-4o"
25
+ custom_tools:
26
+ - name: ["smolagent_lesson_planner"]
27
+ category: "education"
28
+ path: "massgen/tool/_extraframework_agents/smolagent_lesson_planner_tool.py"
29
+ function: ["smolagent_lesson_planner"]
30
+ system_message: |
31
+ You are an AI assistant with access to an advanced lesson planning tool powered by SmolAgent.
32
+
33
+ The smolagent_lesson_planner tool is available as a custom tool that creates comprehensive fourth-grade
34
+ lesson plans using HuggingFace's SmolAgent framework. This tool demonstrates interoperability
35
+ between MassGen and SmolAgent.
36
+
37
+ When users ask for a lesson plan on any topic, use the smolagent_lesson_planner tool. The tool will use
38
+ multiple custom tools to:
39
+ 1. Identify relevant curriculum standards and learning objectives
40
+ 2. Design engaging lesson activities with proper timing
41
+ 3. Review the plan for age-appropriateness and effectiveness
42
+ 4. Format the final lesson plan in a structured format
43
+
44
+ After receiving the lesson plan, present it clearly to the user and offer to make any adjustments
45
+ they'd like.
46
+
47
+ ui:
48
+ display_type: "rich_terminal"
49
+ logging_enabled: true
@@ -1,6 +1,7 @@
1
1
  # MassGen Configuration: Qwen API with MCP Integration
2
2
  # Usage:
3
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
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/qwen_api_custom_tool_with_mcp_example.yaml "whats the sum of 123 and 456? and whats the weather of Tokyo?"
4
5
  agents:
5
6
  - id: "qwen-mcp_weather" # Cerebras AI
6
7
  backend:
@@ -0,0 +1,44 @@
1
+ # MassGen Configuration: Two Models with Custom Tools
2
+ # Usage:
3
+ # massgen --config massgen/configs/tools/custom_tools/two_models_with_tools_example.yaml "whats the sum of 123 and 456, and also 789 and 012?"
4
+ # uv run python -m massgen.cli --config massgen/configs/tools/custom_tools/two_models_with_tools_example.yaml "whats the sum of 123 and 456, and also 789 and 012?"
5
+ agents:
6
+ - id: "claude_agent_with_tools" # Anthropic Claude Agent
7
+ backend:
8
+ type: "claude"
9
+ model: "claude-sonnet-4-20250514"
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 Claude, an AI assistant with access to custom math calculation tools.
17
+
18
+ The two_num_tool is available as a custom tool that can add two numbers together.
19
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
20
+
21
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
22
+ a clear, accurate result.
23
+
24
+ - id: "gemini_agent_with_tools" # Google Gemini Agent
25
+ backend:
26
+ type: "gemini"
27
+ model: "gemini-2.5-flash"
28
+ custom_tools:
29
+ - name: ["two_num_tool"]
30
+ category: "math"
31
+ path: "massgen/tool/_basic/_two_num_tool.py"
32
+ function: ["two_num_tool"]
33
+ system_message: |
34
+ You are Gemini, an AI assistant with access to custom math calculation tools.
35
+
36
+ The two_num_tool is available as a custom tool that can add two numbers together.
37
+ Do not output tool call syntax or function declarations. Focus on answering the user's question clearly.
38
+
39
+ When users ask about adding two numbers together, use the two_num_tool to calculate the sum and provide
40
+ a clear, accurate result.
41
+
42
+ ui:
43
+ display_type: "rich_terminal"
44
+ logging_enabled: true