Quickstart
Clone, configure environment variables, seed the database, and run the app in minutes.
Architecture
Understand how the web chat, REST API, and eve agent share a single analytics library.
Analytics Tools
Explore the eight analytics tools — summary, trend, cashflow, anomalies, and more.
API Reference
Browse all Finance REST API endpoints with parameters and response shapes.
What it does
The agent acts as a senior financial analyst for a fictional company. It never invents numbers — every figure in its answers comes directly from a tool call against the database. Responses pair a chart with a short interpretation, giving busy executives the answer first and the supporting data second.Agent Chat
Web chat UI powered by the eve framework with inline chart rendering.
Chart Rendering
Per-tool Recharts visualizations with a shared palette and light/dark support.
Data Layer
Postgres schema and ~3 years of deterministic synthetic financial data.
Configuration
Environment variables, agent model settings, and Vercel deployment.
Evals
Regression test suite guarding known model failure modes.
Extending
Step-by-step guide to adding a new analytic end-to-end.
Key capabilities
- Natural-language Q&A — ask any finance question in plain English; the agent selects the right tool automatically
- Eight analytics tools — summary, trend, category breakdown, cashflow, budget status, anomaly detection, profitability, and data overview
- Shared analytics library — REST API routes and agent tools call the same
finance.tsfunctions, keeping logic in one place - Statistical anomaly detection — flags expense transactions exceeding mean + threshold × stddev within each category
- Session-aware instructions — today’s date and the live data range are injected fresh each session; no hardcoded dates
- Eval suite — deterministic regression tests covering category filter correctness, period-comparison direction, and more
1
Clone the repository
2
Set up environment variables
Create a
.env.local file at the project root and add your DATABASE_URL and MISTRAL_API_KEY. This file is gitignored — never commit it.3
Migrate and seed the database
4
Start the development server