MCPcopy
hub / github.com/CodebuffAI/codebuff / thinkingBase

Function thinkingBase

agents-graveyard/base/thinking-base.ts:35–77  ·  view source on GitHub ↗
(
  model: Model,
  allAvailableAgents?: string[],
)

Source from the content-addressed store, hash-verified

33]
34
35export 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})

Callers

nothing calls this directly

Calls 3

baseAgentSystemPromptFunction · 0.90
baseAgentUserInputPromptFunction · 0.90
baseAgentAgentStepPromptFunction · 0.90

Tested by

no test coverage detected