Integration · LangChain
Add parsr to any LangChain agent in three lines via `langchain-parsr`.
LangChain is the de-facto framework for building LLM-driven agents in Python (100K+ GitHub stars as of 2026). Most parsr customers building AI bookkeeping or fintech agents land in LangChain first. The `langchain-parsr` PyPI package ships a `ParsrToolkit` that exposes the parsr API as four native StructuredTool instances: parse_bank_statement, extract_with_schema, get_job, get_usage. Drop-in compatible with every LangChain agent runtime — AgentExecutor, LangGraph, create_react_agent. Auth is read from PARSR_API_KEY at toolkit construction; the region is inferred from the key prefix so you don't configure it separately. For multi-tenant servers where each request carries a different parsr key, build a fresh toolkit per request via from_api_key. The package is MIT-licensed; the source is in the parsr monorepo at packages/langchain-parsr.
Install
One command
pip install langchain-parsrCode
Working sample
from langchain_parsr import ParsrToolkit
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
# Set PARSR_API_KEY in env (sk_eu_live_… or sk_us_live_…)
tools = ParsrToolkit.from_env().get_tools()
agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)
result = await agent.ainvoke({
"messages": [(
"user",
"Parse this and tell me the largest expense: "
"https://example.com/april.pdf",
)]
})
print(result["messages"][-1].content)What you get
Highlights
- Four ready-to-go tools (parse, extract, get_job, get_usage)
- Region inferred from API key — no separate config
- Sandbox keys (sk_*_test_…) work transparently for CI/dev
- Drop-in for AgentExecutor, LangGraph, create_react_agent
- MIT-licensed, source in the public parsr monorepo
Three lines and you're calling parsr from LangChain.
Start building