Skip to the page

SpecStream for DSPy

SpecStream is the live web data engine for teams and agents. One search function on SpecStream's Search API gives a DSPy RAG module passages from the live web, and the same function works as a dspy.ReAct tool.

What you get

Passages with their URL
Each passage carries the page's title and URL, then the text of the page closest to the query.
Search and read in ReAct
A second function reads any URL through the Extract API, as Markdown, PDFs and Word files included.
Every tool over MCP
dspy.Tool.from_mcp_tool turns SpecStream's MCP tools into DSPy tools, Deep Search lists included.

Set it up

  1. Run pip install -U dspy requests and export SPECSTREAM_API_KEY with a key from Agents & API.
  2. Add a search function that calls GET /v1/web-search with passages=true and returns dspy.Prediction(passages=...).
  3. Call it from your module's forward, or pass it to dspy.ReAct as a tool.

The full setup guide has every step, with what to do if something doesn’t arrive.

Live web data, in DSPy.

Ask in your own words for companies, places, people, filings or anything else the web lists.