Inspiration

High-stakes negotiations determine careers, deals, and futures. Yet most people walk in unprepared. Professional negotiation coaching costs $500+/hour and isn't available in real-time when you actually need it. We asked: what if AI could be your copilot during the conversation itself?

What it does

Secondus is a real-time negotiation copilot that listens, watches, and coaches you during live conversations. It:

  • Speaks as a tough AI counterparty for realistic practice
  • Listens to your responses with real-time transcription via Gemini Live API
  • Sees contract documents through screen capture and extracts terms with Gemini Vision
  • Detects pressure tactics (anchoring, timeline pressure, contract drift)
  • Coaches you with contextual "Say this now" recommendations
  • Analyzes your presence (eye contact, posture, tension) using MediaPipe ML

How we built it

Frontend: React 18 + TypeScript + Vite + Tailwind CSS v4. MediaPipe Tasks Vision runs entirely client-side for real-time face and pose analysis at 5 FPS.

Backend: FastAPI + Python 3.13 on Google Cloud Run. WebSocket-based architecture for sub-second latency.

AI Stack:

  • Gemini 2.5 Flash (Native Audio) for real-time voice understanding and adversary responses
  • Gemini 2.0 Flash for document analysis and coaching generation
  • Google ADK for the AI counterparty agent

Scoring Algorithm: Dynamic weighting — 70% voice/30% presence when camera is enabled, 100% voice otherwise. Combines negotiation metrics (turn participation, tactics detected, deal closure) with visual presence scores.

Challenges we ran into

  1. React re-render loops with MediaPipe: Stabilized hooks using useRef patterns to prevent MediaPipe from constantly reinitializing
  2. Camera permission handling: The video element must always exist in DOM (hidden when inactive) for the ref to be available
  3. Presence data pipeline: Accumulated raw metrics client-side, computed averages on session end, then sent to backend for scoring
  4. WebSocket state sync: Managing turn-taking and interruption handling between real-time audio and UI state

Accomplishments we're proud of

  • Sub-200ms coaching latency from speech to recommendation
  • Client-side ML processing with zero backend inference cost for presence
  • Hybrid LLM + deterministic detection for reliable signal alerts
  • Research-grounded coaching based on Harvard PON, Chris Voss, and Fisher & Ury

What we learned

  • MediaPipe's FaceLandmarker provides 468 3D landmarks + 52 blendshapes — more than enough for presence analysis
  • Gemini Live API handles interruptions gracefully with proper buffer management
  • Rate-limiting signals (30s/45s cooldowns) prevents cognitive overload during negotiations

What's next for Secondus

  • Multi-language support for international negotiations
  • Custom scenario builder for specific industries (real estate, salary, vendor contracts)
  • Integration with calendar apps for pre-meeting coaching
  • Team negotiation mode with role assignment

Built With

Share this project:

Updates