Zenmem
Login
🏷️

Transaction tagging & ledger disambiguation

TaxBookkeepingPython · Zenmem SDKzenmem-open/transaction-tagging-agent

View source

About this agent

A transaction-tagging and ledger engine for individual taxpayers, MSMEs and CAs, built on the Zenmem SDK, aimed at the manual, end-of-year bottleneck of tagging hundreds of bank, UPI and credit-card transactions by hand. It works two ways: proactively, sending a single-click clarification prompt over WhatsApp, Telegram or an app push notification the moment a high-value or ambiguous transaction hits the stream; and reactively, batch-parsing historical statements and invoices against vendor rules already learned for that client. Line items are mapped into accounting buckets — Section 37 deductible business expenses, capital assets on WDV depreciation slabs, director/partner loan accounts, and non-deductible personal drawings — with a splitter for dual-use vendors like Amazon or Swiggy that need part personal, part business tagging. The hard part the spec identifies is that a vendor's classification, once confirmed by the client, should not need re-confirming: tagging 'Vendor X' as a professional fee is remembered against that client's own PAN, and future transfers to the same vendor auto-classify with high confidence. It also flags transactions carrying their own tax risk, such as cash withdrawals above ₹10,000 against Section 40A(3), and to commit each finalized period's categorized ledger atomically before it is exported.

RUNTIMEPython · Zenmem SDK
MEMORY TYPESession + project + company
SDKzenmem 0.4.4
INTERFACEWhatsApp · Telegram · App push

What changed with Zenmem?

The same agent, built twice against the same contract — once on Zenmem, once on MongoDB + LangChain/LangGraph.

Before → after

Code for transaction ingest−32%

Code for grounded tagging−60%

New infrastructure to stand upnone

New dependencies to install0

Schema, collection and index worknone

A client's standing vendor rulesone scope

Shared depreciation and HSN tablesone scope

Before With Zenmem

What the team gained

  • An answer given once becomes a standing rule in that client's scope and applies to every future transfer to the same vendor, without a rules table to version.
  • Standard depreciation percentages and HSN/SAC codes sit in company scope, defined once for every client rather than per book.
  • One client's vendor mapping can never apply to another's ledger, because the scope key is the boundary rather than a filter someone has to remember.
  • The disambiguation exchange is session-scoped, so an unanswered prompt leaves no half-formed rule behind.
  • Confidence in an auto-classification rises with the client's own history, with no retraining step to schedule.

How memory is scoped

Session covers one real-time disambiguation exchange — a client (or their app) clarifying what a flagged transaction actually was. Project, keyed by the client's PAN, is where that answer becomes a standing rule: once a vendor is tagged as a professional fee or an unsecured-loan repayment, the mapping is stored there and applied automatically to every future transfer to that vendor for that client, and to nobody else's. Company holds the tax rules every client shares — standard Income Tax Act depreciation percentages, HSN/SAC codes, generic vendor patterns — so a laptop's depreciation rate is defined once rather than relearned per client.

How it works

The hybrid proactive/reactive pipeline.

Ingest

CSV/PDF bank and credit-card statements, and real-time UPI transaction webhooks, feed into the pipeline.

Clarify proactively

A high-value or ambiguous transaction triggers a single-click clarification prompt to the client, resolved inside a real-time session.

Categorize reactively

Bulk historical statements are auto-categorized against saved vendor rules, with OCR on uploaded invoices.

Learn the vendor rule

Ending the session promotes the confirmed classification into that client's own PAN-scoped memory, for future transfers to auto-apply.

Commit the ledger

A finalized period's categorized ledger is written atomically before export to Tally or Zoho Books.

What it does

The specified capabilities.

Capabilities

  • Ingests CSV/PDF bank and credit-card statements and real-time UPI transaction webhooks.
  • Sends single-click clarification prompts over WhatsApp, Telegram or app push for high-value or ambiguous transactions.
  • Batch-categorizes historical statements using saved vendor mapping rules, with OCR on uploaded invoices.
  • Maps line items to Section 37 business expenses, WDV-depreciated capital assets, director/partner loan accounts, and personal drawings.
  • Splits dual-use vendors (e.g. Amazon, Swiggy) between personal-use and office-expense tagging.
  • Learns and stores client-specific (PAN-scoped) vendor-to-tax-head rules that auto-apply to future transactions.
  • Commits a finalized period's categorized ledger atomically before export to Tally or Zoho Books.
  • Flags anomalies carrying tax risk, such as cash withdrawals above ₹10,000 against Section 40A(3).