Files
plugins/packages/specstream
SpecStream c0329b2c0c specstream 0.1.0: web search and extract tools, and a web search API entry (#866)
SpecStream's Search API and Extract API as tools for every agent, and as a web search entry in Settings > Models > Web search.

Reviewed at 2ae405947ab71dab6f9557a4191a860bd92a2ddf. Run on mote: bun test packages/specstream (9 pass), bun scripts/check.mjs, bun test scripts (22 pass). Both endpoints, called for real without a key, answer 401 {"error":{"code":"missing_api_key",...}}, which unwrap() raises with its status, so a refused key rests in the rotation.

Not tried: a call with a real key.
2026-11-10 04:37:22 +08:00
..

@magpie-community/tools-specstream

SpecStream Search API and Extract API for every agent magpie connects, and as a web search API in Settings > Models > Web search.

  • web_search: GET https://api.specstream.ai/v1/web-search, $5 per 1,000 searches of up to 10 sources; count is sent as num (1 to 100), and each started block of 10 more sources adds $0.006 to the call. Returns an answer when the evidence supports one, the rows found with the page each value was read from, and the sources in rank order.
  • extract: POST https://api.specstream.ai/v1/extract, up to 20 URLs a call, $0.80 per 1,000 pages. Returns each page's text as markdown or plain text, with its title and the date it says it was published. A page with no text is not charged.
magpie plugin add @magpie-community/tools-specstream

Set SPECSTREAM_API_KEY for the tools (a key from Agents & API in a SpecStream workspace). The web search entry uses only the key magpie keeps for it, asks for the count magpie passes, and trims the sources to it.

A call that succeeds returns {"data": {...}}, and one that stops returns {"error": {"code", "message"}}. The package reads data and, when there is none, raises error.message with the HTTP status. A missing or unknown key (401), an empty balance (402) and a spending limit (403) rest the key in magpie's key rotation. SpecStream signals its per-minute limit with 503 and Retry-After, not 429, so magpie counts that as a plain failure and asks the next search API; the key is not rested.

API reference: search-api.md and extract-api.md; num is in agents.md.

Test: bun test packages/specstream. The tests use mocked replies and never call the API.