Financial Analytics Agent is a portfolio-grade, full-stack demo application built for developers who want a concrete example of how to wire an eve agent together with a React chart library. It ships a working AI analyst, a real Postgres-backed data layer, and a polished Next.js chat interface — all in a single deployable project. Whether you want to study the eve + Recharts integration pattern, fork it as a starting point for your own analytics product, or simply run a demo that impresses stakeholders, this is the fastest path from zero to a charting AI agent.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/financial-analytics-agent/llms.txt
Use this file to discover all available pages before exploring further.
What it does
The agent presents itself as a Northwind Labs senior financial analyst — a fictional persona with a direct, data-first communication style. When a user asks a natural-language question, the agent selects the right tool, queries a seeded Postgres database, and returns both a short written interpretation and a fully rendered chart, all inside the chat window. The project ships eight analytics functions (six exposed as agent tools, one powering the suggested-question chips, one providing a metadata overview):| Function | What it returns |
|---|---|
getSummary | Total income, expense, and net for a date range |
getTrend | Time-series rows grouped by month and optionally department |
getCategoryBreakdown | Spend or revenue broken down by category |
getCashflow | Period-over-period cashflow with running net |
getBudgetStatus | Per-department budget vs. actual with variance |
getAnomalies | Outlier transactions that deviate beyond a configurable σ threshold |
getHighlights | Live date ranges used to ground suggested questions |
getDataOverview | Schema metadata to orient the agent at session start |
trend-chart.tsx, budget-chart.tsx, category-breakdown-chart.tsx, cashflow-chart.tsx, anomaly-list.tsx, summary-tiles.tsx) that degrades gracefully — for example, a single-period trend renders as a bar chart rather than a one-dot line.
Tech stack
| Layer | Technology |
|---|---|
| Web framework | Next.js 16 (App Router) |
| Agent framework | eve ^0.19.0 |
| AI model | Mistral mistral-medium-2508 via @ai-sdk/mistral |
| Charts | Recharts ^3.9.1 |
| Database | Postgres — Neon via Vercel Marketplace |
| Validation | Zod 4.4.3 |
| Deployment | Vercel (single project) |
| Runtime | Node.js 24.x, pnpm |
withEve() call in next.config.ts, so the agent and the web UI share the same origin with no CORS configuration or base-URL environment variables to manage.
Key design decisions
Shared analytics library. All SQL logic lives once inagent/lib/finance.ts. Both the agent’s authored tools (agent/tools/*) and the Finance REST API route handlers (app/api/finance/*) import from this shared module directly. Adding a new analytic means writing the query once and it surfaces automatically in both the chat agent and the REST API.
No HTTP boundary between agent and data. The agent tools call agent/lib/finance.ts directly with process.env access to the Postgres connection string — they never make HTTP requests to the Finance REST API to fetch data. This design means the entire agent works under pnpm exec eve dev --no-ui with no Next.js process running, which simplifies testing and CI verification.
Dynamic date injection. The static agent/instructions.md file contains the analyst persona and tool-selection rules but deliberately has no literal dates. A defineDynamic resolver in agent/instructions/dates.ts fires on every session.started event, computes today’s date from new Date(), queries the real data range from getHighlights(), and appends a short date-context block to the instructions. This prevents the common failure mode where a hardcoded “today is …” string goes stale the day after every deploy.
Read-only data surface. The demo never mutates finance data from chat, keeping the surface predictable and safe for a public demo. The vercelOidc() + localDev() + none() auth chain on the eve channel keeps the demo open — swap none() for a real auth provider before pointing the agent at non-synthetic data.
Explore the docs
Quickstart
Clone the repo, seed the database, and have the chat UI running in under 10 minutes.
Architecture
Understand the three-in-one design: web chat, REST API, and agent at the same origin.
Analytics Tools
Explore all eight analytics functions, their inputs, and the charts they produce.
API Reference
Read-only Finance REST API endpoints for direct integration.