Finance OS.
Personal-finance super-app · LangGraph · pgvector · Cloud Run
“LLMs are bad at arithmetic. The single biggest mistake in personal-finance AI is letting them touch the numbers.”
Existing personal finance apps record transactions and produce charts. They don't reason. They don't tell a 27-year-old engineer earning ₹40L whether to prepay the home loan or increase the SIP. The market for that strategic synthesis is gigantic — most users can't afford a human advisor — but every attempt I've seen lets the LLM compute net worth, and that's where trust collapses. One wrong rupee figure and the user never opens the app again.
Finance OS is architected around a strict separation. A deterministic computation layer (seven modules: Cash Flow, Net Worth, Investment, Goals, Debt, Tax, Insurance) is the only source of truth for any number. A LangGraph agentic layer (Cash Flow, Investment, Stocks, Tax, Debt, Goals, Insurance, Behavior, Reflection agents) consumes those outputs, reasons across domains, and communicates in natural language. Agents never compute. Every recommendation in the chat surfaces a 'show calculation' affordance that drills into the deterministic module that produced the figure.
The choices that mattered, with the reasoning at the time.
- Deterministic core first, agents later
Phase 1 ships the deterministic foundation with manual data entry only. No AI. By the end of Phase 1 the product is a comprehensive spreadsheet-replacement with goal projections. Only then does the conversational layer go on top. This sequencing means trust is built before LLMs are anywhere near the user's numbers.
decision · 01 - Periodic statement upload, not bank API integration
Account Aggregator licensing and bank API integration adds months of regulatory work for marginal user value at side-project scale. Monthly CAS / bank-statement uploads are sufficient for any meaningful decision and structurally avoid the entire phishing surface — there's nothing to steal even if compromised.
decision · 02 - Strict 'show your work' rule
Every numerical claim from an agent must include a structured reference to the deterministic computation that produced it. UI surfaces this as a drill-down. This is what builds trust and differentiates the product from a generic finance chatbot.
decision · 03
One code surface that captures the structural decision.
from langgraph.graph import StateGraph, END
from .specialists import cashflow, investment, tax, debt, goals, behavior, reflection
from .deterministic import compute_state
def build_finos_graph() -> StateGraph:
g = StateGraph(FinanceState)
# Deterministic core first — single source of truth for every rupee
g.add_node("compute", compute_state)
# Specialist agents — read deterministic outputs, never compute
for name, agent in [("cashflow", cashflow), ("investment", investment),
("tax", tax), ("debt", debt), ("goals", goals)]:
g.add_node(name, agent)
# Behavior + reflection synthesize across domains
g.add_node("behavior", behavior)
g.add_node("reflection", reflection)
g.set_entry_point("compute")
g.add_edge("compute", "cashflow")
for a in ("cashflow", "investment", "tax", "debt", "goals"):
g.add_edge(a, "behavior")
g.add_edge("behavior", "reflection")
g.add_edge("reflection", END)
return g.compile(checkpointer=pg_checkpointer())
The case study is more useful when you can poke it.
deterministic calculation — no llm in this loop. that’s the whole point.
Architecture and module specs complete. Phase 1 (Cash Flow + Net Worth deterministic core, manual entry, basic dashboard) is the next 8-week sprint. Stack: Next.js + TypeScript + Tailwind + shadcn frontend on Vercel; FastAPI + SQLAlchemy + Pydantic backend on Google Cloud Run (Docker + YAML); PostgreSQL + pgvector via Supabase; Anthropic Claude as the LLM provider; LangGraph for agent orchestration. Auth via Supabase + Google OAuth; envelope encryption for sensitive fields.
- deterministic modules
- 7
- agents
- 9
- build phases
- 7
- compliance posture
- read-only · no trade execution
Pre-build planning is risky to do for 48 weeks of work — half of these decisions will get revised once Phase 1 ships and I'm using the system daily. The discipline is to commit only to the architectural invariants (deterministic core, agents reason but don't compute, show-your-work UI) and let the surface decisions float.
- Deterministic core (single source of truth for every rupee): Cash Flow · Net Worth · Investment · Goals · Debt · Tax (dual regime) · Insurance
- Agentic reasoning layer (LangGraph): Cash Flow · Investment · Stocks · Tax · Debt · Goals · Insurance · Behavior · Reflection
- Frontend: Next.js + TypeScript + Tailwind + shadcn/ui + Recharts on Vercel
- Backend: FastAPI on Cloud Run (Docker + YAML); SQLAlchemy; Pydantic; PostgreSQL + pgvector via Supabase; Redis later
- Auth: Supabase Auth + Google OAuth; envelope encryption for account numbers / PAN
- Statement ingestion: pdfplumber + pypdf for known formats; Claude semantic fallback for unknown — bank-specific deterministic parsers for HDFC / ICICI / SBI / Axis / Kotak + CAMS/Karvy CAS