DealRoom — Real-Time Negotiation Intelligence Agent

Inspiration

Every sales call is a high-stakes moment where the difference between closing and losing comes down to split-second decisions. Yet salespeople go into these calls alone, no coach in their ear, no one to catch when the other side is using a pressure tactic, no real-time feedback when they've just given away leverage.

We've all been there: you hang up the call and then think of the perfect response. DealRoom was built to fix that. The inspiration came from watching a friend lose a $40k deal because he caved too early on price, not because the product wasn't worth it, but because he didn't recognize the anchoring tactic being used against him in real time.

If a chess player can have an engine analyzing every move, why can't a salesperson have an AI analyzing every sentence?

What it does

DealRoom is a silent, real-time negotiation intelligence agent that runs as a floating overlay during any live call.

  • Listens continuously to your microphone during sales calls
  • Detects negotiation signals, pressure tactics, buying signals, red flags, and surfaces them as cards on the overlay
  • Delivers tactical coaching in under 25 words, timed to appear exactly when you need it
  • Speaks key alerts aloud via text-to-speech so you never need to look away from your screen
  • Generates a post-call debrief the moment you end the session, summary, leverage points, and your single most important follow-up action

The overlay stays out of your way. It appears bottom-right, never covers your video call, and only speaks up when it has something genuinely useful to say.

How we built it

Frontend: A single-file vanilla JS overlay (overlay.html) served over HTTP. It captures microphone audio using the MediaRecorder API, streams 500ms WebM chunks over a persistent WebSocket connection, and renders Gemini's tactical responses as typed cards with color-coded badges (TACTIC in blue, RED_FLAG in red, SIGNAL in green, DEBRIEF in purple).

Backend: FastAPI server with a WebSocket endpoint (/stream) that receives the audio chunks, batches them into ~10-second windows, and sends the negotiation context to Gemini for analysis. A separate /debrief endpoint generates the post-call summary. A /tts endpoint converts key alerts to speech.

AI: Google Gemini 2.5 Flash via the generate_content API. The system prompt instructs the model to respond only as valid JSON with a strict schema, type, message (≤25 words), confidence, and reasoning. The model returns {"type":"SILENT"} when there's nothing valuable to say, keeping the overlay noise-free.

TTS: Three-layer fallback: Google Cloud TTS → gTTS → macOS say command, ensuring audio output works regardless of GCP billing status.

State: Session state (offers tracked, red flags, key moments) is persisted to a local JSON store and included in every Gemini prompt, giving the model full negotiation context as the call evolves.

Challenges we ran into

Regional API restrictions. The Gemini Live API (bidiGenerateContent) is not available in Egypt on the free tier. Zero models returned for bidiGenerateContent across v1alpha and v1beta. We had to architect a fallback using standard generate_content that simulates real-time behavior through intelligent audio windowing, achieving the same user experience without native streaming.

Quota exhaustion. Free tier limits (15 requests/day on some model variants) forced us to iterate across multiple API keys and model versions (gemini-2.0-flash → gemini-1.5-flash → gemini-2.5-flash) before finding a stable configuration. We also had to implement rate-limiting in the WebSocket loop to avoid burning quota during development.

Browser security blocking microphone over file://. The overlay initially loaded as a local file, which browsers block from accessing the microphone. Solving this required serving the HTML via a FastAPI route (/overlay) so it runs over HTTP, unlocking mic permissions.

system_instruction schema change. The Google GenAI Python SDK changed system_instruction from accepting a plain string to requiring a types.Content object. This broke the WebSocket connection silently until we traced it to a Pydantic validation error deep in the stack.

Accomplishments that we're proud of

  • Built a fully working real-time AI overlay that connects, listens, and responds with tactical negotiation advice during live calls
  • Achieved end-to-end pipeline: microphone → WebSocket → Gemini → overlay card → TTS audio, all within ~4 seconds of latency
  • Zero GCP billing required, the entire stack runs on free-tier APIs with graceful fallbacks at every layer
  • The overlay UI is genuinely usable, minimal, non-intrusive, and visually clean enough to run over a real Zoom or Google Meet call
  • Shipped in 4 days from scratch

What we learned

  • The Gemini API ecosystem has significant regional variation, bidiGenerateContent availability is not uniform globally, and building robust fallbacks is essential for production
  • Constraining LLM output to strict JSON schemas (with a SILENT type to suppress noise) dramatically improves the signal-to-noise ratio of real-time AI coaching
  • Browser security model (file:// vs http://) has real implications for WebRTC/MediaRecorder access that aren't obvious until you hit them
  • Rate limiting is a feature, not a bug, spacing Gemini calls to every 10 seconds of audio produces better, more contextual responses than calling every 2 seconds

What's next for DealRoom

  • Native Gemini Live API integration, once regional availability expands, replace the generate_content fallback with true bidirectional audio streaming for sub-second response latency
  • Transcript context, use Whisper or Gemini's audio understanding to pass actual conversation text (not just audio bytes) for dramatically more relevant tactical advice
  • CRM integration, pull deal context from Salesforce or HubSpot before the call so Gemini knows the prospect's history, deal size, and past objections
  • Chrome extension, package the overlay as a browser extension that auto-activates on Google Meet, Zoom, and Teams
  • Team analytics dashboard, aggregate debrief data across all calls to identify patterns: which objections come up most, where deals stall, which tactics work
  • Custom playbooks, let sales managers upload their methodology (MEDDIC, Challenger, SPIN) and have DealRoom coach specifically to that framework

Built With

Share this project:

Updates

Submission history