MITRA - An Agentic AI Operating System for Chartered Accountancy Practice
AI Tool Basics for CA

MITRA - An Agentic AI Operating System for Chartered Accountancy Practice

Author: CA. PrabhavaP.Hegde

Watch on Youtube

1. Executive Summary

MITRA is a desktop-native, privacy-first Agentic AI assistant purpose-built for the day-to-day workflow of a Chartered Accountant. Rather than being a generic chatbot, it acts as an orchestrator that understands a practitioner's intent in plain language and then drives the right tool — parsing bank statements, classifying ledgers, pulling live data from Tally and Zoho Books, answering questions from a cited firm knowledge base, and drafting client communication — all while keeping sensitive client data on the practitioner's own machine.

The guiding philosophy is simple: a CA's professional judgement cannot be replaced by AI; it can only be amplified. MITRA takes over the repetitive, high-volume, low-judgement work so that the professional is freed to do the thinking only a professional can.

2. Problem Statement

A modern CA practice runs on a handful of painful, recurring frictions that consume billable hours and invite error:

  1. Manual data entry & ledger classification — bank statements arrive as PDFs in dozens of formats; each transaction must be read, understood, and mapped to the correct ledger by hand.
  2. Fragmented systems — data lives across Tally, Zoho Books, Excel, e-mail and physical files, forcing constant context-switching and re-keying.
  3. Knowledge retrieval overhead — statutory positions, firm precedents and client history are scattered; finding the right answer with a reliable citation is slow.
  4. Repetitive communication — routine client e-mails and follow-ups are drafted from scratch, again and again.
  5. Data privacy & compliance risk — pasting client financial data into public cloud AI tools is a DPDP and confidentiality hazard most practitioners cannot accept.

The net effect: skilled professionals spend a disproportionate share of their day on mechanical work, and the safest AI tools (public LLMs) are precisely the ones that cannot be trusted with client data.

3. Solution Statement

MITRA solves this as an Agentic AI Operating System that sits locally on the CA's desktop. It combines a conversational and voice interface with a disciplined tool-execution engine, so that natural-language requests are translated into deterministic, auditable actions against the practitioner's real data.

What makes MITRA different

  1. Orchestrator, not oracle — the LLM never invents numbers. It selects and parameterises tools; the actual computation and data retrieval are done by deterministic engines (Python, Excel, Tally/Zoho APIs).
  2. Knowledge-gated answers — the firm knowledge base (RAG) is always consulted first and every answer carries a citation. Only with explicit user consent does it fall back to the internet or the model's own training.
  3. Local-first & private — PII is redacted before it ever leaves the machine, memory and audit logs are encrypted at rest, and file access is default-deny.
  4. Auditable by design — every interaction is written to an encrypted audit log with a dedicated DPDP compliance view.

4. Key Use Cases

The following are the primary use cases MITRA delivers today:

Use CaseWhat it does

Batch Bank-Statement AccountingIngests bank-statement PDFs (Kotak, Axis, RBL & generic formats), extracts transactions, and uses an ML ledger classifier to auto-suggest the correct ledger for each entry, ready to post to Tally or Zoho.
Live Books RetrievalAnswers questions like “show me the trial balance” or “what is this ledger's balance” by querying Tally Prime (XML) or Zoho Books (REST API) directly — never guessing.
Cited Knowledge Q&AAnswers statutory and firm-specific questions from a local knowledge base with source citations, honouring the knowledge gate before any external fallback.
Client Communication DraftingDrafts routine client e-mails and follow-ups from real, verified data — echoing sent/returned content deterministically, never fabricating confirmations.
Hands-Free Voice AssistantWake-word activation (“Hey MITRA”) with local speech-to-text and text-to-speech for hands-free operation during review work.
Audit & DPDP DashboardA dedicated screen exposing the encrypted audit trail and data-protection posture for compliance and self-review.


5. How It Works — Architecture

MITRA is a two-process desktop application: an Electron/React front-end and a local Python (FastAPI) sidecar that hosts the agent brain. They communicate over loopback only — nothing is exposed to the network.

Data flow

