← Portfolio Munshi — Architecture
Purchase Invoices messy vendor data OCR'd · manual entry PDFs · Excel exports GSTR-2B Govt portal data supplier-filed GST MCP tool fetches STEP 1 Fuzzy Match normalize vendor names GSTIN prefix · date window amount tolerance ±2% ambiguous STEP 2 Hermes Agent model judges ambiguous tool calls → MCP plain-English reasoning verdict STEP 3 Tax Compute deterministic Python Decimal — exact rupees ITC calc · discrepancy STEP 4 Audit Trail every tool call logged model reasoning saved plain English report HITL Human Approval explicit confirm before filing
LOCAL MACHINE — SOVEREIGN BOUNDARY Business Owner plain-English queries Hermes Runtime SOUL.md identity config.yaml capabilities tool-call loop · memory MCP Tools GSTR-2B fetcher Invoice reader Decimal calculator Audit writer Ollama local model inference Qwen · Llama · etc. model is a tool not a service FastAPI REST API audit log persistence Docker Local DB SQLite · CSV · JSON all data on disk Invoice Files PDF · Excel · CSV local filesystem Audit Trail JSONL · plain text every decision logged INTERNET No data leaves here financial data stays local
Key Design Decisions
Core Architecture
Sovereign local-first — nothing leaves the machine
All financial data, invoice PDFs, and reconciliation results stay on the local machine. Ollama runs the model inference locally. The model is a tool that judges ambiguous matches — it never receives raw financials over the network. Privacy is structural, not a policy.
Ollamalocal-firstsovereign
Reconciliation Design
Fuzzy match + model judge — recover ITC exact-matching forfeits
Exact string matching between purchase invoices and GSTR-2B misses legitimate credits due to typos, name variations, and date mismatches. Munshi normalises vendor names, applies GSTIN prefix matching and a ±2% amount tolerance, then routes only ambiguous cases to the model for a plain-English judgment call.
fuzzy matchGSTINITC recovery
Financial Safety
Decimal arithmetic — every rupee is exact
All tax arithmetic uses Python's Decimal type, never floats. GST computations involve sums across thousands of invoices — IEEE 754 floating-point accumulates errors that compound into incorrect tax filings. Decimal eliminates this class of bug entirely.
Python Decimalno floatexact
Human-in-the-loop
Consequential actions require explicit approval
Munshi never files, submits, or commits tax data autonomously. Every consequential action — a reconciliation verdict, an ITC claim, a filing — is staged and requires the business owner to explicitly approve. The audit trail makes every model decision, tool call, and computation legible to a non-technical reviewer.
HITLaudit trailexplicit approval
Agent Runtime
Hermes runtime — agent identity in SOUL.md
The Hermes agent runtime (Nous Research, MIT licensed) handles the tool-call loop, memory, and agent lifecycle. Agent identity, persona, and capabilities are declared in a SOUL.md file and config.yaml — no agent plumbing written from scratch.
HermesSOUL.mdMCP tools
Business Impact
₹5Cr business — spreadsheets replaced end-to-end
Bharatvarsh Arts ran GST, invoicing, and reconciliation on manual Excel workflows. Munshi replaced the entire stack with plain-English queries. The business owner interacts in natural language; Munshi handles fetching, matching, computing, and generating the audit report for review before any filing.
₹5Cr scaleExcel replacementnatural language