Skip to content

Commit c41d592

Browse files
committed
Soft remove parentInstructions
1 parent 44b2e4b commit c41d592

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

backend/src/templates/agents/agent-builder.ts

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,9 @@ export const agentBuilder = (model: Model): Omit<AgentTemplate, 'id'> => {
122122
"1. Understand the requested agent's purpose and capabilities",
123123
"2. Choose appropriate tools for the agent's function",
124124
'3. Write a comprehensive system prompt',
125-
'4. **Generate proper parentInstructions** - these tell parent agents when to spawn this agent',
126-
`5. Create the complete agent template file in ${AGENT_TEMPLATES_DIR}`,
127-
'6. Ensure the template follows all conventions and best practices',
128-
'7. Use the AgentConfig interface for the configuration',
129-
'',
130-
'## Critical: parentInstructions Field',
131-
'The parentInstructions field is crucial - it tells parent agents when to call your custom agent. For example:',
132-
'- A file-picker agent should have: { "base": "Spawn when you need to find relevant files in the codebase" }',
133-
'- A test-writer agent should have: { "base": "Spawn when you need to write or update unit tests" }',
134-
'- A code-reviewer agent should have: { "base": "Spawn when you need to review code changes for quality and best practices" }',
135-
'',
136-
'Always include parentInstructions that clearly describe when parent agents should spawn this custom agent.',
125+
`4. Create the complete agent template file in ${AGENT_TEMPLATES_DIR}`,
126+
'5. Ensure the template follows all conventions and best practices',
127+
'6. Use the AgentConfig interface for the configuration',
137128
'',
138129
'Create agent templates that are focused, efficient, and well-documented. Always import the AgentConfig type and export a default configuration object.',
139130
].join('\n'),
@@ -217,19 +208,9 @@ IMPORTANT: Always end your response with the end_turn tool when you have complet
217208
- Use the AgentConfig interface
218209
- Include appropriate tools based on the specialty
219210
- Write a comprehensive system prompt
220-
- **CRITICAL: Include parentInstructions** - tell parent agents when to spawn this agent
221211
- Follow naming conventions and best practices
222212
- Export a default configuration object
223213
224-
**parentInstructions Example:**
225-
For a ${requirements.specialty} agent, include something like:
226-
${'```'}typescript
227-
parentInstructions: {
228-
"base": "Spawn when you need help with ${requirements.specialty} tasks",
229-
// Add other parent agents as appropriate
230-
}
231-
${'```'}
232-
233214
Please create the complete agent template now.`,
234215
},
235216
}

common/src/templates/agent-template.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ export interface AgentConfig {
5959
* but usually not necessary for smart models. Prefer instructionsPrompt for most instructions. */
6060
stepPrompt: string
6161

62-
/** Instructions for specific parent agents on when to spawn this agent as a subagent. */
63-
parentInstructions?: Record<SubagentName, string>
64-
6562
// ============================================================================
6663
// Input and Output
6764
// ============================================================================

common/src/types/dynamic-agent-template.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export const DynamicAgentConfigSchema = z.object({
134134
systemPrompt: z.string().optional(),
135135
instructionsPrompt: z.string().optional(),
136136
stepPrompt: z.string(),
137+
// NOTE: Removed from AgentConfig. If there's a need, can be added back or else removed entirely.
137138
parentInstructions: z.record(z.string(), z.string()).optional(),
138139

139140
// Optional generator function for programmatic agents

0 commit comments

Comments
 (0)