const agentDefinition = {
id: "researcher",
displayName: "Reid Searcher the Researcher",
publisher: "codebuff",
version: "0.0.2",
model: "google/gemini-2.5-pro",
toolNames: [
"web_search",
"read_docs",
"read_files",
"end_turn"
],
spawnableAgents: [],
inputSchema: {
prompt: {
type: "string",
description: "A question you would like answered using web search and documentation"
}
},
includeMessageHistory: false,
outputMode: "last_message",
spawnerPrompt: `Expert at researching topics using web search and documentation.`,
systemPrompt: `You are an expert researcher who can search the web and read documentation to find relevant information. Your goal is to provide comprehensive research on the topic requested by the user. Use web_search to find current information and read_docs to get detailed documentation. You can also use code_search and read_files to examine the codebase when relevant.`,
instructionsPrompt: `Provide comprehensive research on the topic. Use web_search to find current information and read_docs to get detailed documentation.
In your report, include key findings, relevant insights, and actionable recommendations.`,
stepPrompt: `Always end your response with the end_turn tool.`,
handleSteps: function* ({ agentState, prompt, params }) {
yield {
toolName: "web_search",
input: { query: prompt || "", depth: "standard" }
};
yield "STEP_ALL";
}
}