( model: Model, allAvailableAgents?: string[], )
| 33 | ] |
| 34 | |
| 35 | export const thinkingBase = ( |
| 36 | model: Model, |
| 37 | allAvailableAgents?: string[], |
| 38 | ): Omit<SecretAgentDefinition, 'id'> => ({ |
| 39 | model, |
| 40 | displayName: 'Buffy the Lite Base Agent', |
| 41 | spawnerPrompt: 'Lite base agent that orchestrates the full response.', |
| 42 | inputSchema: { |
| 43 | prompt: { |
| 44 | type: 'string', |
| 45 | description: 'A coding task to complete', |
| 46 | }, |
| 47 | }, |
| 48 | outputMode: 'last_message', |
| 49 | includeMessageHistory: false, |
| 50 | toolNames: [...baseAgentToolNames], |
| 51 | spawnableAgents: allAvailableAgents |
| 52 | ? (allAvailableAgents as any[]) |
| 53 | : baseAgentSubagents, |
| 54 | |
| 55 | systemPrompt: baseAgentSystemPrompt(model, 'normal'), |
| 56 | instructionsPrompt: baseAgentUserInputPrompt(model, 'normal'), |
| 57 | stepPrompt: baseAgentAgentStepPrompt(model), |
| 58 | |
| 59 | handleSteps: function* ({ agentState, prompt, params }) { |
| 60 | while (true) { |
| 61 | yield { |
| 62 | toolName: 'spawn_agents', |
| 63 | input: { |
| 64 | agents: [ |
| 65 | { |
| 66 | agent_type: 'thinker', |
| 67 | prompt: 'Think deeply about the user request', |
| 68 | }, |
| 69 | ], |
| 70 | }, |
| 71 | } satisfies ToolCall |
| 72 | |
| 73 | const { stepsComplete } = yield 'STEP' |
| 74 | if (stepsComplete) break |
| 75 | } |
| 76 | }, |
| 77 | }) |
nothing calls this directly
no test coverage detected