You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add missing handleSteps function to agent builder to fix /agents command functionality
Implements the generator function that orchestrates agent template creation and editing workflow, including directory setup, type definitions copying, and handling both creation and edit modes.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Copy file name to clipboardExpand all lines: .agents/sonnet4-agent-builder.ts
+105Lines changed: 105 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,111 @@ const config: AgentConfig = {
66
66
instructionsPrompt:
67
67
'You are helping to create or edit an agent template. The user will describe what kind of agent they want to create or how they want to modify an existing agent.\n\nFor new agents, analyze their request and create a complete agent template that:\n- Has a clear purpose and appropriate capabilities\n- Leaves out fields that are not needed.\n- Uses only the tools it needs\n- Follows naming conventions\n- Is properly structured\n\nFor editing existing agents:\n- First read the existing agent file they want to edit using read_files\n- Understand the current structure and functionality\n- Make the requested changes while preserving what works\n- Maintain best practices and ensure the agent still works effectively\n- Use str_replace for targeted edits or write_file for major restructuring\n\nWhen editing, always start by reading the current agent file to understand its structure before making changes. Ask clarifying questions if needed, then create or update the template file in the appropriate location.\n\nIMPORTANT: Always end your response with the end_turn tool when you have completed the agent creation or editing task.',
68
68
stepPrompt: '',
69
+
70
+
// Generator function that defines the agent's execution flow
0 commit comments