maestro-bundle 1.7.0 → 1.9.0

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.
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: deep-agent-skills-system
3
+ description: Create and load skills (SKILL.md) in Deep Agents for contextual knowledge loading. Use when creating skills for your agent, loading documentation on-demand, or reducing token usage.
4
+ version: 1.0.0
5
+ author: Maestro
6
+ ---
7
+
8
+ # Deep Agent Skills System
9
+
10
+ Create SKILL.md files that your Deep Agent loads contextually — only when relevant. This reduces startup tokens while keeping the agent knowledgeable.
11
+
12
+ ## When to Use
13
+ - When the agent needs domain knowledge loaded on-demand
14
+ - When creating reusable instructions for the agent
15
+ - When reducing context window usage
16
+ - When organizing agent capabilities into modules
17
+
18
+ ## Available Operations
19
+ 1. Create SKILL.md files with frontmatter
20
+ 2. Organize skills in directories
21
+ 3. Load skills into the agent
22
+ 4. Create skills with supporting files
23
+
24
+ ## Multi-Step Workflow
25
+
26
+ ### Step 1: Create Skill Directory
27
+
28
+ ```bash
29
+ mkdir -p skills/deploy/
30
+ mkdir -p skills/code-review/
31
+ mkdir -p skills/database-migration/
32
+ ```
33
+
34
+ ### Step 2: Write SKILL.md
35
+
36
+ ```markdown
37
+ # skills/deploy/SKILL.md
38
+
39
+ ---
40
+ name: deploy
41
+ description: Deploy application to production
42
+ ---
43
+
44
+ # Deploy Skill
45
+
46
+ ## Steps
47
+ 1. Run tests: `pytest --tb=short`
48
+ 2. Build Docker image: `docker build -t app:latest .`
49
+ 3. Push to registry: `docker push registry/app:latest`
50
+ 4. Update K8s: `kubectl set image deployment/app app=registry/app:latest`
51
+ 5. Verify: `kubectl rollout status deployment/app`
52
+
53
+ ## Rollback
54
+ If deploy fails: `kubectl rollout undo deployment/app`
55
+ ```
56
+
57
+ ### Step 3: Add Supporting Files
58
+
59
+ ```
60
+ skills/deploy/
61
+ ├── SKILL.md # Main instructions
62
+ ├── references/
63
+ │ └── k8s-commands.md # Reference doc loaded when needed
64
+ └── scripts/
65
+ └── healthcheck.sh # Script the agent can execute
66
+ ```
67
+
68
+ ### Step 4: Load Skills into Agent
69
+
70
+ ```python
71
+ from deepagents import create_deep_agent
72
+ from deepagents.backends import FilesystemBackend
73
+ from langgraph.checkpoint.memory import MemorySaver
74
+
75
+ agent = create_deep_agent(
76
+ model="anthropic:claude-sonnet-4-6",
77
+ backend=FilesystemBackend(root_dir=".", virtual_mode=True),
78
+ skills=["./skills/"], # Directory containing skill folders
79
+ checkpointer=MemorySaver() # Required for skills
80
+ )
81
+ ```
82
+
83
+ ### Step 5: Load Skills via Store (No Filesystem)
84
+
85
+ ```python
86
+ from deepagents import create_deep_agent
87
+ from deepagents.backends import StoreBackend
88
+ from deepagents.backends.utils import create_file_data
89
+ from langgraph.store.memory import InMemoryStore
90
+
91
+ store = InMemoryStore()
92
+
93
+ # Inject skill content into store
94
+ skill_content = open("skills/deploy/SKILL.md").read()
95
+ store.put(
96
+ namespace=("filesystem",),
97
+ key="/skills/deploy/SKILL.md",
98
+ value=create_file_data(skill_content)
99
+ )
100
+
101
+ agent = create_deep_agent(
102
+ backend=lambda rt: StoreBackend(rt),
103
+ store=store,
104
+ skills=["/skills/"]
105
+ )
106
+ ```
107
+
108
+ ### Step 6: Verify
109
+
110
+ ```bash
111
+ # Test that skills are discovered
112
+ python -c "
113
+ from deepagents import create_deep_agent
114
+ from deepagents.backends import FilesystemBackend
115
+ from langgraph.checkpoint.memory import MemorySaver
116
+
117
+ agent = create_deep_agent(
118
+ backend=FilesystemBackend(root_dir='.', virtual_mode=True),
119
+ skills=['./skills/'],
120
+ checkpointer=MemorySaver()
121
+ )
122
+ result = agent.invoke({
123
+ 'messages': [{'role': 'user', 'content': 'What skills do you have available?'}]
124
+ }, config={'configurable': {'thread_id': 'test'}})
125
+ print(result['messages'][-1].content)
126
+ "
127
+ ```
128
+
129
+ ## Resources
130
+ - `references/skill-format.md` — SKILL.md format specification
131
+
132
+ ## Examples
133
+
134
+ ### Example 1: Create a Skill
135
+ User asks: "Create a skill for database migrations"
136
+ Response approach:
137
+ 1. Create `skills/database-migration/SKILL.md`
138
+ 2. Add step-by-step instructions for Alembic
139
+ 3. Add `references/alembic-commands.md`
140
+ 4. Register skill directory in agent
141
+
142
+ ### Example 2: Agent Uses Skill Automatically
143
+ User asks: "Deploy the app"
144
+ Response approach:
145
+ 1. Agent detects "deploy" matches skill description
146
+ 2. Loads `skills/deploy/SKILL.md` into context
147
+ 3. Follows the steps in the skill
148
+ 4. Reports result
149
+
150
+ ## Notes
151
+ - Skills load on-demand, not at startup — saves tokens
152
+ - `checkpointer` is REQUIRED for skills to work
153
+ - Skill descriptions must be specific for auto-matching
154
+ - Keep SKILL.md under 500 lines — use references for detail
155
+ - Skills are NOT inherited by subagents — pass explicitly
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: deep-agent-subagents
3
+ description: Create and configure subagents for task delegation in Deep Agents. Use when delegating work to specialized agents, splitting complex tasks, or avoiding context bloat.
4
+ version: 1.0.0
5
+ author: Maestro
6
+ ---
7
+
8
+ # Deep Agent Subagents
9
+
10
+ Create specialized subagents that the main agent delegates tasks to via the built-in `task` tool. Subagents run in isolation with their own context window.
11
+
12
+ ## When to Use
13
+ - When the main agent needs to delegate specialized work
14
+ - When tasks would bloat the main agent's context
15
+ - When different tasks need different models or tools
16
+ - When building multi-agent orchestration
17
+
18
+ ## Available Operations
19
+ 1. Define subagent configurations
20
+ 2. Register subagents with the main agent
21
+ 3. Use different models per subagent
22
+ 4. Give subagents their own tools and skills
23
+
24
+ ## Multi-Step Workflow
25
+
26
+ ### Step 1: Define Subagent Configs
27
+
28
+ ```python
29
+ # agent/subagents.py
30
+
31
+ research_agent = {
32
+ "name": "research-agent",
33
+ "description": "Research topics in-depth using web search and documentation",
34
+ "system_prompt": "You are a thorough researcher. Always cite sources.",
35
+ "tools": [internet_search, read_documentation],
36
+ "model": "anthropic:claude-sonnet-4-6",
37
+ }
38
+
39
+ code_agent = {
40
+ "name": "code-agent",
41
+ "description": "Write, refactor, and fix code following clean architecture",
42
+ "system_prompt": "You are an expert programmer. Follow SOLID principles.",
43
+ "tools": [run_tests, lint_code],
44
+ "model": "anthropic:claude-sonnet-4-6",
45
+ }
46
+
47
+ review_agent = {
48
+ "name": "review-agent",
49
+ "description": "Review code for quality, security, and best practices",
50
+ "system_prompt": "You are a senior code reviewer. Be thorough but constructive.",
51
+ "tools": [lint_code, search_codebase],
52
+ "model": "openai:gpt-4o", # Can use different model
53
+ }
54
+ ```
55
+
56
+ ### Step 2: Register with Main Agent
57
+
58
+ ```python
59
+ from deepagents import create_deep_agent
60
+
61
+ orchestrator = create_deep_agent(
62
+ model="anthropic:claude-sonnet-4-6",
63
+ tools=[custom_tool],
64
+ subagents=[research_agent, code_agent, review_agent],
65
+ system_prompt="""You are an orchestrator. Delegate tasks to subagents:
66
+ - research-agent: for research and documentation
67
+ - code-agent: for writing and fixing code
68
+ - review-agent: for code reviews"""
69
+ )
70
+ ```
71
+
72
+ ### Step 3: How Delegation Works
73
+
74
+ The main agent uses the built-in `task` tool to delegate:
75
+
76
+ ```
77
+ Main Agent thinks: "I need to research authentication patterns"
78
+ Main Agent calls: task(agent="research-agent", task="Research JWT vs OAuth2 patterns")
79
+ → research-agent runs independently
80
+ → Returns summary to main agent
81
+ Main Agent continues with the research results
82
+ ```
83
+
84
+ ### Step 4: Subagents with Their Own Skills
85
+
86
+ ```python
87
+ code_agent = {
88
+ "name": "code-agent",
89
+ "description": "Write code following project patterns",
90
+ "system_prompt": "You are a coder.",
91
+ "tools": [run_tests],
92
+ "skills": ["/skills/clean-architecture/"], # Subagent-specific skills
93
+ }
94
+ ```
95
+
96
+ ### Step 5: Test
97
+
98
+ ```bash
99
+ python -c "
100
+ from deepagents import create_deep_agent
101
+
102
+ research = {'name': 'researcher', 'description': 'Research topics', 'system_prompt': 'Research thoroughly.'}
103
+ agent = create_deep_agent(subagents=[research])
104
+ result = agent.invoke({'messages': [{'role': 'user', 'content': 'Research best practices for error handling in Python'}]})
105
+ print(result['messages'][-1].content)
106
+ "
107
+ ```
108
+
109
+ ## Resources
110
+ - `references/subagent-patterns.md` — Common multi-agent patterns
111
+
112
+ ## Examples
113
+
114
+ ### Example 1: Research + Code Split
115
+ User asks: "Research auth patterns, then implement JWT"
116
+ Response approach:
117
+ 1. Orchestrator delegates research to `research-agent`
118
+ 2. Gets research summary back
119
+ 3. Delegates implementation to `code-agent` with research context
120
+ 4. Gets code back, runs tests
121
+
122
+ ### Example 2: Parallel Reviews
123
+ User asks: "Review the PR from security and quality perspectives"
124
+ Response approach:
125
+ 1. Create `security-reviewer` and `quality-reviewer` subagents
126
+ 2. Delegate both reviews simultaneously
127
+ 3. Aggregate results
128
+
129
+ ### Example 3: Different Models per Task
130
+ User asks: "Use a cheaper model for simple tasks"
131
+ Response approach:
132
+ 1. Main agent: `claude-sonnet-4-6` (reasoning)
133
+ 2. Code subagent: `claude-sonnet-4-6` (code gen)
134
+ 3. Summary subagent: `openai:gpt-4o-mini` (cheap summarization)
135
+
136
+ ## Notes
137
+ - Subagents run in isolated context (no access to main agent's conversation)
138
+ - Skills are NOT inherited — pass them explicitly to each subagent
139
+ - Use subagents to avoid context bloat — delegate detailed work
140
+ - The `task` tool is built-in, no need to define it
141
+ - Each subagent can use a different model