Open source · Enterprise AI pipeline

Multi-agent document processor

A master agent and five sub-agents that clean enterprise documents, mask personal data and shrink them before any LLM sees them.

RoleDesigned and built end to end.
Year2026
StackPython, FastAPI, NVIDIA NIM, Redis, GitHub Actions
LinkView on GitHub ↗
  1. 01Document
  2. 02Guardrails in
  3. 03Cache check
  4. 04Sanitise
  5. 05Mask PII
  6. 06Classify + extract
  7. 07Shrink tokens
  8. 08LLM
  9. 09Guardrails out

The problem

Companies want to run invoices, ERP exports and PDFs through LLMs, but those files are full of emails, phone numbers, Aadhaar, PAN and bank details, and sending whole documents is slow and expensive.

What I built

A master agent routes each document through specialised agents: sanitation, PII masking, classification and field extraction, guardrails, and monitoring. Only the relevant masked lines go to the model, and the report shows original and reduced token counts side by side.

When rules miss a field, the LLM extracts it, and the answer is accepted only if the value appears verbatim in the document and passes a format check. Input is checked for prompt injection, output for leaked PII. A content-hash cache in Redis means a repeated document costs nothing.

Want something like this?

Tell me what you're building. I reply within one working day.

Next project

BarterNow →