A personal finance advisor built on an orchestrator + specialists pattern. Mock-first and swap-ready — the same topology accepts a real LLM or LangGraph with no restructure.
| Component | Role |
|---|---|
| Planner | Spine. Classify intent → build plan → sequence specialists → branch on results → merge FinalResponse. |
| Spending Analysis | Categorize transactions, compute month-over-month trend, flag anomaly (>20% MoM). The in-depth agent. |
| Recommendation | Target high categories, estimate ₹ saved. Aggressiveness scales to profile.risk_pref. |
| Alerting | Scan every category against budget. Flag breach / near-breach (≥90%). |
| Tool layer | Typed mock APIs. Agents never touch the store directly. Shaped like LLM function-calls. |
| Memory | Session history + result cache + user profile. In-memory. |
run(query, profile).FinalResponse.| Intent | Execution plan |
|---|---|
| IMPROVE_SAVINGS | spending → recommend → alert |
| SPENDING_SUMMARY | spending |
| BUDGET_STATUS | alert (+ spending for context) |
| WHY_OVERSPENT | spending → alert → recommend |
| GENERAL_ADVICE | spending → recommend |
| GREETING / UNKNOWN | direct reply, no agents |
First-match-wins keyword routing. The same interface accepts an LLM classifier later.
Specialists never call each other → acyclic, debuggable star topology.
Dataclasses, not free text → testable and predictable.
Rule-based reason() now; maps 1:1 to LangGraph nodes/edges. A real model drops in with zero restructure.
Executed steps depend on the agent's own output → reasoned, not a fixed pipeline.
Parallel build seams; fully modular.
Rejected alternatives: monolith (fails the multi-agent requirement, no visible orchestration) · peer-to-peer agents (cycles, coordination tax) · real LLM now (no key, 1-hour budget).
reason() / classify_intent() with a Claude tool-calling loop.