Renderer (React UI) ⇄ Electron Main (IPC) ⇄FastAPI Sidecar ⇄ LangGraph Agent

Inside the agent, every request passes through a disciplined graph:

  1. Redact — Presidio strips PII from the input.
  2. Inject memory — relevant context is retrieved from the local LanceDB vector store.
  3. Route intent — the request is classified into a deterministic action or tool call.
  4. Call LLM / tool — a 3-tier model router (Groq → Gemini → Together AI) runs with a circuit-breaker fallback; tools do the real work.
  5. Save interaction — the exchange is written to the encrypted SQLite audit log.

Computation hierarchy

When work must be done, MITRA prefers the most reliable engine and treats the LLM as a last resort:

Python compute tool → Excel engine→ Tally / Zoho API → Web search →LLM (last resort)


6. Technology Stack

LayerTechnologyRole

Front-endElectron 42, React 19, TypeScript, ViteDesktop shell & UI
Design SystemVanilla CSS — “Zenith Terminal” (Void Black / Neon Cyan, 0px radius), Three.js plasma orbVisual identity
Backend SidecarPython 3.12, FastAPI (loopback 127.0.0.1:7420)Agent host & API
Agent EngineLangGraph (StateGraph)Orchestration graph
Model RouterGroq · Gemini · Together AI (3-tier, circuit-breaker)LLM reasoning
PrivacyMicrosoft Presidio AnalyzerPII redaction
MemoryLanceDB (local vector store)Semantic recall
Storage / AuditSQLite (WAL mode, Fernet encryption)Audit log & state
Voicefaster-whisper (STT), edge-tts (TTS), OpenWakeWordHands-free interface
IntegrationsTally Prime (XML), Zoho Books (REST API v3)Live accounting data


7. Core Design Principles

  1. LLM = orchestrator only. The model understands intent, selects tools and generates parameters — it never computes or retrieves data itself when a tool exists.
  2. Knowledge gate. The cited knowledge base is always consulted first; external fallback requires explicit user consent.
  3. Default-deny file access. Every file read/write is checked against a permissions matrix (real-path verified) before it runs.
  4. Atomic & auditable. Config writes are atomic (temp-file + replace); every interaction is logged.
  5. IST-native display. All dates and times are shown in Indian Standard Time, Indian format, via a single shared formatter.


8. Privacy, Security & DPDP Compliance

MITRA is engineered for a profession bound by confidentiality. Client data never leaves the practitioner's control by default:

  1. Local-first: the agent, memory and data caches all run on the CA's own machine.
  2. PII redaction (Presidio) runs before any content is sent to an external model.
  3. Encryption at rest: SQLite audit and state stores use Fernet encryption in WAL mode.
  4. Client isolation: each client's cached books are stored in a separate secure cache.
  5. Dedicated Audit & DPDP screen for transparency and self-review.



9. Instructions

9.1 Prerequisites

  1. Windows 10/11 desktop.
  2. Python 3.12 with the project virtual environment provisioned under python\.venv.
  3. Node.js with project dependencies installed (npm install).
  4. Free API keys: Groq (console.groq.com), Gemini (aistudio.google.com); Together AI optional (paid).

9.2 First-run configuration

On first launch the sidecar auto-creates its config at %APPDATA%\MITRA\config\settings.json. Add your provider keys under:

  1. providers.groq.api_key — required first (free)
  2. providers.gemini.api_key — free tier
  3. providers.together.api_key — optional, paid

9.3 Running MITRA

Terminal 1 — Python sidecar:

cd python

.venv\Scripts\python.exe main.py --host 127.0.0.1 --port 7420

Terminal 2 — Electron app:

npm run dev

9.4 Using MITRA

  1. Complete the onboarding wizard (profile, permissions, connected books).
  2. Type or speak a request in plain language — e.g. “classify this bank statement” or “show me ABC Ltd's trial balance”.
  3. Review MITRA's tool-driven output; tabular results come with an Excel/PDF download and a cited Workings sheet.
  4. Approve any side-effecting action (posting entries, sending mail) before it executes.
  5. Consult the Audit & DPDP screen at any time to review the full interaction trail.