Inngest AgentKit
Give an AgentKit agent SpecStream's tools over Streamable HTTP. It can search the live web, read pages and build datasets of structured rows, and inside an Inngest function each tool call runs as its own step.
SpecStream for Inngest AgentKitAgent frameworks & buildersWhat you need
- Node.js,
@inngest/agent-kit(this guide follows 0.13.2) and its peersinngestandzod. - A SpecStream API key with a spending limit. New accounts get $10 of credit on sign-up, no card.
- 1
1. Create an API key
In your SpecStream workspace, open Agents & API, choose API keys, then Create API key. Give it only the spending limit the agent needs, and keep it in an environment variable where the agent runs:
Terminal - 2
2. Add SpecStream to the agent
Put SpecStream in the agent's
mcpServerswith thestreamable-httptransport. AgentKit passesrequestInitto the MCP SDK'sStreamableHTTPClientTransport, so the key goes as a header on every request:research.ts - 3
3. Run the network
On its first run the agent lists the server's tools and names each one after the server:
specstream-search_web,specstream-read_pagesand the rest. The model picks them like any tool you made withcreateTool.run.ts - 4
4. Run it inside an Inngest function
Serve the network from an Inngest function as you would any AgentKit network. There AgentKit wraps each MCP call in
step.run, named after the tool, so a retry of the function reuses a search that already returned and does not pay for it twice.
What the agent can call
AgentKit adds every tool the server lists. These are the ones a research agent uses most:
specstream-search_webanswers a question from the live web, with the results it read and a source URL and read time on each value.specstream-read_pagesreturns the main text of up to 20 web pages or documents (PDF, Word, Excel) in one call.specstream-compilereads a request for a dataset into conditions and columns, andspecstream-quote_capacity_workprices it. Neither spends anything.specstream-authorize_capacity_workstarts the run, only with the approved maximum inconfirm_max_cents.specstream-get_findandspecstream-list_find_rowsfollow it and read the rows.
Spending limits
Searches and page reads are charged per call with no approval. A dataset run needs a quote, and starts only with that quote's maximum. The key's own spending limit holds over both: a call past it is refused with 403. In a network that should not start paid runs on its own, give the key a low limit, or route to a person before authorize_capacity_work.
OAuth for your users
When each user of your app should spend from their own SpecStream account, pass an MCP SDK OAuthClientProvider as authProvider in the same transport, in place of the header. AgentKit hands it to the transport unchanged.
One search tool without MCP
To give an agent a single search tool with no MCP connection, call the Search API from a createTool handler: GET https://api.specstream.ai/v1/web-search?q= with Authorization: Bearer and your key. The Search API docs list the reply's fields.
Cost
Connecting is free. Each search is one Search API call at $5 per 1,000 searches of up to 10 results, and each page read with text is $0.80 per 1,000 pages. A dataset costs 5¢, 15¢ or $1 a row, plus 5¢ for a person's email and 15¢ for a phone, never more than the approved maximum, and a run that finds nothing costs nothing. How quotes and billing work.
Remove
Take the specstream entry out of mcpServers. Revoke the key under Agents & API to stop it everywhere. Results already delivered stay in your workspace. Other ways to build with SpecStream are in agent frameworks. Questions go to [email protected].
More
SpecStream for Inngest AgentKit covers what it does in Inngest AgentKit on one page. Every other tool has its guide in Connect your tools. You see the most a request can cost before it starts, and the matches are paid from your balance. Billing has the details. For help, email [email protected].