Integration · LlamaIndex
Use parsr from any LlamaIndex agent via `llama-index-tool-parsr`.
LlamaIndex is the leading RAG framework for LLM applications, with strong adoption in document-heavy use cases (40K+ GitHub stars). The `llama-index-tool-parsr` PyPI package exposes parsr as a `ParsrToolSpec` extending `BaseToolSpec` — the canonical pattern for LlamaIndex tool packages (alongside llama-index-tools-google, llama-index-tools-database, etc.). Four tools: parse_bank_statement, extract_with_schema, get_job, get_usage. Each ships with descriptive docstrings so agents can pick them via the LLM's tool-selection logic. Compatible with FunctionAgent, ReActAgent, and custom workflow runtimes. Same auth model as the LangChain package — PARSR_API_KEY at construction, region from key prefix, separate from_api_key constructor for per-request multi-tenant patterns.
Install
One command
pip install llama-index-tool-parsrCode
Working sample
from llama_index_tool_parsr import ParsrToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
tools = ParsrToolSpec.from_env().to_tool_list()
agent = FunctionAgent(
tools=tools,
llm=OpenAI(model="gpt-4o"),
system_prompt="You are a finance assistant. Use parsr tools to parse documents.",
)
result = await agent.run(
"Parse this and tell me the largest expense: "
"https://example.com/april.pdf"
)
print(result)What you get
Highlights
- Native BaseToolSpec — pattern matches every LlamaIndex tool package
- Works with FunctionAgent, ReActAgent, and custom workflows
- Async-first — composes cleanly into LlamaIndex's async event loops
- Sandbox keys (sk_*_test_…) for cost-free dev
- MIT-licensed, source in the parsr monorepo
Three lines and you're calling parsr from LlamaIndex.
Start building