leon icon indicating copy to clipboard operation
leon copied to clipboard

Feature request: optional SpecStream search tool in search_web

Open Specstreamai opened this issue 3 weeks ago • 0 comments

Feature Use Case

The search_web toolkit gives Leon three ways to reach the web today: hosted (search through the active LLM provider), grok (xAI search, needs GROK_API_KEY) and crawlberg (local page reading). When the active provider has no hosted search and the user has no xAI key, Leon has no plain web search left. The search_web_toolkit_skill also stops with provider_not_supported for any provider other than grok (skills/native/search_web_toolkit_skill/src/actions/search.ts).

Some users would rather use a plain search API that returns a list of results (title, URL, snippet and a published date when the page states one) than an LLM summary, so the agent can pick sources itself and pass URLs on to crawlberg.fetchUrl.

Feature Proposal

Add an optional specstream tool to the search_web toolkit, built the same way as grok:

  1. tools/search_web/specstream/tool.json with a searchWeb function (query, optional options.max_results, options.allowed_domains, options.excluded_domains), using the same post_execution hook shape as grok.searchWeb.
  2. tools/search_web/specstream/settings.sample.json with SPECSTREAM_API_KEY: null, read through ToolkitConfig and listed in REQUIRED_SETTINGS, as GROK_API_KEY is.
  3. src/nodejs/specstream-tool.ts that calls GET https://api.specstream.ai/v1/web-search with a Bearer key and returns the results as structured content with their source URLs.
  4. Add "specstream" to tools in toolkit.json and one sentence in progressive_guidance (use it for ordinary searches when hosted search is unavailable and a key is set). The current preference for hosted and the Grok behavior stay as they are.
  5. Optionally, a specstream branch next to the grok check in search.ts, so the skill does not stop on that provider.
  6. A unit test under test/agent/unit/ that mocks fetch and checks the request (URL, query, auth header) and the mapped result, in the style of the existing provider specs.

Nothing changes for users who do not set a key. The service is paid per search with a key (see https://specstream.ai/docs).

Disclosure: I work on SpecStream, so I have an interest in this. CONTRIBUTING asks to discuss first, so I have not opened a PR. If this fits the toolkit, I can send a focused PR against develop; if you prefer a different shape for optional search providers (for example one generic provider tool instead of one folder per vendor), I will follow that.

Specstreamai avatar Nov 14 '26 17:11 Specstreamai