Agentic RAG Financial Parser AI Agent

by Ambuj123-lab• 110•• Scanned•Claim this listing•Request removal
Data Science & MLagentic ragfastapigenailanggraphllmops

Enterprise RAG ecosystem managing 32000+ semantic chunks. Features hybrid parsing (LlamaParse/PyMuPDF) and 256-dim MRL embeddings for 512MB RAM environments

Agentic RAG Financial Parser is an open-source ai agent by Ambuj123-lab, written mainly in Python, with 110 GitHub stars and the AGPL-3.0 license. Its code was last updated Sep 30, 2026.

<div align="center"> <!-- Animated Header --> <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&customColorList=12,14,16,18,20&height=200&section=header&text=Agentic%20Financial%20Parser&fontSize=42&fontColor=ffffff&fontAlignY=35&desc=11-Node%20LangGraph%20StateGraph%20•%20WhatsApp%20Bot%20•%20Daily%20AI%20Newsletter&descSize=16&descAlignY=55&animation=fadeIn" width="100%"/> <br/>

<a href="https://git.io/typing-svg"><img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=600&size=22&pause=1000&color=D4A574&background=00000000&center=true&vCenter=true&repeat=true&width=700&height=70&lines=11-Node+LangGraph+StateGraph+%7C+Agentic+RAG;WhatsApp+Bot+%7C+Gemini+Tool+Calling+%7C+HITL+Guards;Jina+MRL+%2B+Cohere+Rerank+%7C+%E2%82%B90%2Fmonth+Infra" alt="Typing SVG" /></a>

<br/>

Live Demo Featured on UptimeRobot Verified on One's Vibe RAG Docs Portfolio

<p align="center"> <a href="https://onesvibe.app/projects/agentic-rag-financial-parser-onrender?ref=badge"> <img src="https://onesvibe.app/badge/agentic-rag-financial-parser-onrender.svg" alt="Live & checked on One's Vibe" height="32" /> </a> </p>

GitHub Stars GitHub Forks

Python FastAPI React LangGraph Docker Render

</div>

[!TIP]

🏆 Industry Recognition & Third-Party Audits

  • Featured in UptimeRobot's Global Case Study: "How Ambuj Kumar Tripathi built an 11-Node Agentic RAG system with 99.9% uptime on $0 infrastructure" — Officially featured for resilient production architecture on 512MB RAM and cold-start elimination. 👉 Read Full Spotlight on UptimeRobot Blog →
  • Verified & Showcased on One's Vibe: Discovered and verified on the global maker platform under Finance & Business with automated daily live checks, SSRF-guarded verification, and public try-count logging. 👉 View Live Project Wall on One's Vibe →

⚡ What Is This?

An autonomous, 11-node Agentic RAG pipeline that parses and queries complex Indian financial & legal documents — Union Budget, Finance Bill, Tax Laws, PF/Pension Schemes, RBI KYC, and Constitution of India — using a purpose-built state machine that thinks before it answers.

Unlike traditional RAG (retrieve → generate), this system employs an agentic flow where each query passes through specialized nodes that classify intent, cross-question vague queries, guard against hallucinations, and verify answer grounding — all orchestrated via LangGraph StateGraph.


🌿 Branches

BranchDescription
mainProduction — stable, lean version live on Render (512MB RAM constraints)
v2-local-heavyParallel Vector Retrieval + Cohere Neural Reranking. 👉 View Architecture

🏗️ System Architecture

<div align="center"> <br/>

🔮 11-Node LangGraph StateGraph — Animated Architecture

<img src="assets/rag_architecture_diagram_dark.png" width="100%" alt="Agentic Financial Parser — 11-Node Architecture"/> <br/> <sub>✨ Classifier → 6-Path Routing → Retrieval → Rerank → Generate → Hallucination Guard → Post-Process</sub> </div>

🧠 The 11-Node Agentic RAG Pipeline

