hero_agent: web_search tool is a stub — needs real implementation #10

Open
opened 2026-04-28 12:19:52 +00:00 by mik-tf · 0 comments
Owner

Problem

The web_search built-in tool in hero_agent is a stub that always returns:

Web search is not yet configured. Set SEARCH_API_KEY to enable.

There is no actual SEARCH_API_KEY env var handling — the tool always returns this error.

Location

hero_agent/crates/hero_agent_tools/src/web_search.rs — the execute() method returns a hardcoded error.

What's Needed

Implement actual web search using a search API provider. Options:

  • Brave Search API (free tier available)
  • SerpAPI (Google results)
  • Tavily (AI-optimized search)
  • DuckDuckGo (no API key needed, limited)

The implementation should:

  1. Read API key from env var (e.g., HERO_AGENT_SEARCH_API_KEY)
  2. Make HTTP request to search provider
  3. Parse and return top results (title, URL, snippet)
  4. Add the env var to hero_zero/services/hero_agent.toml

Priority

P3 — nice to have, agent works well without it using MCP tools and file/shell operations.

Signed-off-by: mik-tf


Originally filed as home#112 on 2026-04-12 by mik-tf — moved to hero_demo as part of consolidating issue tracking.

## Problem The `web_search` built-in tool in hero_agent is a stub that always returns: ``` Web search is not yet configured. Set SEARCH_API_KEY to enable. ``` There is no actual `SEARCH_API_KEY` env var handling — the tool always returns this error. ## Location `hero_agent/crates/hero_agent_tools/src/web_search.rs` — the `execute()` method returns a hardcoded error. ## What's Needed Implement actual web search using a search API provider. Options: - **Brave Search API** (free tier available) - **SerpAPI** (Google results) - **Tavily** (AI-optimized search) - **DuckDuckGo** (no API key needed, limited) The implementation should: 1. Read API key from env var (e.g., `HERO_AGENT_SEARCH_API_KEY`) 2. Make HTTP request to search provider 3. Parse and return top results (title, URL, snippet) 4. Add the env var to `hero_zero/services/hero_agent.toml` ## Priority P3 — nice to have, agent works well without it using MCP tools and file/shell operations. Signed-off-by: mik-tf --- *Originally filed as [home#112](https://forge.ourworld.tf/lhumina_code/home/issues/112) on 2026-04-12 by mik-tf — moved to hero_demo as part of consolidating issue tracking.*
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_demo#10
No description provided.