🌌 Kira-AI: Zero-Knowledge Behavioral Finance Cockpit & Stateful Graph Agent


💡 1. The Core Problem

Conventional personal finance trackers are passive, retrospective, and security-compromising. They require users to upload raw bank statement files containing sensitive names, account numbers, and transaction IDs directly to cloud databases.

Kira-AI introduces a paradigm shift:

  • Zero-Knowledge Privacy: A client-side WebAssembly (WASM) sandbox de-identifies and scrubs raw transaction data (UPI strings, names) directly in the browser before any metadata leaves the client.
  • Stateful Agentic Reasoning: An active financial agent cockpit that predicts runway exhaustion (discretionary broke-date) and flags anomaly spikes before the balance hits zero.

🧠 2. Stateful Graph Agent Topology

Kira-AI uses a compiled, thread-safe, 6-node stateful graph pipeline built on LangGraph: content_copy text [START] │ ▼ context_injection │ ▼ [anomaly_check] ───────► Tool: detect_spending_anomaly │ ▼ [pattern_analysis] │ ├─► [anomaly_detected == True] ──► [cap_recommendation] ──► Tool: generate_spend_cap │ │ │ ▼ └─► [anomaly_detected == False] ───────────┴─► [nudge_generation] │ ▼ [confidence_scoring] ◄──────────────┐ │ │ (Quality Tool validation) │ │ │ ├──► [Fail (Retry < 2)] ──┘ │ └──► [Pass / Max Retries] ──► [END]

  • Self-Correction Loop: If the output fails the validation check (e.g., if the nudge or spending cap recommendation is truncated or lacks mathematical bounds), the confidence node branches execution back to nudge generation (up to 2 retries).

🔒 3. WebAssembly Privacy Sandbox

  • Scrubbing Engine: Implemented client-side. Low-intensity slider hides card numbers; high-intensity replaces all names and UPI codes with SHA-256 signatures.
  • Mathematical Predictors: Uses Ordinary Least Squares (OLS) Linear Regression on cumulative daily spend for runway forecasting, and Interquartile Range (IQR) upper-fence logic for spending anomaly metrics.
  • Offline Fallback: If the API server goes offline, the frontend hot-swaps to 100% offline Javascript heuristics to continue running locally with absolute data residency.

Built With

Share this project:

Updates

Submission history