const agentDefinition = {
id: "file-picker-max",
displayName: "Fletcher the File Fetcher",
publisher: "codebuff",
version: "0.0.4",
model: "google/gemini-2.0-flash-001",
reasoningOptions: {
effort: "low",
enabled: false,
exclude: false
},
toolNames: [
"spawn_agents"
],
spawnableAgents: [
"codebuff/file-lister@0.0.4"
],
inputSchema: {
prompt: {
type: "string",
description: "A coding task to complete"
}
},
includeMessageHistory: false,
outputMode: "last_message",
spawnerPrompt: `Spawn to find relevant files in a codebase related to the prompt. Cannot do string searches on the codebase.`,
systemPrompt: `You are an expert at finding relevant files in a codebase. {CODEBUFF_FILE_TREE_PROMPT}`,
instructionsPrompt: `Instructions:
Provide an extremely short report of the locations in the codebase that could be helpful. Focus on the files that are most relevant to the user prompt. Leave out irrelevant locations.
In your report, please give a very concise analysis that includes the full paths of files that are relevant and (extremely briefly) how they could be useful.`,
stepPrompt: ``,
handleSteps: function* ({ prompt, logger }) {
const { toolResult: fileListerResults } = yield {
toolName: "spawn_agents",
input: {
agents: [
{
agent_type: "file-lister",
prompt: prompt ?? ""
}
]
}
}, fileListerResult = fileListerResults?.[0];
yield {
toolName: "read_files",
input: {
paths: (fileListerResult && fileListerResult.type === "json" ? fileListerResult.value?.[0]?.value?.value : "").split(`
`).filter(Boolean)
}
};
yield "STEP_ALL";
},
mcpServers: {},
inheritParentSystemPrompt: false
}