any-agent
any-agent copied to clipboard
feat(tools): add SpecStream web search and page extract tools
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: readsSPECSTREAM_API_KEY, callsPOST https://api.specstream.ai/v1/web-search, and returns formatted markdown[title](url) excerptresults (matchingsearch_tavily).extract_specstream(url: str, max_length: int = 10000) -> str: readsSPECSTREAM_API_KEY, callsPOST https://api.specstream.ai/v1/extract, and returns truncated clean page text (matchingvisit_webpage).- Export both from
any_agent.toolswith full unit tests intests/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.