Add research tool for web-based research via scout agent
New tool that spawns a scout agent to perform web research and return a structured research brief. The scout agent uses webdriver to browse the web and returns a decision-ready report. Changes: - Added 'research' tool definition (12 core tools total) - Added research tool dispatch in tool_dispatch.rs - Created tools/research.rs implementation: - Spawns 'g3 --agent scout <query>' as subprocess - Captures stdout and extracts last line (report file path) - Reads and returns the report file contents - Added exclude_research flag to ToolConfig - Scout agent (agent_name == 'scout') does NOT have access to research tool to prevent infinite recursion - Updated system prompts to describe when to use research tool - Added scout.md agent prompt with research brief output contract The research tool is preferred for complex research tasks (APIs, SDKs, libraries, approaches, bugs). WebDriver can still be used directly for simple lookups or fine-grained control.
This commit is contained in:
@@ -7,7 +7,7 @@ use anyhow::Result;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use crate::tools::executor::ToolContext;
|
||||
use crate::tools::{file_ops, misc, shell, todo, webdriver};
|
||||
use crate::tools::{file_ops, misc, research, shell, todo, webdriver};
|
||||
use crate::ui_writer::UiWriter;
|
||||
use crate::ToolCall;
|
||||
|
||||
@@ -41,6 +41,9 @@ pub async fn dispatch_tool<W: UiWriter>(
|
||||
"code_coverage" => misc::execute_code_coverage(tool_call, ctx).await,
|
||||
"code_search" => misc::execute_code_search(tool_call, ctx).await,
|
||||
|
||||
// Research tool
|
||||
"research" => research::execute_research(tool_call, ctx).await,
|
||||
|
||||
// WebDriver tools
|
||||
"webdriver_start" => webdriver::execute_webdriver_start(tool_call, ctx).await,
|
||||
"webdriver_navigate" => webdriver::execute_webdriver_navigate(tool_call, ctx).await,
|
||||
|
||||
Reference in New Issue
Block a user