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/langchainfor LangChain.js - Python:
langchain-tabstackfor LangChain (Python)
Quickstart
Install the adapter and set your key:
# 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:
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:
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.