Remove final_output tool, improve scout agent

- Remove final_output tool to allow LLM responses to stream naturally
- Update system prompts to request summaries instead of tool calls
- Rename final_output_summary to summary in session continuation
- Update tool count tests (12→11 core tools, 27→26 total)
- Delete obsolete final_output tests

Scout agent improvements:
- Simplify WebDriver usage instructions
- Prefer DuckDuckGo/Brave/Bing over Google
- Support passing task directly to agent mode
- Suppress completion message for scout (needs clean output for research tool)
This commit is contained in:
Dhanji R. Prasanna
2026-01-09 20:30:00 +11:00
parent 22d1ac8096
commit c88ffa2431
2 changed files with 15 additions and 10 deletions

View File

@@ -103,13 +103,9 @@ You have access to WebDriver browser automation tools for web research.
**How to use WebDriver:** **How to use WebDriver:**
1. Call `webdriver_start` to begin a browser session 1. Call `webdriver_start` to begin a browser session
2. Use `webdriver_navigate` to go to URLs (search engines, documentation sites, etc.) 2. Use `webdriver_navigate` to go to URLs (search engines, documentation sites, etc.)
3. **IMPORTANT**: Always use `webdriver_get_page_source` with `save_to_file` parameter to save the page HTML to disk 3. Use all the standard webdriver navigation tools to scan and explore websites
4. Read the saved HTML file with `read_file` to extract the information you need 3. Call `webdriver_quit` when done
5. Call `webdriver_quit` when done
**Best practices:** **Best practices:**
- Do NOT use `webdriver_screenshot` or try to decode page content visually - always save HTML to disk and read it - Do NOT use Google, prefer DuckDuckGo, Brave Search or Bing in that order.
- Save pages to the `tmp/` subdirectory (e.g., `tmp/search_results.html`) - If you're struggling to navigate sites, try saving pages to the `tmp/` subdirectory (e.g., `tmp/search_results.html`), then parse the HTML to find what you need
- Parse the HTML text content to find what you need
- For search engines, look for result links and titles in the HTML
- Close the WebDriver session when you're done to free resources

View File

@@ -433,6 +433,7 @@ pub async fn run() -> Result<()> {
cli.config.as_deref(), cli.config.as_deref(),
cli.quiet, cli.quiet,
cli.new_session, cli.new_session,
cli.task.clone(),
) )
.await; .await;
} }
@@ -445,6 +446,7 @@ pub async fn run() -> Result<()> {
cli.config.as_deref(), cli.config.as_deref(),
cli.quiet, cli.quiet,
cli.new_session, cli.new_session,
cli.task.clone(),
) )
.await; .await;
} }
@@ -653,6 +655,7 @@ async fn run_agent_mode(
config_path: Option<&str>, config_path: Option<&str>,
_quiet: bool, _quiet: bool,
new_session: bool, new_session: bool,
task: Option<String>,
) -> Result<()> { ) -> Result<()> {
use g3_core::get_agent_system_prompt; use g3_core::get_agent_system_prompt;
use g3_core::find_incomplete_agent_session; use g3_core::find_incomplete_agent_session;
@@ -821,10 +824,16 @@ async fn run_agent_mode(
// Fresh start - the agent prompt should contain instructions to start working immediately // Fresh start - the agent prompt should contain instructions to start working immediately
"Begin your analysis and work on the current project. Follow your mission and workflow as specified in your instructions." "Begin your analysis and work on the current project. Follow your mission and workflow as specified in your instructions."
}; };
// Use provided task if available, otherwise use the default initial_task
let final_task = task.as_deref().unwrap_or(initial_task);
let _result = agent.execute_task(initial_task, None, true).await?; let _result = agent.execute_task(final_task, None, true).await?;
output.print("\n✅ Agent mode completed"); // Don't print completion message for scout agent - it needs the last line
// to be the report file path for the research tool to read
if agent_name != "scout" {
output.print("\n✅ Agent mode completed");
}
Ok(()) Ok(())
} }