Munshi — Sovereign GST & Trade Compliance Agent
Bharatvarsh Arts · Local-first · Hermes runtime · Human-in-the-loop · ₹5Cr revenue scale
- Fuzzy Invoice Reconciliation — AI adjudicates messy purchase invoices against government GSTR-2B records; deterministic Python computes every rupee. Recovers input tax credit (ITC) that exact-matching forfeits.
- Sovereign Architecture — GST side fully local-first, nothing leaves the machine. Model only judges ambiguous matches; all tax arithmetic is exact
Decimal computation. Privacy-safe for sensitive financial data.
- Analytics Data Platform — Snowflake + dbt ELT pipeline unifies 4 disconnected systems (Shopify, GoKwik, NimbusPost, WhatsApp B2B). GPT-mini extracts structured B2B orders from Hinglish/Marathi chat. 247 actionable exceptions surfaced from ~2,100 orders; ₹15.4L revenue reconciled across channels.
- Human-in-the-loop + PII Governance — consequential actions require approval; Snowflake Dynamic Data Masking governs customer PII at mart level;
AGENT_READER role sees masked data in ad-hoc queries. Agent queries are auditable and PII-safe by default.
Agent Loop — ReAct + MCP Tool Calls + HITL Gate
→
→
MCP Tool Call
JSON Schema
validated
→
Observe
result into
context
→
request_approval()
HITL pause before
consequential action
↩ loop back to Reason until answer complete
Fuzzy Invoice Matching — 4-Signal Score
+
Name token ratio
weight 0.35
+
+
≥ 0.70 → Auto Match (~80%)
0.50–0.69 → Model Judgment
< 0.50 → No Match
Python Decimal for all tax arithmetic — exact base-10, matches GSTN portal to the paisa. Approved verdicts stored in SQLite and reused month-to-month.
Analytics ELT Pipeline — Snowflake + dbt + Agent Tools
Shopify CSV
GoKwik CSV
NimbusPost CSV
4 sources,
no shared ID
→
WhatsApp B2B
→ GPT-mini
extraction
Hinglish/Marathi
→ structured
→
Snowflake RAW
VARIANT
schema-on-read
no brittle DDL
→
dbt staging
(views)
clean · normalize
fix grain
→
dbt marts
(tables · tested)
37 tests green
PII masked
→
7 Agent
Analytics Tools
order_status
exceptions
revenue
Key Marts
xref_order_identity
identity bridge
dim_vendor_contract
SCD Type 2
fct_revenue
₹15.4L unified
"AI decides, deterministic code computes" — LLM extracts WhatsApp price intent; all ₹ arithmetic is SQL. AGENT_READER role masks PII in ad-hoc queries.