LangChain integration for CaptureKit: read web pages as clean Markdown and get an AI profile of a website.
pip install -U langchain-capturekit
export CAPTUREKIT_API_KEY="your-api-key"Get an API key at app.capturekit.dev.
| Class | Tool name | What it does |
|---|---|---|
CaptureKitPageContent |
capturekit_page_content |
Load a web page in a real browser through CaptureKit and return it as Markdown. |
CaptureKitAnalyzePage |
capturekit_analyze_page |
Get an AI profile of a web page through CaptureKit. |
Each tool takes api_key (defaults to CAPTUREKIT_API_KEY), base_url and timeout, plus the settings shown in its docstring. Errors (invalid key, no credits, rate limit, timeout) come back to the model as a ToolException message, without the API key. Every tool has an async version.
from langchain_capturekit import CaptureKitPageContent
tool = CaptureKitPageContent()
print(tool.invoke({"url": "https://example.com"}))from langchain.agents import create_agent
from langchain_capturekit import CaptureKitPageContent, CaptureKitAnalyzePage
agent = create_agent("openai:gpt-4.1-mini", tools=[CaptureKitPageContent(), CaptureKitAnalyzePage()])
result = agent.invoke({"messages": [{"role": "user", "content": "..."}]})CaptureKitLoader loads pages as Markdown Documents, with source, title and description in the metadata:
from langchain_capturekit import CaptureKitLoader
docs = CaptureKitLoader(["https://example.com", "https://example.org"], continue_on_failure=True).load()pip install -e ".[test]"
pytest tests/unit_testsMIT