Adaptive Deal Desk
Team led by a senior engineering executive and Octokraft CEO with 15+ years of experience scaling petabyte-scale data platforms, specializing in Go, Python, and RAG.
YouTube Video
Project Description
Helios Deal Desk is a B2B deal-desk approval workflow where every screen is generated, per-deal, by a tool-using agent. Instead of a
chat sidebar, the operator submits an exception request and the agent decides — for this specific deal — which panels matter, what
data to surface, and how to lay it out. A 35% healthcare discount triggers margin-floor analysis, FluxHealth competitive context, BAA
scope, and customer-history panels. A defense-terms exception triggers a completely different brief: legal clause risks, CMMC/ITAR
compliance, Sentinel Federal positioning. Same engine, structurally divergent UI per intent.
The core thesis: approval logic is already in the model’s weights. We don’t pre-configure workflows; we generate the right decision
brief for each request. Configuration economy applied to Salesforce-style admin work.
Beyond chat, three ways:
- Per-deal generated briefs. Click any inbox row → the agent reads the deal + corpus → emits an A2UI v0.9 component tree (Panel,
Metric, BarChart, Badge, AskAffordance, Row/Column with custom Tailwind renderers). Every panel id, every number, every prompt comes
from agent reasoning over real data files (cohort.json, customers.json, competitive_intel.json, industry_overlays.json,
pricing_policy.md).
- UI begets UI. Every panel has a ✨ affordance with both analytical and action-oriented prompts (“Draft a counter at 22%”, “Generate
the email I’d send the AE”, “What approval level does this need?”). Clicking spawns a new component fragment from the agent — nested
directly under the source panel with a connector line, not buried at the bottom of the page. No chat, just deeper UI.
- Build-your-own-deal demo. A “+ New deal” form lets you compose any exception (industry, type, value, term, urgency, summary) and
watch the agent generate a fresh, never-seen-before brief from scratch — proving the briefs aren’t templates.
Stack:
- A2UI v0.9 (@a2ui/web_core + @copilotkit/a2ui-renderer) for the declarative wire format and the renderer. Custom catalog extends the
basic catalog with Panel, Metric, BarChart, Gauge, LineChart, Badge, AskAffordance plus theming-aware Row/Column/Text overrides. - CopilotKit v2 provider with openGenerativeUI enabled; A2UIProvider supplies the catalog, A2UIRenderer paints surfaces from streamed
messages. - Gemini Flash-Lite with native function calling — five corpus tools (lookup_customer, lookup_cohort, lookup_competitive_intel,
lookup_industry_overlay, read_pricing_policy). The agent loops through tool calls, gathers grounding, then emits A2UI JSON. Same agent
path for initial briefs and ✨ spawn fragments. - Hono BFF + Next.js App Router. Brief generation lives behind /api/brief/{id} so frontend stays a dumb subscriber.
- File-based persistence for operator notes, decisions, and expanded cards (shared between frontend API and the agent corpus).
Technical execution highlights: strict A2UI v0.9 schema validation (id-references-only, no inline children, unevaluatedProperties:
false on every component) with builder helpers + system-prompt schemas to keep agent output conformant. Custom React Context for ✨
dispatch (bypasses Radix/A2UI dispatch friction). Heuristic in the root Column renderer detects panel-shaped children and switches to
an auto-fit grid with the summary panel spanning full width. Spawn cards render nested under their source panel via a SpawnContext,
creating real visual hierarchy.
Prior Work
This was built exclusively for the hackathon from scratch.