Inspiration

Ending a car lease is one of the most expensive decisions most people make, and almost nobody gets help with it. When the lease ends, you have to choose between buying out, returning it, refinancing, or replacing the car, with gas prices swinging and every option quoted differently. The dealer gives you a monthly payment. Your bank shows you transactions. Neither tells you which choice actually fits your budget. We wanted the honest answer to “what should I do about my car?”, built from your own money and your own driving.

What it does

Regentic helps a driver decide whether to keep their car, buy out a lease, refinance, or replace it. It compares every option over the same time horizon.

  • Budget from real banking data: it reads accounts and transactions from the Capital One Nessie sandbox. It works out recurring income and spending, subtracts a savings goal and a buffer, and gets a monthly vehicle budget. It shows which transactions it left out, such as internal transfers and refunds, and why.
  • Your actual driving: you can import a GPX drive or try a sample. It previews what the file does and doesn’t support, and turns confirmed trips into monthly miles and city share. Those numbers flow into fuel cost and the lease mileage projection. The Drives tab replays trips on a 3D map of real Austin routes with a modeled regenerative-braking analysis for hybrids.
  • Compare every option: for each option it shows upfront cash, total monthly cost, equity at the end and economic cost. Sliders for gas price and miles recompute everything live. Sensitivity checks show which assumptions would change the ranking.
  • Loan pre-qualification: an estimated rate from lender-style rules plus a credit model trained on public data. Every result is labeled an estimate, not an offer.
  • Market listings: SerpAPI shows advertised prices and nearby Toyota dealers, each with a source link and a retrieval time.
  • A clear next step: for example, “Request a buyout quote” with a link to Toyota Financial Services. Claude writes a plain-English explanation of the decision.

How we built it

  • Stack: Next.js 16 and TypeScript, with Vitest and Playwright for tests.
  • Pure calculation core: all money math is pure functions in integer cents with no React or server imports. One runScenario() function feeds both the screens and the API, so the numbers always match.
  • Provider adapters:
    • Capital One Nessie for banking, including seeding a sandbox customer from your onboarding answers.
    • SerpAPI for listings and dealers.
    • fueleconomy.gov ratings for fuel cost.
    • Mapbox, MapLibre, OpenStreetMap and Open-Meteo for routes, surfaces and weather.
  • Credit model: a logistic regression trained in Python on the UCI German Credit dataset (AUC 0.77), then run in TypeScript. It sits behind policy rules (payment ≤ 20% of income, debts ≤ 50%, and so on) and Experian rate tiers. It can adjust a rate tier or flag a file for review, but never declines anyone on its own. Sex, age, marital status and nationality are not used.
  • Grounded AI: Claude only explains a recommendation the code already computed. A validator checks every number in Claude’s text against the calculation. If Claude invents one, we show a deterministic template instead and say why.

Challenges we ran into

  • No real vehicle data. Toyota doesn’t publish regen telemetry, and GPS can’t measure battery recovery. We modeled it from physics and labeled it modeled everywhere, rather than pretending.
  • Keeping AI honest. The model sometimes wrote figures that weren’t in the calculation. We had to validate its output, tune the prompt after the first live runs, and always keep a fallback.
  • Failures that don’t lie. A failed live call must never quietly turn into fixture data. The Nessie sync, for example, offers the last good sandbox read and marks it stale.
  • Unsafe uploads. GPX files can carry XML attacks, so imports reject DOCTYPE, oversized files and archives before parsing anything.
  • Serverless memory. Vercel instances don’t share memory, so the client keeps the working state and resends it whenever the server has lost a record.
  • Four parallel streams on one repo. Keeping field names, units and files from colliding took a written contract, frozen interfaces and integration windows.

Accomplishments that we're proud of

  • An end-to-end decision tool where changing one real input changes the answer. Adding a $300 monthly bill drops Maria’s budget from $900 to $600 and changes her next step.
  • It says “nothing fits” (Kai) and “keep your car” (Devon) instead of always pushing a purchase.
  • A credit model that is explainable and excludes protected attributes.
  • Every number on screen shows where it came from.
  • Failure states are visible and labeled, with screenshots of each in docs/demo/failures/.
  • Strong test coverage: the unit suite started at 81 tests, the Playwright specs run on desktop and phone widths, and the demo scenarios are enforced by tests.

What we learned

  • Being honest about data quality is a feature. Labeling numbers synthetic, modeled or observed made the product easier to trust and easier to defend.
  • AI works best as an explainer on top of deterministic math, with a validator and a fallback.
  • Integer cents and pure functions saved us from a whole class of money bugs.
  • Clear contracts and file ownership let several people and several AI agents build in parallel without stepping on each other.
  • Sandbox APIs like Nessie can be a real proving ground: seeding and reading back customers made the banking flow testable.

What's next for Regentic

  • Real vehicle data: a partnership like Toyota Insure Connect for authorized odometer and driving data in place of modeled replays.
  • Real quotes: lender pre-approvals and dealer buyout quotes in place of synthetic terms.
  • Native trip recording in a phone app, instead of uploading GPX files.
  • Durable storage for accounts and history (Supabase or Postgres) instead of in-memory demo state.
  • More decisions: switching cars mid-lease, insurance programs, and lease-term choices (already designed in our specs).
  • Insurer sharing, only with explicit, purpose-specific consent. The permission controls already exist in Settings.

Built With

Share this project:

Updates

Submission history