Catalog PyPI
PACKAGE EXPLORERView in registry

agentic-rag-pdf

PyPI

Agentic RAG over any PDF — grounded, cited answers from research reports, ESG/sustainability disclosures, contracts, manuals, and filings. Multi-agent LangGraph workflow with hybrid retrieval, RAPTOR summaries, NL→SQL over extracted tables, CRAG corrective loops, and a defense-in-depth hallucination stack.

agentic-ragai-agentbm25chatbotcitationcragcross-encoderembeddingesgfaissfaithfulnessfastapihallucination-detectionhybrid-searchlangchainlanggraph
All keywords (30)
llmmulti-agentocrollamapdfpdf-extractionquestion-answeringragraptorrerankretrieval-augmented-generationsustainabilitytable-extractionvector-search
Versions collected1
Direct dependencies26From release 0.1.5
Last observed20 Oct, 22:20 UTC

README

Version 0.1.5 documentation

PdfAgent — Agentic RAG over any PDF

Grounded answers from your PDFs, with source citations.

PyPI Python LangGraph FAISS FastAPI Ollama License

Ask questions about any PDF — research reports, contracts, manuals, ESG / sustainability filings — and get grounded, cited answers. Drop a PDF into the browser UI and start asking.

PdfAgent UI


Quick Start

# 1. Install
pip install agentic-rag-pdf

# 2. Install + start Ollama (https://ollama.com/download), pull the embedding model
ollama pull mxbai-embed-large
ollama signin                       # only if using cloud models (e.g. gpt-oss:120b-cloud)

# 3. Launch the UI
agentic-rag-pdf

Open http://localhost:8000 → click Upload PDF → drop a file → ask questions.

The same command is also installed under the shorter alias pdfagent if you prefer less typing. Both are identical.


What it does

  • Multi-modal ingestion — text, tables (extracted into SQLite), images (OCR + optional vision captions).
  • Hybrid retrieval — BM25 + FAISS dense, merged with Reciprocal Rank Fusion, with optional cross-encoder reranking.
  • RAPTOR hierarchical summaries for global queries; Map-Reduce for exhaustive aggregation.
  • Schema-aware NL → SQL for tabular queries (SELECT-only, sandboxed).
  • Hallucination defense (CRAG + 7 layers) — pre-synthesis entity-metric fact extraction, deterministic attribution check, citation verification, claim-level faithfulness, cross-chunk contradiction detection, arithmetic verification of delta tables.
  • Three interfaces — browser UI (SSE-streamed agent steps), REST API, CLI.

See docs/ARCHITECTURE.md for the workflow diagram, full feature breakdown, configuration reference, REST API, and project structure.


Other ways to install

From the latest GitHub commit (handy between releases):

pip install git+https://github.com/bhagatdas/PdfAgent-Agentic-RAG-over-any-PDF.git

For development (editable, clone the repo):

git clone https://github.com/bhagatdas/PdfAgent-Agentic-RAG-over-any-PDF.git
cd PdfAgent-Agentic-RAG-over-any-PDF
pip install -e .
agentic-rag-pdf --reload

Command-line usage

The wheel installs two pairs of console scripts — long-form names that match the PyPI distribution, plus short aliases that mean the same thing:

agentic-rag-pdf                              # launch the browser UI (uvicorn on :8000)
agentic-rag-pdf --host 0.0.0.0 --port 8080   # custom bind
pdfagent                                     # same thing, shorter alias

agentic-rag-pdf-cli ingest                   # CLI ingest (drop files in data/pdfs/ first)
agentic-rag-pdf-cli query "..."              # one-shot question
agentic-rag-pdf-cli chat                     # interactive REPL
agentic-rag-pdf-cli schema                   # print the table schema catalog
pdfagent-cli ...                             # short alias for the same CLI

Override defaults via a .env file in your working directory. The full settings reference lives in config/settings.py.


REST API at a glance

MethodPathPurpose
POST/queryRun the pipeline; JSON response
POST/query/streamSame, streamed via SSE (one event per agent)
POST/upload-ingest/streamWipe + ingest a single PDF
GET/healthVector store doc count + table count
GET/ollama/healthProbe Ollama readiness + per-OS install help

Full endpoint table and request/response shape: docs/ARCHITECTURE.md#rest-api.


Tech stack

LangGraph + LangChain · Ollama (gpt-oss:120b-cloud, mxbai-embed-large) · FAISS + rank-bm25 · cross-encoder reranker · SQLite for tables · FastAPI (SSE) · PyMuPDF · EasyOCR.


Publishing

Releases go to PyPI as agentic-rag-pdf on every v* tag push. See PUBLISHING.md for the one-time trusted-publisher setup and the tag → release flow.


License

Proprietary — see repository owner.


Built by Bhagat Kumar Das.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.524 May 202626

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
bhagatdas/pdfagent-agentic-rag-over-any-pdf

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:20 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:6c810e3048b52c69292513f269b4ca99c090de92e044d09d6327efda3e28631a