Skip to main content
The Financial Analytics Agent requires two environment variables to run: a Postgres connection string for the Neon database and a Mistral API key for the AI model. In local development these live in a .env.local file at the project root; in production they are managed through the Vercel dashboard or pulled automatically via the Neon Marketplace integration.

Required variables

string
required
A Postgres connection string pointing to your Neon database. When you provision Neon Postgres through the Vercel Marketplace, this variable is added to your Vercel project automatically and can be pulled locally with vercel env pull .env.local. The format follows the standard Postgres URI scheme, for example postgres://user:password@host/dbname.
string
required
Your Mistral platform API key. The agent uses mistral-medium-2508 directly via @ai-sdk/mistral, bypassing the AI Gateway, so this key must be valid and have access to the Medium model tier. Obtain it from console.mistral.ai.

Local setup

There is no committed .env.example in this repository, so create .env.local manually at the project root. The file needs exactly the two variables above:
Populate it with your real credentials:
Once the file exists you can start the development server normally with pnpm dev. The db:migrate and db:seed scripts also read DATABASE_URL from .env.local at runtime, so the same file covers local database operations too.
Never commit .env.local or any file containing credentials. The .gitignore already excludes .env* files, but double-check before committing if you rename or copy the file.

Vercel deployment

For production, environment variables are managed in the Vercel dashboard under Project → Settings → Environment Variables. The Neon Postgres integration sets DATABASE_URL automatically when you provision a database through the Vercel Marketplace — you do not need to copy the connection string by hand. To replicate the production environment locally, use the Vercel CLI to pull the configured values directly into .env.local:
This overwrites any existing .env.local with the production values, which is useful for running database migrations or seeds against the live Neon database from your local machine. MISTRAL_API_KEY must still be set manually in the dashboard; it is not provisioned by any Marketplace integration.