SpecStream for LangChain
SpecStream is the live web data engine for teams and agents. langchain-specstream adds tools and a retriever to LangChain, so your agent can ask for data in plain words and get every match from the live web, under a price cap the model can't raise.
What you get
- Matches as Documents
- SpecStreamRetriever turns each match into a Document with its facts in page_content and its source_url in metadata.
- The cap stays in Python
- When a quote tops max_price_usd, the agent gets the price back and can ask for fewer rows or tell the user.
- Schedules through MCP adapters
- Load the whole SpecStream server with langchain-mcp-adapters when the agent should also keep results up to date, export them, or fill in records you already hold.
Set it up
- Run pip install -U langchain-specstream on Python 3.10 or later, with LangChain 0.3 or 1.x.
- Export SPECSTREAM_API_KEY with a key made under Agents & API in SpecStream.
- Pass specstream_tools(max_price_usd=5) to create_agent, or call SpecStreamRetriever from a chain.
The full setup guide has every step, with what to do if something doesn’t arrive.
Live web data, in LangChain.
Ask in your own words for companies, places, people, filings or anything else the web lists.