any-agent icon indicating copy to clipboard operation
any-agent copied to clipboard

feat(tools): add SpecStream web search and page extract tools

Open Specstreamai opened this issue 1 week ago • 0 comments

Motivation

any_agent.tools.web_browsing currently provides search_web (DuckDuckGo), visit_webpage, and search_tavily. Adding optional search_specstream and extract_specstream tools lets agents use SpecStream's live web search and page extraction APIs (https://api.specstream.ai/v1/web-search and /v1/extract) using the existing requests dependency, with no additional packages required.

Proposed API

  • search_specstream(query: str, num: int = 10, speed: str = "default") -> str: reads SPECSTREAM_API_KEY, calls POST https://api.specstream.ai/v1/web-search, and returns formatted markdown [title](url) excerpt results (matching search_tavily).
  • extract_specstream(url: str, max_length: int = 10000) -> str: reads SPECSTREAM_API_KEY, calls POST https://api.specstream.ai/v1/extract, and returns truncated clean page text (matching visit_webpage).
  • Export both from any_agent.tools with full unit tests in tests/unit/tools/test_unit_web_browsing.py.

Opening this issue first per CONTRIBUTING.md since it adds two public tool functions. Happy to submit a PR if maintainers agree on the interface.

Disclosure: I am the founder of SpecStream.

Specstreamai avatar Nov 24 '26 04:11 Specstreamai