# Tabstack > Give your model the web without giving up your privacy Tabstack lets your model research live sources, extract the data it needs, and automate web tasks, without you building its web stack. Research returns a cited answer, Extract returns clean Markdown or JSON matching a schema you define, and Automate returns the completed browser task. Tabstack runs the browsers and web interactions outside your model. Never trained on. Private by default. Built by Mozilla. When to use Tabstack: - **Research**: Use /research when you need an answer rather than sources: it reads across live pages, checks what is missing, and returns a cited synthesis. This is the right default when the question spans more than one page. - **Extract**: Use /extract/markdown to read one known page as clean text, and /extract/json when that page has a structure you can describe as a schema. - **Generate**: Use /generate/json when the shape you want is not on the page: it transforms and summarizes content into a new structure, rather than lifting what is already there. - **Automate**: Use /automate for an interactive multi-step task on a website: navigation, clicks and forms. It does not sign in on your behalf. Start with [agents.md](https://tabstack.ai/agents.md) for auth, endpoints and errors. ## Product - [Research](https://tabstack.ai/web-research): Research reads the sources, checks what is missing, builds the answer and attaches citations, in one call. - [Extract](https://tabstack.ai/structured-extraction): Extract returns readable text or JSON that matches a schema you supply, from a public URL. - [Automate](https://tabstack.ai/browser-automation): Automate completes multi-step tasks on public websites and returns the result. ## Integrations - [LangChain](https://tabstack.ai/integrations/langchain): Native LangChain tools for web extraction, research, generation, and automation, for both LangChain.js and Python. - [Vercel AI SDK](https://tabstack.ai/integrations/vercel-ai-sdk): Typed tool() definitions that pass straight to generateText and streamText, backed by the Tabstack SDK. - [OpenAI Agents](https://tabstack.ai/integrations/openai-agents): Pre-built tool() definitions you hand straight to an Agent, backed by the Tabstack SDK. - [Claude Agent](https://tabstack.ai/integrations/claude-agent): Pre-built Tabstack tools you wire into a Claude Agent SDK query() call. - [Mastra](https://tabstack.ai/integrations/mastra): Typed createTool definitions that spread straight into a Mastra Agent, backed by the Tabstack SDK. - [LlamaIndex](https://tabstack.ai/integrations/llamaindex): Pre-built tool() definitions you pass straight to a LlamaIndex.TS agent, backed by the Tabstack SDK. - [eve](https://tabstack.ai/integrations/eve): Pre-built defineTool definitions you re-export into agent/tools/ for cited answers, clean Markdown, matching JSON, and browser tasks in eve agents. - [Hermes Agent](https://tabstack.ai/integrations/hermes-agent): A Hermes plugin that adds a tabstack toolset plus a Tabstack backend for Hermes' own web_extract tool. ## Schema library - [B2B Intelligence](https://tabstack.ai/schemas/b2b-intel): Company profiles, competitors, funding, pricing pages, changelogs and tech stacks. - [E-commerce](https://tabstack.ai/schemas/e-commerce): Product listings, reviews, category results, marketplace sellers and grocery items. - [Jobs and Hiring](https://tabstack.ai/schemas/jobs): Job postings, salary data, hiring velocity, layoffs and leadership changes. - [Real Estate](https://tabstack.ai/schemas/real-estate): Residential and commercial listings, rentals, sold history, foreclosures and short-term stays. - [Finance](https://tabstack.ai/schemas/finance): Public filings, crypto assets, VC portfolios, angel deals and alternative assets. - [Government and Public Records](https://tabstack.ai/schemas/gov-public-records): Business registrations, court filings, contract awards, permits and property tax records. - [Healthcare](https://tabstack.ai/schemas/healthcare): Clinical trials, provider directories, drug formularies and device recalls. - [Travel](https://tabstack.ai/schemas/travel): Hotel and restaurant listings, flight price snapshots and attractions. - [Social and Content](https://tabstack.ai/schemas/social-content): News articles, social profiles and software reviews. - [Developer Ecosystem](https://tabstack.ai/schemas/developer-ecosystem): GitHub repositories and package registry entries for OSS and competitive research. ## For agents - [Tabstack agents.md](https://tabstack.ai/agents.md): Onboarding quickstart: auth, endpoints, errors, adapters - [Tabstack API OpenAPI spec (JSON)](https://tabstack.ai/openapi.json): The wire contract, OpenAPI 3.0.3 - [Tabstack API OpenAPI spec (YAML)](https://tabstack.ai/openapi.yaml): The same document as YAML - [Tabstack TypeScript SDK](https://www.npmjs.com/package/@tabstack/sdk): npm install @tabstack/sdk - [Tabstack Python SDK](https://pypi.org/project/tabstack/): pip install tabstack - [Tabstack CLI](https://github.com/Mozilla-Ocho/tabstack-cli): tabstack-cli, authenticated with TABSTACK_API_KEY ## Reference - [Pricing](https://tabstack.ai/pricing) - [Trust](https://tabstack.ai/trust) - [Documentation](https://docs.tabstack.ai) - [Privacy Notice](https://tabstack.ai/legal/privacy) - [Terms of Service](https://tabstack.ai/legal/terms) --- # Tabstack for agents Tabstack lets your model research live sources, extract the data it needs, and automate web tasks, without you building its web stack. Research returns a cited answer, Extract returns clean Markdown or JSON matching a schema you define, and Automate returns the completed browser task. Tabstack runs the browsers and web interactions outside your model. Never trained on. Private by default. Built by Mozilla. - Version: 2.0 - Updated: 2026-10-01 - Canonical: https://tabstack.ai/agents.md - API spec: https://tabstack.ai/openapi.json (OpenAPI 3.0.3; this document is a quickstart and does not restate it) - Documentation: https://docs.tabstack.ai ## Base URL and auth ``` https://api.tabstack.ai/v1 ``` Authenticate with an API key. The SDKs read `TABSTACK_API_KEY` from the environment, so no key appears in any example below. Get one at https://console.tabstack.ai/signup; signing in with a browser creates the account and provisions the key in one step. ## Install ```bash pip install tabstack # Python ``` ```bash # CLI (macOS / Linux) curl -fsSL https://tabstack.ai/install.sh | sh tabstack auth login ``` ```bash # Hermes Agent plugin (Python 3.11+) pip install tabstack-hermes hermes plugins enable tabstack ``` ```bash npm i @tabstack/sdk # TypeScript ``` ```ts import Tabstack from '@tabstack/sdk' // Reads TABSTACK_API_KEY from the environment by default. const client = new Tabstack() ``` ## Endpoints | Endpoint | SDK method | Returns | Purpose | | --- | --- | --- | --- | | `/research` | `client.agent.research()` | 200 OK · text/event-stream (SSE) | Answer a question with cited multi-source synthesis from the live web. Streams (SSE). | | `/extract/markdown` | `client.extract.markdown()` | 200 OK · application/json | Fetch a URL and return its content as clean Markdown. | | `/extract/json` | `client.extract.json()` | 200 OK · application/json | Fetch a URL and return JSON matching a schema you define. | | `/generate/json` | `client.generate.json()` | 200 OK · application/json | Fetch a URL, transform its content per instructions, and return JSON matching a schema. | | `/automate` | `client.agent.automate()` | 200 OK · text/event-stream (SSE) | Run a multi-step browser task on a website from a plain-language description. Streams (SSE). | ### /research Answer a question with cited multi-source synthesis from the live web. Streams (SSE). ```ts import Tabstack from '@tabstack/sdk' const client = new Tabstack() // /research always streams Server-Sent Events. const stream = await client.agent.research({ query: 'Compare pricing and free tiers across the top 3 analytics platforms', }) for await (const event of stream) { // The final cited report arrives on the complete event. if (event.event === 'complete') { console.log(event.data.report) break } if (event.event === 'error') { console.error(event.data.error.message) break } } ``` ```bash tabstack agent research \ "Compare pricing and free tiers across the top 3 analytics platforms" \ --mode fast ``` ### /extract/markdown Fetch a URL and return its content as clean Markdown. ```ts import Tabstack from '@tabstack/sdk' const client = new Tabstack() const page = await client.extract.markdown({ url: 'https://example.com/docs/getting-started', }) console.log(page.content) ``` ```bash tabstack extract markdown https://example.com/docs/getting-started ``` ### /extract/json Fetch a URL and return JSON matching a schema you define. ```ts import Tabstack from '@tabstack/sdk' const client = new Tabstack() const product = await client.extract.json({ url: 'https://store.example.com/products/aurora-trail-jacket', json_schema: { type: 'object', properties: { name: { type: 'string', description: 'Product name' }, price: { type: 'number', description: 'Current price' }, in_stock: { type: 'boolean', description: 'Whether the product is available' }, }, }, }) console.log(product.name, product.price) ``` ```bash tabstack extract json \ https://store.example.com/products/aurora-trail-jacket \ --schema '{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"number"}}}' ``` ### /generate/json Fetch a URL, transform its content per instructions, and return JSON matching a schema. ```ts import Tabstack from '@tabstack/sdk' const client = new Tabstack() // Use generate, not extract, when the shape you want is not on the page. const summary = await client.generate.json({ url: 'https://example.com/pricing', instructions: 'Summarize each plan and who it suits.', json_schema: { type: 'object', properties: { plans: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, suits: { type: 'string' }, }, }, }, }, }, }) console.log(summary.plans) ``` ```bash tabstack generate json https://example.com/pricing \ --instructions "Summarize each plan and who it suits" \ --schema '{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object"}}}}' ``` ### /automate Run a multi-step browser task on a website from a plain-language description. Streams (SSE). ```ts import Tabstack from '@tabstack/sdk' const client = new Tabstack() // /automate always streams Server-Sent Events. const stream = await client.agent.automate({ task: 'Find the published delivery estimate for the standard shipping option', url: 'https://example.com/shipping', }) for await (const event of stream) { if (event.event === 'complete') { console.log(event.data) break } if (event.event === 'error') { console.error(event.data.error.message) break } } ``` ```bash tabstack agent automate \ "Find the current status of order tracking for carrier X" \ --url https://example.com ``` ## Choosing an endpoint **When should an agent use /research?** Use /research when you need an answer rather than sources: it reads across live pages, checks what is missing, and returns a cited synthesis. This is the right default when the question spans more than one page. **When should an agent use the extract endpoints?** Use /extract/markdown to read one known page as clean text, and /extract/json when that page has a structure you can describe as a schema. **When should an agent use /generate/json instead of /extract/json?** Use /generate/json when the shape you want is not on the page: it transforms and summarizes content into a new structure, rather than lifting what is already there. **When should an agent use /automate?** Use /automate for an interactive multi-step task on a website: navigation, clicks and forms. It does not sign in on your behalf. ## Effort, caching and geotargeting - `effort`: `min`, `standard` or `max` on the extract and generate endpoints. Higher effort spends more time on difficult pages. - `mode`: `fast` or `balanced` on `/research`. - `nocache`: set true to bypass the cache when you need a fresh read. - `geo_target`: request the page from a given country when results differ by region. Supported on the extract, generate and automate endpoints, not on `/research`. The defaults suit most requests. Reach for these only when a result tells you to. ## Streaming `/research` and `/automate` always stream Server-Sent Events. The SDK returns an async iterable, so iterate with `for await`: read events until `complete`, and handle `error`. The other endpoints return a single JSON response. ## Errors and retries | Status | SDK error class | | --- | --- | | 400 | `BadRequestError` | | 401 | `AuthenticationError` | | 403 | `PermissionDeniedError` | | 404 | `NotFoundError` | | 409 | `ConflictError` | | 422 | `UnprocessableEntityError` | | 429 | `RateLimitError` | | 500+ | `InternalServerError` | All of these extend `APIError`. Connection failures raise `APIConnectionError` and timeouts `APIConnectionTimeoutError`. The SDK retries `408`, `409`, `429` and `500+` twice with exponential backoff before raising. It does not retry a `400`, `401`, `403`, `404` or `422`, which describe the request rather than a transient fault. ## Framework adapters Pre-built tool definitions for the frameworks below. Each page has a markdown twin at `https://tabstack.ai/integrations/.md`. | Framework | Package | Language | Guide | | --- | --- | --- | --- | | LangChain | `@tabstack/langchain` | TypeScript, Python | https://tabstack.ai/integrations/langchain.md | | Vercel AI SDK | `@tabstack/ai` | TypeScript | https://tabstack.ai/integrations/vercel-ai-sdk.md | | OpenAI Agents | `@tabstack/openai-agents` | TypeScript | https://tabstack.ai/integrations/openai-agents.md | | Claude Agent | `@tabstack/claude-agent` | TypeScript | https://tabstack.ai/integrations/claude-agent.md | | Mastra | `@tabstack/mastra` | TypeScript | https://tabstack.ai/integrations/mastra.md | | LlamaIndex | `@tabstack/llamaindex` | TypeScript | https://tabstack.ai/integrations/llamaindex.md | | eve | `@tabstack/eve` | TypeScript | https://tabstack.ai/integrations/eve.md | | Hermes Agent | `tabstack-hermes` | Python | https://tabstack.ai/integrations/hermes-agent.md | ## More - Schema library: https://tabstack.ai/schemas (47 pre-built extraction schemas) - Pricing and limits: https://tabstack.ai/pricing - Data handling: https://tabstack.ai/trust - Console: https://console.tabstack.ai - Pilo: https://github.com/mozilla/pilo, the open-source browser automation engine behind `/automate`. For automation that must run on your own infrastructure, for example behind a login or air-gapped, run Pilo yourself. - Site index for models: https://tabstack.ai/llms.txt --- # Full text Everything below is the body text of the pages listed above, inlined so a model can read the site in one request. Canonical HTML lives at https://tabstack.ai. ## LangChain Source: https://tabstack.ai/integrations/langchain ## Why LangChain + Tabstack LangChain's built-in loaders fetch and parse in your process and need Playwright for JavaScript pages. The Tabstack adapters move that work to a hosted API exposed as native LangChain tools: schema-enforced output, server-side rendering of JS-heavy pages, and one key for extraction, research, generation, and automation. It's an SDK call, not a loader coupled to your LangChain version. Two officially maintained packages track the same tool surface: - **TypeScript**: [`@tabstack/langchain`](https://www.npmjs.com/package/@tabstack/langchain) for LangChain.js - **Python**: [`langchain-tabstack`](https://pypi.org/project/langchain-tabstack/) for LangChain (Python) ## Quickstart Install the adapter and set your key: ```bash # TypeScript npm install @tabstack/langchain @langchain/core zod # Python pip install langchain-tabstack export TABSTACK_API_KEY="your-key-here" ``` Drop the tool set into an agent. TypeScript: ```ts import { createAgent } from "langchain"; import { tabstackTools } from "@tabstack/langchain"; const agent = createAgent({ model: "openai:gpt-4o", tools: tabstackTools, systemPrompt: "You are a research assistant with web research and extraction tools.", }); const result = await agent.invoke({ messages: [{ role: "user", content: "What are Vercel's pricing plans?" }], }); console.log(result.messages.at(-1)?.content); ``` The same set in Python: ```python from langchain.agents import create_agent from langchain_tabstack import TABSTACK_TOOLS agent = create_agent("openai:gpt-4o", tools=TABSTACK_TOOLS) result = agent.invoke( {"messages": [{"role": "user", "content": "What are Vercel's pricing plans?"}]} ) print(result["messages"][-1].content) ``` `tabstackTools` / `TABSTACK_TOOLS` read `TABSTACK_API_KEY` from the environment. Every tool is also exported individually, so you can hand a single one to a chain without an agent. ## The tools | Tool | What it does | | --- | --- | | `extract_structured_data` | Pull specific fields from a URL into a JSON shape you define. | | `extract_page_content` | Fetch a page as clean Markdown. | | `research_question` | Synthesized answer with cited sources across multiple pages. | | `generate_structured_data` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automate_browser_task` | Run a multi-step, natural-language browser task. | ## Common use cases - Give a research agent cited, multi-source answers instead of a single fragile page fetch. - Extract typed records (pricing, listings, docs) from a public URL straight into your chain state. - Reshape a live page into derived JSON with `generate_structured_data`. - Run natural-language browser tasks from inside an agent step. ## Next steps - [TypeScript adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-integrations-typescript) - [Python adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-langchain-python) - [Get an API key](https://console.tabstack.ai/signup) ## Vercel AI SDK Source: https://tabstack.ai/integrations/vercel-ai-sdk ## Why Vercel AI SDK + Tabstack Adding web access to an AI SDK app usually means writing your own fetch and parse code. [`@tabstack/ai`](https://www.npmjs.com/package/@tabstack/ai) replaces that with a hosted API exposed as typed `tool()` definitions: define the shape with Zod or JSON Schema and get that shape back, with JS-heavy pages rendered server-side. No Playwright, no binaries. One key covers extraction, research, generation, and automation. ## Quickstart Install the adapter and set your key: ```bash npm install @tabstack/ai ai zod export TABSTACK_API_KEY="your-key-here" ``` Pass the tool set straight to `generateText` (or `streamText`): ```ts import { openai } from "@ai-sdk/openai"; import { generateText, stepCountIs } from "ai"; import { tabstackTools } from "@tabstack/ai"; const { text } = await generateText({ model: openai("gpt-4o"), tools: tabstackTools, stopWhen: stepCountIs(5), // let the model call a tool, then use the result prompt: "What are Vercel's pricing plans and how do they compare?", }); console.log(text); ``` `tabstackTools` reads `TABSTACK_API_KEY` from the environment and is a named object keyed by tool name. Pass all of them, or pick a subset: ```ts import { streamText, stepCountIs } from "ai"; import { tabstackTools } from "@tabstack/ai"; const result = streamText({ model: openai("gpt-4o"), tools: { research_question: tabstackTools.research_question, extract_page_content: tabstackTools.extract_page_content, }, stopWhen: stepCountIs(5), prompt: "Summarize the latest on quantum error correction, with sources.", }); for await (const chunk of result.textStream) process.stdout.write(chunk); ``` ## The tools | Tool | What it does | | --- | --- | | `extract_structured_data` | Pull specific fields from a URL into a JSON shape you define. | | `extract_page_content` | Fetch a page as clean Markdown. | | `research_question` | Synthesized answer with cited sources across multiple pages. | | `generate_structured_data` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automate_browser_task` | Run a multi-step, natural-language browser task. | ## Common use cases - Add live web research with citations to a chat app. - Stream a model answer that pulls typed data from a URL mid-response. - Gate expensive automation behind a `stepCountIs` budget. - Ship only the tools a given surface needs by passing a subset. ## Next steps - [Adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-integrations-typescript) - [@tabstack/ai on npm](https://www.npmjs.com/package/@tabstack/ai) - [Get an API key](https://console.tabstack.ai/signup) ## OpenAI Agents Source: https://tabstack.ai/integrations/openai-agents ## Why the OpenAI Agents SDK + Tabstack Adding web access to an agent usually means writing your own fetch and parse code. [`@tabstack/openai-agents`](https://www.npmjs.com/package/@tabstack/openai-agents) replaces that with a hosted API exposed as native Agents SDK tools: schema-enforced output, server-side rendering of JS-heavy pages, and one key for extraction, research, generation, and automation. Tool names stay in lockstep with the `@tabstack/langchain`, `@tabstack/ai`, `@tabstack/eve`, and Python `langchain-tabstack` packages. ## Quickstart Install the adapter and set your key: ```bash npm install @tabstack/openai-agents @openai/agents zod export TABSTACK_API_KEY="your-key-here" ``` `@openai/agents` (v0.13 or later) and `zod` (v4) are peer dependencies. `tabstackTools` is an array of ready-to-use tools, so hand it to an `Agent` and run it: ```ts import { Agent, run } from "@openai/agents"; import { tabstackTools } from "@tabstack/openai-agents"; const agent = new Agent({ name: "Research assistant", instructions: "You are a research assistant with web research and extraction tools. Use research_question for open " + "questions that need multiple sources, extract_page_content to read a specific URL as " + "markdown, and the extract tools to pull structured fields from a page. Always cite sources.", tools: tabstackTools, }); const result = await run(agent, "What are Vercel's pricing plans, with sources?"); console.log(result.finalOutput); ``` The tools resolve `TABSTACK_API_KEY` lazily on first call, so importing the package never requires a key. For a custom key, base URL, or a shared client, build the tools explicitly: ```ts import { createTabstackOpenAIAgentsTools } from "@tabstack/openai-agents"; const tools = createTabstackOpenAIAgentsTools({ apiKey: process.env.MY_KEY }); // or pass an SDK client you already have: createTabstackOpenAIAgentsTools({ client }) ``` ## The tools | Tool name | Export | What it does | | --- | --- | --- | | `extract_structured_data` | `extractStructuredDataTool` | Pull specific fields from a URL into a JSON shape you define. | | `extract_page_content` | `extractPageContentTool` | Fetch a page as clean Markdown. | | `research_question` | `researchQuestionTool` | Synthesized answer with cited sources across multiple pages. | | `generate_structured_data` | `generateStructuredDataTool` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automate_browser_task` | `automateBrowserTaskTool` | Run a multi-step, natural-language browser task. | ## Strict mode and schemas The Agents SDK forces **strict** JSON Schema mode whenever a tool's `parameters` is a Zod schema, and passing `strict: false` alongside a Zod schema throws. Strict mode cannot represent two constructs the shared core schemas rely on: `.optional()` fields, since strict mode requires every property to appear in `required`, and `automate_browser_task`'s open `data` object, which needs a schema-valued `additionalProperties` that strict mode forbids. So the adapter converts each core Zod schema to a JSON Schema and registers the tools with `strict: false`. The model still sees full field descriptions, and every call is validated against the core Zod schema inside `execute` before the request runs, so malformed model output fails fast with a clear error. ## Good to know - **`automate_browser_task` runs non-interactively.** It does not pause for human-in-the-loop form input, so it does not wait on a person. It returns the final answer plus the data it extracted and the pages it visited. - Failed calls throw `TabstackToolError`, a normalized message plus an HTTP `status` for API errors. The Agents SDK surfaces tool errors to the model as a tool result, so a failing call does not abort the run by default. - **Requires Zod 4.** The SDK depends on it, and the adapter uses Zod 4's native `z.toJSONSchema` to advertise each tool's parameters. ## Common use cases - Give a research agent cited, multi-source answers instead of a single fetch. - Pull structured fields off a page without writing parsing code. - Let an agent drive a multi-step browser task in natural language. - Keep tool names consistent across your TypeScript and Python agents. ## Next steps - [Adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-integrations-typescript) - [@tabstack/openai-agents on npm](https://www.npmjs.com/package/@tabstack/openai-agents) - [OpenAI Agents SDK for TypeScript](https://openai.github.io/openai-agents-js/) - [Get an API key](https://console.tabstack.ai/signup) ## Claude Agent Source: https://tabstack.ai/integrations/claude-agent ## Why the Claude Agent SDK + Tabstack Adding web access to an agent usually means writing your own fetch and parse code. [`@tabstack/claude-agent`](https://www.npmjs.com/package/@tabstack/claude-agent) replaces that with a hosted API registered as in-process Claude Agent SDK tools: schema-enforced output, server-side rendering of JS-heavy pages, and one key for extraction, research, generation, and automation. One call builds the tools for `query()`, with no separate process to run. ## Quickstart Install the adapter and set your keys: ```bash npm install @tabstack/claude-agent @anthropic-ai/claude-agent-sdk zod export TABSTACK_API_KEY="your-tabstack-key" export ANTHROPIC_API_KEY="your-anthropic-key" ``` `@anthropic-ai/claude-agent-sdk` and `zod` are peer dependencies. The Claude Agent SDK requires **Zod 4**, so this package's `zod` peer is `^4.0.0`. `tabstackServer` registers the Tabstack tools as in-process Claude Agent SDK tools, and `tabstackAllowedTools` pre-approves every Tabstack tool. Wire both into a `query()` call: ```ts import { query } from "@anthropic-ai/claude-agent-sdk"; import { tabstackServer, tabstackAllowedTools, tabstackMcpServerName } from "@tabstack/claude-agent"; for await (const message of query({ prompt: "What are Vercel's current pricing plans, with sources?", options: { mcpServers: { [tabstackMcpServerName]: tabstackServer }, allowedTools: tabstackAllowedTools, }, })) { if (message.type === "result" && message.subtype === "success") { console.log(message.result); } } ``` The server resolves `TABSTACK_API_KEY` lazily on first tool call, so importing the package never requires a key. For a custom key, base URL, or a shared client, build the server explicitly: ```ts import { createTabstackClaudeAgentServer } from "@tabstack/claude-agent"; const server = createTabstackClaudeAgentServer({ apiKey: process.env.MY_KEY }); // or pass an SDK client you already have: createTabstackClaudeAgentServer({ client }) ``` Assembling the server yourself? `createTabstackClaudeAgentTools(config)` returns the raw tool array to pass to your own `createSdkMcpServer({ name, version, tools })`. ## The tools | Tool name | What it does | | --- | --- | | `extract_structured_data` | Pull specific fields from a URL into a JSON shape you define. | | `extract_page_content` | Fetch a page as clean Markdown. | | `research_question` | Synthesized answer with cited sources across multiple pages. | | `generate_structured_data` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automate_browser_task` | Run a multi-step, natural-language browser task. | Claude sees each tool under its fully qualified MCP name, `mcp__tabstack__`. The names stay in lockstep with the `@tabstack/langchain`, `@tabstack/ai`, `@tabstack/eve`, and Python `langchain-tabstack` packages. ## Good to know - **`automate_browser_task` runs non-interactively.** It does not pause for human-in-the-loop form input, so it does not wait on a person. It returns the final answer plus the data it extracted and the pages it visited. - Failed calls normalize to a `TabstackToolError` and return as an MCP error result (`isError: true`), so Claude reads a useful message and can retry or explain rather than seeing a raw exception. - Each tool's input schema is the core Zod schema's raw shape, so the Agent SDK validates the model's arguments before your handler runs. ## Common use cases - Give a Claude agent cited, multi-source research without running a browser. - Pull structured fields off a page into a shape you define. - Add web access to an existing `query()` call with two imports. - Keep tool names consistent across your TypeScript and Python agents. ## Next steps - [Adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-integrations-typescript) - [@tabstack/claude-agent on npm](https://www.npmjs.com/package/@tabstack/claude-agent) - [Claude Agent SDK docs](https://code.claude.com/docs/en/agent-sdk/overview) - [Get an API key](https://console.tabstack.ai/signup) ## Mastra Source: https://tabstack.ai/integrations/mastra ## Why Mastra + Tabstack Adding web access to an agent usually means writing your own fetch and parse code. [`@tabstack/mastra`](https://www.npmjs.com/package/@tabstack/mastra) replaces that with a hosted API exposed as typed `createTool` definitions: define the shape with Zod and get that shape back, with JS-heavy pages rendered server-side and one key for extraction, research, generation, and automation. ## Quickstart Install the adapter and set your key: ```bash npm install @tabstack/mastra @mastra/core zod export TABSTACK_API_KEY="your-key-here" ``` `@mastra/core` (v1 or later) and `zod` are peer dependencies, so your app's single instance of each is shared. `tabstackTools` is a named object keyed by tool name, ready to spread into an `Agent`: ```ts import { Agent } from "@mastra/core/agent"; import { tabstackTools } from "@tabstack/mastra"; const agent = new Agent({ id: "web-researcher", name: "Web Researcher", instructions: "Answer questions with current information, and always cite your sources.", model: "anthropic/claude-sonnet-4-6", tools: tabstackTools, }); const result = await agent.generate("What are Vercel's pricing plans, with sources?"); console.log(result.text); ``` Want a subset? Every tool is exported individually: ```ts import { Agent } from "@mastra/core/agent"; import { extractPageContentTool, researchQuestionTool, toolNames } from "@tabstack/mastra"; const agent = new Agent({ id: "web-researcher", name: "Web Researcher", instructions: "Summarize pages and research questions.", model: "anthropic/claude-sonnet-4-6", tools: { [toolNames.researchQuestion]: researchQuestionTool, [toolNames.extractPageContent]: extractPageContentTool, }, }); ``` For a custom key, base URL, or a shared client, build the tools explicitly: ```ts import { createTabstackMastraTools } from "@tabstack/mastra"; const tools = createTabstackMastraTools({ apiKey: process.env.MY_KEY }); // or pass an SDK client you already have: createTabstackMastraTools({ client }) ``` ## The tools | Tool | What it does | | --- | --- | | `extract_structured_data` | Pull specific fields from a URL into a JSON shape you define. | | `extract_page_content` | Fetch a page as clean Markdown. | | `research_question` | Synthesized answer with cited sources across multiple pages. | | `generate_structured_data` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automate_browser_task` | Run a multi-step, natural-language browser task. | The model fills the inputs in, but the shapes are worth knowing: `extract_structured_data` takes `url` and `json_schema_json` (a JSON-encoded JSON Schema string), `extract_page_content` takes `url`, `research_question` takes `query`, `generate_structured_data` takes `url`, `instructions`, and `json_schema_json`, and `automate_browser_task` takes `task` plus optional `url`, `guardrails`, `data`, `country`, `max_iterations`, and `max_validation_attempts`. ## Optional inputs The model can pass these for finer control, and they are sent to Tabstack only when present: - `extract_structured_data`, `extract_page_content`, `generate_structured_data`: `effort` (`"min"`, `"standard"`, or `"max"`, where `"max"` suits JS-heavy pages), `nocache` to bypass the cache, and `country` as an ISO 3166-1 alpha-2 code for geotargeted fetches. - `research_question`: `mode` (`"fast"` or `"balanced"`) and `nocache`. ## Good to know - **`automate_browser_task` runs non-interactively.** It does not pause for human-in-the-loop form input, so it does not wait on a person. It returns the final answer plus the data it extracted and the pages it visited. - Failed calls throw `TabstackToolError`, a normalized message plus an HTTP `status` for API errors. Mastra surfaces this in the tool result. - Tool names, descriptions, and inputs match the `@tabstack/langchain` and Python `langchain-tabstack` packages, so inputs are the same across frameworks and languages. ## Common use cases - Give a Mastra agent cited, multi-source answers from the live web. - Pull structured fields off a page into a Zod-defined shape. - Geotarget a fetch by country to see region-specific pricing or availability. - Keep tool names consistent across your TypeScript and Python agents. ## Next steps - [Adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-integrations-typescript) - [@tabstack/mastra on npm](https://www.npmjs.com/package/@tabstack/mastra) - [Mastra docs](https://mastra.ai) - [Get an API key](https://console.tabstack.ai/signup) ## LlamaIndex Source: https://tabstack.ai/integrations/llamaindex ## Why LlamaIndex + Tabstack Adding web access to an agent usually means writing your own fetch and parse code. [`@tabstack/llamaindex`](https://www.npmjs.com/package/@tabstack/llamaindex) replaces that with a hosted API exposed as native LlamaIndex tools: schema-enforced output, server-side rendering of JS-heavy pages, and one key for extraction, research, generation, and automation. ## Quickstart Install the adapter and set your key: ```bash npm install @tabstack/llamaindex llamaindex zod export TABSTACK_API_KEY="your-key-here" ``` `llamaindex` (v0.12 or later) and `zod` are peer dependencies. The tools come pre-built as an array, so pass them straight to an agent: ```ts import { tabstackTools } from "@tabstack/llamaindex"; import { agent } from "@llamaindex/workflow"; import { openai } from "@llamaindex/openai"; import { Settings } from "llamaindex"; Settings.llm = openai({ model: "gpt-4o" }); const researcher = agent({ tools: tabstackTools }); const result = await researcher.run( "What are Vercel's current pricing plans? Cite your sources.", ); console.log(result.data); ``` The tools resolve `TABSTACK_API_KEY` lazily on first call, so importing the package never requires a key. For a custom key, base URL, or a shared client, build the tools explicitly: ```ts import { createTabstackLlamaindexTools } from "@tabstack/llamaindex"; const tools = createTabstackLlamaindexTools({ apiKey: process.env.MY_KEY }); // or pass an SDK client you already have: createTabstackLlamaindexTools({ client }) ``` ## The tools | Export | Tool name | What it does | | --- | --- | --- | | `extractStructuredDataTool` | `extract_structured_data` | Pull specific fields from a URL into a JSON shape you define. | | `extractPageContentTool` | `extract_page_content` | Fetch a page as clean Markdown. | | `researchQuestionTool` | `research_question` | Synthesized answer with cited sources across multiple pages. | | `generateStructuredDataTool` | `generate_structured_data` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automateBrowserTaskTool` | `automate_browser_task` | Run a multi-step, natural-language browser task. | Import individual tools for a subset, or use the `tabstackTools` array for all of them. The names stay in lockstep with the `@tabstack/langchain`, `@tabstack/ai`, `@tabstack/eve`, and Python `langchain-tabstack` packages. ## Good to know - **`automate_browser_task` runs non-interactively.** It does not pause for human-in-the-loop form input, so it does not wait on a person. It returns the final answer plus the data it extracted and the pages it visited. - Failed calls throw `TabstackToolError`, a normalized message plus an HTTP `status` for API errors. LlamaIndex surfaces this in the tool result. - Inputs are validated against the core Zod schema, since LlamaIndex passes the schema straight through as the tool's `parameters`, so malformed model output is caught before the call runs. - **Zod 3 and Zod 4 both work.** LlamaIndex's `tool()` is Zod-native and accepts either, and your app's own Zod version is used. ## Common use cases - Replace a brittle web loader with a hosted API that returns the shape you asked for. - Give a LlamaIndex agent cited, multi-source research over live pages. - Read a specific URL as clean Markdown for indexing or summarization. - Keep tool names consistent across your TypeScript and Python agents. ## Next steps - [Adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-integrations-typescript) - [@tabstack/llamaindex on npm](https://www.npmjs.com/package/@tabstack/llamaindex) - [LlamaIndex.TS docs](https://developers.llamaindex.ai/typescript) - [Get an API key](https://console.tabstack.ai/signup) ## eve Source: https://tabstack.ai/integrations/eve ## Why eve + Tabstack eve derives each tool's name from its filename: add a file under `agent/tools/` and the model can call it. [`@tabstack/eve`](https://www.npmjs.com/package/@tabstack/eve) ships pre-built `defineTool` definitions you re-export into that directory: schema-enforced output, server-side rendering of JS-heavy pages, and one key for extraction, research, generation, and automation. Tool names stay in lockstep with the `@tabstack/langchain`, `@tabstack/ai`, and Python `langchain-tabstack` packages. ## Quickstart Install the adapter and set your key: ```bash npm install @tabstack/eve eve zod export TABSTACK_API_KEY="your-key-here" ``` Re-export a Tabstack tool as the **default export** of a file named after the tool: ```ts // agent/tools/research_question.ts export { researchQuestionTool as default } from "@tabstack/eve"; ``` ```ts // agent/tools/extract_page_content.ts export { extractPageContentTool as default } from "@tabstack/eve"; ``` The filename becomes the tool name, and the tools resolve `TABSTACK_API_KEY` lazily on first call. For a custom key, base URL, or a shared client, build them explicitly: ```ts // agent/tools/research_question.ts import { createTabstackEveTools } from "@tabstack/eve"; const tools = createTabstackEveTools({ apiKey: process.env.MY_KEY }); export default tools.research_question; ``` ## The tools | File name | What it does | | --- | --- | | `extract_structured_data.ts` | Pull specific fields from a URL into a JSON shape you define. | | `extract_page_content.ts` | Fetch a page as clean Markdown. | | `research_question.ts` | Synthesized answer with cited sources across multiple pages. | | `generate_structured_data.ts` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automate_browser_task.ts` | Run a multi-step, natural-language browser task. | The filename must match the tool name, because eve's identity is path-derived. ## Common use cases - Add web research to an eve agent by dropping one file into `agent/tools/`. - Expose only the capabilities a given agent needs, one file each. - Share a single configured Tabstack client across every tool. - Keep tool names consistent across your TypeScript and Python agents. ## Next steps - [Adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-integrations-typescript) - [@tabstack/eve on npm](https://www.npmjs.com/package/@tabstack/eve) - [Get an API key](https://console.tabstack.ai/signup) ## Hermes Agent Source: https://tabstack.ai/integrations/hermes-agent ## Why Hermes + Tabstack Hermes ships with web search and extraction backends already. [`tabstack-hermes`](https://pypi.org/project/tabstack-hermes/) adds the parts they do not cover: schema-enforced extraction where you define the JSON shape and get that shape back, JS-heavy pages rendered server-side with no browser to install or patch on the box Hermes lives on, research that returns a synthesized answer plus its sources, and multi-step browser automation driven in natural language. Five tools land in a single `tabstack` toolset, and the plugin also registers a `tabstack` web provider so Hermes' built-in `web_extract` can fetch through Tabstack without the model learning a new tool. ## Quickstart Requires Python 3.11 or newer, the same floor as `hermes-agent`. ```bash pip install tabstack-hermes hermes plugins enable tabstack hermes env set TABSTACK_API_KEY ``` Plugins are opt-in: pip puts the plugin on Hermes' discovery path, and `hermes plugins enable tabstack` lets it load. To install from git instead of PyPI: ```bash hermes plugins install Mozilla-Ocho/tabstack-hermes/tabstack_hermes --enable ``` The `/tabstack_hermes` suffix is the subdirectory holding the plugin, where `plugin.yaml` sits next to the code. Either path lands at `~/.hermes/plugins/tabstack/`. Confirm it loaded: ```bash hermes plugins list # tabstack, enabled, 5 tools hermes tools # the tabstack toolset ``` ## The tools | Tool name | What it does | | --- | --- | | `extract_structured_data` | Pull specific fields from a URL into a JSON shape you define. | | `extract_page_content` | Fetch a page as clean Markdown. | | `research_question` | Synthesized answer with cited sources across multiple pages. | | `generate_structured_data` | Fetch a page, then AI-transform it into derived or reshaped JSON. | | `automate_browser_task` | Run a multi-step, natural-language browser task. | All five land in the `tabstack` toolset, so they enable and disable as a unit in `hermes tools`. Names, descriptions, and inputs match the `langchain-tabstack` package and the TypeScript adapters, so the same tool takes the same inputs in every framework. Tools return a JSON string; `extract_page_content` returns markdown directly. Optional inputs are passed only when the model provides them, so omitting them keeps Tabstack's defaults: `effort` (`"min"` | `"standard"` | `"max"`, use `"max"` for JS-heavy pages), `nocache`, and `country` on the extract and generate tools; `mode` (`"fast"` | `"balanced"`) and `nocache` on `research_question`; `data`, `country`, `max_iterations`, and `max_validation_attempts` on `automate_browser_task`. ## Tabstack as the web extract backend Point Hermes' own `web_extract` tool at Tabstack and the model keeps calling the tool it already knows: ```yaml # ~/.hermes/config.yaml web: extract_backend: "tabstack" ``` Extract only. Tabstack has no ranked search endpoint, so `supports_search` is `False` and `web_search` keeps using whichever backend you already have. For synthesis across sources, reach for the `research_question` tool instead. Behavior worth knowing: - URLs come back in the order they went in, because `web_extract` re-interleaves them with the ones it rejected as unsafe. - A batch fans out 5 URLs at a time with a 60s ceiling per URL. One failing URL returns an `error` entry for that URL and does not fail the batch. - `format="html"` is ignored: Tabstack returns markdown. ## Configuration | Variable | Purpose | | --- | --- | | `TABSTACK_API_KEY` | Required. Get one at [console.tabstack.ai](https://console.tabstack.ai/signup). | | `TABSTACK_BASE_URL` | Optional. Point the SDK at a different API base URL. | Keys are read through Hermes' config layer first (`~/.hermes/.env` via `hermes env set`), then the process environment, so credentials work in gateway sessions, delegated children, and subprocess agent runs where the variable was never exported. Without a key the plugin still loads and the tools still appear in `hermes tools`, but a `check_fn` keeps them out of dispatch until a key is set. The SDK is imported and the client built on the first tool call, so a session that never calls Tabstack pays no cold-start cost. Handlers never raise. A failure returns JSON the model can act on, with the HTTP status when the API supplied one: ```json {"error": "Extract failed for https://example.com", "status": 429} ``` ## Common use cases - Give a Hermes agent cited research in one call instead of a search-then-read loop. - Extract a fixed JSON shape from a page and hand it straight to the next step. - Route Hermes' existing `web_extract` through Tabstack without touching prompts. - Drive a multi-step web task (navigate, fill, extract) with no browser on the host. ## Next steps - [Adapter on GitHub](https://github.com/Mozilla-Ocho/tabstack-hermes) - [tabstack-hermes on PyPI](https://pypi.org/project/tabstack-hermes/) - [Hermes plugin docs](https://hermes-agent.nousresearch.com/docs/user-guide/features/plugins) - [Get an API key](https://console.tabstack.ai/signup)