Inspiration
Most autonomous agent workflows break down in high-stakes negotiations: either LLMs hallucinate deal terms and run unconstrained, or rigid automation strips away strategic adaptability. We wanted to invert this dynamic. What if an AI agent never invents the rules of the deal?
We envisioned an agent-native environment where human principals set strategic intent, deterministic calculation engines enforce mathematical reality, and external AI agents reason strictly within machine-enforced governance boundaries—discovering and executing tools natively inside the browser via WebMCP (document.modelContext).
What it does
Nexus Deal Room is a closed-loop negotiation and decision platform that bridges in-browser agent actuation with mathematical governance across four core pillars:Constraint Kitchen: Translates natural human intent (e.g., "Speed > Margin") into mathematical priority weights ($w_i$) and binds an immutable Agent Governance Authority Matrix.Deterministic Decision Twin: A zero-hallucination WASM truth engine that calculates feasibility scores (0–100), simulates trade-offs, and instantly halts non-negotiable hard-floor breaches (e.g., payment windows > 45 days, liability coverage < 1.5x).Agentic Strategist: Uses Gemini models to reason over deterministic twin projections, formulating compliant counteroffers strictly within predefined concession bands.In-Browser WebMCP Negotiation Room: Exposes client-side tools directly onto window.document.modelContext (with dual JSON-RPC FastMCP parity). External agents discover tools, simulate terms, and manipulate negotiation state across an interactive 6-node DAG without brittle DOM scraping or vision overhead.Automated WebMCP QA Suite: A continuous testing harness that acts as a synthetic, adversarial counterparty. Headless runners (Playwright) query document.modelContext directly to execute fuzzing, prompt injections, and boundary bypass attacks in CI.Wire-Agent Evolution: A sandboxed UI loop allowing agents to stage Tailwind UX improvements dynamically while hard immutability guards block any tampering with commercial variables.
How we built it
In-Browser WebMCP Engine: Polyfilled document.modelContext in TypeScript to establish a standard client-side Model Context Protocol transport layer, bridging DOM state directly to the client tools.
Frontend & Visual DAG: Built with React 18, Vite, TypeScript, Tailwind CSS, Zustand, and @xyflow/react to orchestrate and render real-time state machine transitions across 6 reactive nodes.
Backend & Tool Gateway: Python (FastAPI + FastMCP), Pydantic schemas, and SQLAlchemy with SQLite acting as the immutable audit log and System of Record for JSON-RPC 2.0 requests.
Agent Intelligence: Gemini API orchestrated via Google Cloud Vertex AI and Secret Manager.
Automated QA & CI/CD: Playwright-based headless WebMCP runner executing automated fuzzing and red-teaming scenarios; multi-stage Docker container deployed to Google Cloud Run via Terraform and GitHub Actions using Workload Identity Federation (WIF).
Challenges we ran into Polyfilling WebMCP in the DOM: Establishing standard tool registration on document.modelContext that could synchronize bidirectionally with Zustand stores in real time without causing race conditions or client-side UI freezes.
Deterministic Boundary Interception: Designing structured error-handling payloads so that when an agent attempts a violation (e.g., proposing $95k against a strict $100k floor), the tool returns actionable boundary telemetry rather than throwing unhandled exceptions that trap the LLM in repetitive loops.
Separating Presentation from Commercial State: Granting the Wire-Agent DOM mutation access to refine Tailwind CSS styling while engineering strict immutability guards (returning 403 Forbidden) whenever a payload touched underlying pricing, liability, or agreement terms.
Accomplishments that we're proud of Zero-Escape Governance: Proving under exhaustive testing that agents cannot bypass human sign-off (execute_contract deterministically halts and blocks unauthorized execution) or mutate protected financial thresholds.
Native In-Browser Agent Interaction: Achieving full tool discovery and execution via document.modelContext, eliminating vision model latency, token overhead, and brittle CSS selectors.
Automated WebMCP End-to-End QA: Shipping an automated headless CI test harness that directly talks to the in-browser MCP layer to continuously test boundary resilience and prompt-injection defense.
Production-Ready Delivery: Achieving 100% test suite completion with zero-credential, keyless CI/CD deployment running live on Google Cloud Run.
Challenges we ran into
Polyfilling WebMCP in the DOM: Establishing standard tool registration on document.modelContext that could synchronize bidirectionally with Zustand stores in real time without causing race conditions or client-side UI freezes.
Deterministic Boundary Interception: Designing structured error-handling payloads so that when an agent attempts a violation (e.g., proposing $95k against a strict $100k floor), the tool returns actionable boundary telemetry rather than throwing unhandled exceptions that trap the LLM in repetitive loops.
Separating Presentation from Commercial State: Granting the Wire-Agent DOM mutation access to refine Tailwind CSS styling while engineering strict immutability guards (returning 403 Forbidden) whenever a payload touched underlying pricing, liability, or agreement terms.
Accomplishments that we're proud of
Zero-Escape Governance: Proving under exhaustive testing that agents cannot bypass human sign-off (execute_contract deterministically halts and blocks unauthorized execution) or mutate protected financial thresholds.
Native In-Browser Agent Interaction: Achieving full tool discovery and execution via document.modelContext, eliminating vision model latency, token overhead, and brittle CSS selectors.
Automated WebMCP End-to-End QA: Shipping an automated headless CI test harness that directly talks to the in-browser MCP layer to continuously test boundary resilience and prompt-injection defense.
Production-Ready Delivery: Achieving 100% test suite completion with zero-credential, keyless CI/CD deployment running live on Google Cloud Run.
What we learned
Generative reasoning must be decoupled from mathematical evaluation: LLMs excel at creative strategic trade-offs and natural negotiation phrasing, but numeric thresholds, risk assessments, and financial calculations must be handled deterministically.
UI-as-Schema changes the agent landscape: When an application exposes its DOM and capabilities as structured, discoverable schemas via WebMCP, agents become faster, cheaper to run, and fundamentally more reliable.
Prompt engineering is not security: Real trust in autonomous agentic workflows requires hard client- and protocol-level boundaries that intercept and reject invalid mutations before state is altered.
What's next for Nexus Deal Room: Agent-Native Decision Environment
Multi-Agent Arenas: Supporting multi-party, concurrent negotiations where multiple external buyer and seller AI agents interact within the same WebMCP governance room.
Universal WebMCP Browser Extension: Packaging the runtime as a Chrome Extension that injects document.modelContext and deterministic governance layers over third-party enterprise procurement platforms (Coupa, SAP Ariba, Salesforce).
On-Chain Escrow & Programmable Settlement: Integrating automated smart-contract trigger hooks that disburse milestone funds immediately once the human-in-the-loop approval boundary is successfully signed.
Log in or sign up for Devpost to join the conversation.