← All projects
Multi-agent · SalesMay 2026

Lead Generator Proposal Engine

An internal sales tool for a commercial energy consultancy. It reads a prospect's utility bill, grounds its research in real EIA and NREL data, and generates a fully customized savings proposal in under 60 seconds.

  • React
  • GPT-4o vision
  • EIA · NREL
  • SSE
Try it

A working recreation you can click through

proposal-engine · proposal7 agents · 4 phases
Pick a saved prospect to generate its proposal

Generate a proposal replays two runs saved by the real tool (May–June 2026): the extracted bill, every recommendation with its confidence and source, the financial model and the drafted email, exactly as the agents produced them. Grounding data runs the project's own EIA and NREL lookups and solar formula live in your browser for any state. Only the timing is simulated; nothing is sent anywhere.

Overview

The Lead Generator Proposal Engine is an internal AI-powered sales tool for a commercial energy management consultancy. Given a prospect's company details — or a photo of their utility bill — the system runs a multi-agent pipeline that researches real energy-market data and generates a fully customized savings proposal in under 60 seconds.

Problem

Energy consultants spend hours per prospect manually researching state electricity rates, solar incentives, and compliance requirements before hand-assembling a savings proposal. The process is slow, inconsistent, and hard to scale across a sales team.

Solution

A four-phase, multi-agent pipeline that turns a prospect profile into an adjudicated, financially-modeled proposal — plus a ready-to-send client email:

  • Bill intake: GPT-4o vision extracts spend, usage, and location straight from an uploaded utility bill
  • Grounded research: every run is anchored to real EIA electricity rates and NREL PVWatts solar data, not model guesses
  • Isolated specialists: parallel agents cover usage reduction, procurement, alternative generation, and compliance
  • Synthesis + financials: a final analysis layer produces a five-year savings projection with paybacks
  • Real-time UX: agent status streams to the frontend live via Server-Sent Events

Architecture: Multi-Agent Pipeline

The orchestrator runs agents across four sequential phases:

Phase 1 — Research (serial, blocking). Fetches the real commercial electricity rate for the prospect's state from a 50-state EIA 2024 table (with live EIA API fallback), queries a RAG store for the top-3 most similar past proposals by cosine similarity, and produces a structured research brief that every downstream agent shares.

Phase 2 — Specialist Agents (parallel). Four agents run concurrently, each receiving the research brief but operating in isolation so bias can't propagate between them:

AgentOutput
Usage Reduction3–4 conservation measures
ProcurementSavings %, annual savings, payback months
Alternative GenerationSolar + DER recs, grounded in real NREL PVWatts data
ComplianceIncentives, regulations, IRA tax credits

Each recommendation is a structured item with a confidence score and a source.

Phase 3 — Financial Analysis (serial). The only agent with visibility into all specialist outputs, acting as a synthesis layer — it produces a baseline, a savings breakdown by category, blended payback, and a five-year cumulative projection.

Phase 4 — Email Drafting (serial). Generates a personalized subject and body ready for the consultant to send.

Fault tolerance. Every agent is wrapped in a safeRun() guard — if one fails or times out, the orchestrator logs it, emits an error event to the UI, and substitutes a sensible default so the pipeline always completes.

Tech Stack

  • Frontend: React 18 + Vite + Tailwind CSS
  • Backend: Express (ESM), Server-Sent Events for live agent status
  • AI: OpenAI SDK — GPT-5.5 for complex agents, GPT-4o-mini for specialists, GPT-4o vision for bill extraction, text-embedding-3-small for RAG
  • Database: SQLite (better-sqlite3) for proposals and RAG embeddings
  • Email: Nodemailer over SMTP
  • Grounding data: EIA state electricity rates, NREL PVWatts solar production

Key Design Decisions

  • Specialist agents are isolated — they read only the shared research brief, never each other's outputs, preventing bias propagation.
  • Financial analysis runs last as the single synthesis layer with full visibility.
  • RAG is fire-and-forget — indexing and retrieval failures are swallowed so proposal generation always degrades gracefully.
  • SSE streaming keeps the sales rep informed as each agent completes, rather than staring at a spinner.

Results

  • Generates a complete, grounded savings proposal in under 60 seconds
  • Every recommendation is traceable to a confidence score and a real data source
  • Scales consistent proposal quality across an entire sales team
More projects