MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / base

Function base

agents-graveyard/base/base-factory.ts:12–81  ·  view source on GitHub ↗
(
  model: ModelName,
  mode: 'lite' | 'normal' | 'max' | 'experimental',
)

Source from the content-addressed store, hash-verified

10import type { ModelName } from '../../agents/types/agent-definition'
11
12export const base = (
13 model: ModelName,
14 mode: 'lite' | 'normal' | 'max' | 'experimental',
15): Omit<SecretAgentDefinition, 'id'> => ({
16 model,
17 displayName: AGENT_PERSONAS.base.displayName,
18 spawnerPrompt: AGENT_PERSONAS.base.purpose,
19 inputSchema: {
20 prompt: {
21 type: 'string',
22 description: 'A coding task to complete',
23 },
24 params: {
25 type: 'object',
26 properties: {
27 maxContextLength: {
28 type: 'number',
29 },
30 },
31 required: [],
32 },
33 },
34 outputMode: 'last_message',
35 includeMessageHistory: false,
36 toolNames: [
37 'create_plan',
38 'run_terminal_command',
39 'str_replace',
40 'write_file',
41 'lookup_agent_info',
42 'spawn_agents',
43 'add_subgoal',
44 'update_subgoal',
45 'browser_logs',
46 'code_search',
47 'read_files',
48 'think_deeply',
49 'end_turn',
50 ],
51 spawnableAgents: [
52 'file-explorer',
53 'find-all-referencer',
54 'researcher-web',
55 'researcher-docs',
56 'thinker',
57 'reviewer',
58 'context-pruner',
59 ],
60
61 systemPrompt: baseAgentSystemPrompt(model, mode),
62 instructionsPrompt: baseAgentUserInputPrompt(model, mode),
63 stepPrompt: baseAgentAgentStepPrompt(model),
64
65 handleSteps: function* ({ params }) {
66 while (true) {
67 // Run context-pruner before each step
68 yield {
69 toolName: 'spawn_agent_inline',

Callers 5

base.tsFile · 0.90
base-lite.tsFile · 0.90
base-max.tsFile · 0.90
base-quick.tsFile · 0.90

Calls 3

baseAgentSystemPromptFunction · 0.90
baseAgentUserInputPromptFunction · 0.90
baseAgentAgentStepPromptFunction · 0.90

Tested by

no test coverage detected