Skip to content
valimenai-uxPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Tesla X Agent

An on-demand CLI agent that finds used Tesla Model X listings in your area, scores them by deal quality, and emails you a report.

Quick start

  1. Add your API keys to .env Open .env in this folder and paste your keys where indicated.

  2. First run (Cursor builds the code) Open this folder in Cursor and paste the contents of CURSOR_PROMPT.md into Cursor's chat. Cursor will build the agent in phases — run each phase, confirm it works, then continue.

  3. Run the agent Once built, double-click run.sh in Finder (or run ./run.sh from terminal). First run installs dependencies in a venv/; future runs are fast.

How it works

  • Pulls listings from Tesla's used-inventory API and Marketcheck (which aggregates Cars.com, AutoTrader, CarGurus, dealer sites)
  • Dedupes by VIN
  • Filters by year, mileage, price, title, accidents, owners (all toggleable per run)
  • Scores each listing 0-100 based on price-vs-market, mileage-for-age, year, title cleanliness, options, and an LLM quality check
  • Emails an HTML report sorted by deal quality, with a price-tier breakdown and price-drop alerts

What you'll be asked at each run

  • ZIP code (default: 90017)
  • Search radius in miles (default: 100)
  • Email address to send the report to
  • Whether to use default filters or customize
  • Whether to include LLM analysis (~$0.02/run; recommended)

Cost estimate

  • Anthropic API (Haiku): ~$0.01-0.03 per run
  • Marketcheck: free tier covers normal use
  • Resend: free tier covers up to 3,000 emails/month
  • Realistic monthly cost: under $5

Files

  • main.py — entry point and CLI flow
  • config.py — default filters and scoring weights
  • sources/ — data fetchers (Tesla, Marketcheck)
  • scoring.py — deal-quality scoring
  • analyzer.py — Claude per-listing analysis
  • storage.py — SQLite + price history
  • report.py — HTML email report
  • run.sh — double-clickable launcher
  • data/agent.db — created on first run

Troubleshooting

  • Email not arriving — check spam; Resend's sandbox onboarding@resend.dev sometimes lands there. To send from your own domain, verify it in the Resend dashboard.
  • Marketcheck rate limit — the free tier has request caps; if you hit them, wait an hour or upgrade.
  • No listings found — try widening the radius or relaxing filters.
  • Tesla API returns nothing — Tesla's used inventory varies by region; try a different ZIP.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages