How venkatanaren/expense_ai_agent works
Expense Helper is a single-agent expense and KiwiSaver tracker. Users chat through the CLI or optional Streamlit UI; the agent sends tool-enabled requests to an NVIDIA-hosted model, dispatches requested operations, and persists records in SQLite. KiwiSaver also has CSV import and unit-price backfill paths, while usage reporting and benchmark scripts inspect agent telemetry. The main agent excerpt is partial, so internal tool dispatch and database ownership are represented at the agent boundary rather than split into unsupported subcomponents.
Main entry points: expense_agent.py Agent loop and tools · app.py Streamlit UI · benchmark_agent.py Agent benchmark · import_kiwisaver.py KiwiSaver CSV import
Components 13
User interaction
- CLI chat
expense_agent.py - Streamlit UI
app.py
Agent runtime
- Agent loop and tools
expense_agent.py
Expense and KiwiSaver records
- Expense operations
expense_agent.py - KiwiSaver operations
expense_agent.py - SQLite records and telemetry
expense_agent.py
Data and telemetry utilities
- KiwiSaver CSV import
import_kiwisaver.py - Implied price backfill
backfill_implied_unit_price.py - Usage report
usage_report.py - Agent benchmark
benchmark_agent.py - Model comparison
benchmark_compare.py
Other components
- User
- NVIDIA model API
Connections 17
- User → CLI chat: enters chat
README.md - User → Streamlit UI: uses tabs
README.md - CLI chat → Agent loop and tools: submits message
README.md - Streamlit UI → Agent loop and tools: calls run_agent
app.py - Agent loop and tools → NVIDIA model API: requests completion
README.md - Agent loop and tools → Expense operations: dispatches tools
README.md - Agent loop and tools → KiwiSaver operations: dispatches tools
README.md - Expense operations → SQLite records and telemetry: reads and writes
expense_agent.py - KiwiSaver operations → SQLite records and telemetry: reads and writes
expense_agent.py - Streamlit UI → SQLite records and telemetry: queries records
app.py - Streamlit UI → KiwiSaver operations: gets summary
app.py - KiwiSaver CSV import → SQLite records and telemetry: inserts balances
import_kiwisaver.py - Implied price backfill → SQLite records and telemetry: updates prices
backfill_implied_unit_price.py - Usage report → SQLite records and telemetry: reads call telemetry
usage_report.py - Agent benchmark → Agent loop and tools: runs prompts
benchmark_agent.py - Agent benchmark → SQLite records and telemetry: reads telemetry
benchmark_agent.py - Model comparison → Agent loop and tools: runs prompts
benchmark_compare.py