NodePurposeKey Detail
1. ClassifierIntent detection + 6-path routingReturns structured JSON: intent · doc_type · confidence · search_intents
2. RejectSafety guardBlocks abusive + jailbreak queries with regex blocklist guardrail
3. GreetEfficiency bypassHandles greetings without hitting vector DB (zero cost)
4. CrossQuestionerHITL clarificationAsks clarifying questions for vague queries (max 2 rounds)
5. RetrieverDual vector searchJina MRL → Pinecone → Parent-Child Resolution → Cohere Rerank Top 10
6. Web SearchOut-of-scope fallbackTavily API — only fires after HITL user permission
7. Stock ToolNative LLM tool callingGemini functionDeclarations + yfinance for live market data
8. GeneratorLLM synthesisGemini 3.5 Flash Lite (primary) with pybreaker circuit breakers
9. HallucinationGuardAnswer verificationLLM-as-Judge — advisory mode (appends disclaimer, doesn't block)
10. PostProcessPersistence + streamingMongoDB + Redis cache + Langfuse tracing + SSE stream
11. FallbackCircuit breaker recoverypybreaker pattern: 3 API failures → graceful fallback message

🔧 Tech Stack

<table> <tr> <td><b>Category</b></td> <td><b>Technology</b></td> <td><b>Purpose</b></td> </tr> <tr> <td rowspan="5"><b>RAG Engine</b></td> <td>LangGraph StateGraph</td> <td>11-node autonomous state machine orchestration</td> </tr> <tr> <td>Jina v3 (MRL)</td> <td>Matryoshka Representation Learning embeddings</td> </tr> <tr> <td>Cohere Neural Reranker</td> <td>Advanced Stage-2 semantic filtering (V2)</td> </tr> <tr> <td>LlamaParse</td> <td>LLM-native 3-tier document parsing</td> </tr> <tr> <td>Tavily Search API</td> <td>Live Web Search fallback for Out-of-Scope queries</td> </tr> <tr> <td rowspan="3"><b>Backend & APIs</b></td> <td>FastAPI + Uvicorn</td> <td>Async REST API with SSE streaming</td> </tr> <tr> <td>Authlib + PyJWT</td> <td>Google OAuth 2.0 + JWT session management</td> </tr> <tr> <td>WhatsApp Meta Cloud API</td> <td>Real-time user bot interaction via Webhooks</td> </tr> <tr> <td><b>Frontend</b></td> <td>React 19 + Vite</td> <td>SPA with lazy loading, dark theme, real-time streaming UI</td> </tr> <tr> <td rowspan="4"><b>Data Layer</b></td> <td>Pinecone Serverless</td> <td>14,662 vectors — core brain + ephemeral user uploads</td> </tr> <tr> <td>Supabase (PostgreSQL)</td> <td>Parent chunk storage + file registry</td> </tr> <tr> <td>MongoDB (Motor)</td> <td>Async chat history, feedback, user sessions</td> </tr> <tr> <td>Upstash Redis</td> <td>Semantic caching (<100ms) + rate limiting + analytics</td> </tr> <tr> <td rowspan="3"><b>Reliability</b></td> <td>Pybreaker</td> <td>Circuit breaker pattern — 3 failures → auto-open → 30s reset</td> </tr> <tr> <td>Langfuse</td> <td>Distributed tracing — LLM latency, token usage, cost tracking</td> </tr> <tr> <td>UptimeRobot</td> <td>GET/HEAD health monitoring — zero cold starts</td> </tr> <tr> <td><b>Deployment</b></td> <td>Docker (Multi-stage) + Render</td> <td>Frontend build → backend image → production serve</td> </tr> </table>

📊 Infrastructure Scale

MetricValue
Total Chunks15,408 (Financial Parser Portfolio)
Live Vectors14,662 high-dimensional vectors in Pinecone (256d MRL)
Documents Indexed20+ Indian Government Acts & Financial Frameworks
Parent ChunksStored in Supabase for full-context retrieval
Cache Latency<100ms (Upstash Redis semantic cache)
Rate Limit10 queries/min per user (Redis sliding window)
Session TTL24h auto-cleanup (MongoDB TTL indexes)

📄 Documents Indexed

CategoryDocuments
FinancialUnion Budget 2024-25, Finance Bill 2024-25, Income Tax Amendments
Pension/PFEPF Scheme 1952, EPS Pension Scheme 1995, PMVVY, APY
BankingRBI KYC Master Direction 2016, UPI Guidelines
LegalConstitution of India, Consumer Protection Act

🔐 Security Architecture

7-Layer Upload Security Framework
─────────────────────────────────
Layer 1 │ Frontend Gating     │ .pdf only, 10MB limit, accept='.pdf'
Layer 2 │ Magic Byte Verify   │ %PDF- header validation (anti-spoofing)
Layer 3 │ Rate Limiting       │ 5 uploads/day per user+IP (Redis)
Layer 4 │ SHA-256 Dedup       │ Content-hash prevents re-indexing identical files
Layer 5 │ Session Isolation   │ is_temporary: true — auto-deletes on logout
Layer 6 │ TTL Auto-Cleanup    │ MongoDB 24h TTL on chunks + temp_uploads
Layer 7 │ Auth Guard          │ JWT verification on every API endpoint

🚀 Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • API Keys: OpenRouter, Pinecone, MongoDB, Supabase, Google OAuth

Local Development

# Clone
git clone https://github.com/Ambuj123-lab/agentic-rag-financial-parser.git
cd agentic-rag-financial-parser

# Backend
python -m venv venv && venv\Scripts\activate  # Windows
pip install -r requirements.txt
cp .env.example .env  # Fill in your API keys
uvicorn app.main:app --reload

# Frontend (new terminal)
cd frontend
npm install && npm run dev

Docker (Production)

docker build -t financial-parser .
docker run -p 8000:8000 --env-file .env financial-parser

📁 Project Structure

agentic-rag-financial-parser/
├── app/
│   ├── main.py              # FastAPI app + SPA serving + health check
│   ├── api/
│   │   ├── auth.py           # Google OAuth + JWT + dev-login
│   │   ├── oauth.py          # Authlib Google client config
│   │   └── upload.py         # 7-layer secure file upload
│   ├── core/
│   │   └── config.py         # Pydantic Settings (env vars)
│   ├── db/
│   │   ├── mongodb.py        # Async Motor client + indexes
│   │   ├── pinecone_client.py # Pinecone Serverless init
│   │   └── supabase_client.py # Supabase PostgreSQL client
│   └── rag/
│       ├── graph.py          # ⭐ 11-Node LangGraph StateGraph
│       ├── routes.py         # Chat endpoints + SSE streaming
│       ├── embedder.py       # Jina v3 MRL embeddings
│       └── chunker.py        # Markdown + recursive splitting
├── frontend/
│   ├── src/
│   │   ├── pages/            # Landing, Dashboard, Admin, AuthCallback
│   │   ├── context/          # AuthContext (JWT state)
│   │   └── api/              # Axios client with interceptors
│   └── vite.config.js        # Dev proxy + code splitting
├── Dockerfile                # Multi-stage: Node build → Python serve
├── requirements.txt          # Pinned Python dependencies
└── .dockerignore             # Minimal Docker context

🌐 Live Links

ResourceURL
🚀 Live Applicationagentic-rag-financial-parser.onrender.com
📖 RAG Documentationambuj-rag-docs.netlify.app
👤 Portfolioambuj-ai-portfolio.vercel.app
💻 Source CodeGitHub Repository

👨‍💻 Author

Ambuj Kumar Tripathi GenAI Engineer & RAG Systems Specialist | LLMOps

LinkedIn GitHub Portfolio


📜 License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
Due to the integration of PyMuPDF (which is licensed under AGPL-3.0) for high-performance PDF parsing, this repository inherits the AGPL-3.0 license to comply with open-source copyleft requirements.


<div align="center"> <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&customColorList=12,14,16,18,20&height=100&section=footer" width="100%"/>

<sub>Built with 🧠 LangGraph • ⚡ FastAPI • ⚛️ React • 🔍 Pinecone • 🐘 Supabase • 🍃 MongoDB • 🔴 Redis</sub>

</div> <parameter name="Complexity">7

Agentic RAG Financial Parser alternatives

View more →

Similar ai agents in Data Science & ML, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.

NameStarsLicenceLast updatedScan
Agentic RAG Financial Parser (this page)
Ambuj123-lab
110AGPL-3.0Sep 30, 2026Scanned, no flagged issues
Ragflow
infiniflow
93kApache-2.0Oct 31, 2026Scanned, no flagged issues
Cherry Studio
CherryHQ
53kAGPL-3.0Nov 1, 2026Scanned, no flagged issues
PageIndex
VectifyAI
40kMITOct 29, 2026Scanned, no flagged issues
Graphiti
getzep
32kApache-2.0Nov 1, 2026Scanned, no flagged issues
Cua
trycua
31kMITNov 1, 2026Scanned, no flagged issues