Skip to content

Make demo fully functional: real backend + live Claude - #12

Open
ColeLeng wants to merge 4 commits into
demo/planner-concierge-distinctionfrom
demo/live-claude-real-backend
Open

Make demo fully functional: real backend + live Claude#12
ColeLeng wants to merge 4 commits into
demo/planner-concierge-distinctionfrom
demo/live-claude-real-backend

Conversation

@ColeLeng

Copy link
Copy Markdown
Owner

Summary

Turns the buyer-journey visual demo from a mock data fabricator into a thin adapter over the team's real pipeline, runnable live on Claude.

  • app/demo_engine.py now loads data.stores, fans out one context-isolated scout per seller (parallelized) running blue/scout_agent's 4 security sub-agents, aggregates to ScoutReport, and lets blue/concierge_agent adjudicate the winner (trust gate). All fabricated UCP seller data removed.
  • Frontend is review-centric: the drawer shows the actual reviews each scout ingested (planted fakes highlighted) + real signal / evidence / reason findings; product_score (verified reviews only) as product fit; planted-fake ground truth + a detection scoreboard.
  • Header control is now a contamination selector (0 / 20 / 40 / 60%) → data.stores.contaminated_stores.
  • LIVE Claude: sub-agents run on claude-opus-4-8 when ANTHROPIC_API_KEY is set, loaded from .env with override=True (an empty shell-exported ANTHROPIC_API_KEY was silently forcing mock mode).
  • Server: /api/run?level=L, cache per level, background --warm of all levels.
  • Every agent step is @traced → Weave.

Stacked on demo/planner-concierge-distinction (PR #11); retargets to main once that merges.

Test plan

  • Mock mode: precision/recall 1.0, concierge buys the clean in-budget seller, no console errors.
  • Live Claude: full audit ~42s, usedRealAgents: true, richer detections (prompt_override, competitor_suppression, presentation_attack), evidence renders in the drawer.
  • Weave logs every agent action.
  • Reviewer: confirm .env (with the key) is gitignored and not in the diff.

Made with Cursor

ColeLeng and others added 4 commits May 31, 2026 19:30
Rewire app/demo_engine.py from a mock data fabricator into a thin adapter over
the team's real pipeline: load data.stores, run blue/scout_agent's 4 security
sub-agents per ISOLATED seller (parallelized), aggregate to ScoutReport, then let
blue/concierge_agent adjudicate the winner. Removes all fabricated UCP seller data.

- Frontend is now review-centric: the seller drawer shows the actual reviews each
  scout ingested (planted fakes highlighted) and real signal/evidence/reason
  findings; product_score (verified reviews only) as product fit; planted-fake
  ground truth + detection scoreboard.
- Contamination selector (0/20/40/60%) drives data.stores.contaminated_stores.
- LIVE Claude: sub-agents run on claude-opus-4-8 when ANTHROPIC_API_KEY is set
  (loaded from .env with override=True so an empty shell var can't force mock mode).
- Server: /api/run?level=L, cache per level, background --warm of all levels.
- Every agent step is @Traced -> shows up in Weave.

Co-authored-by: Cursor <cursoragent@cursor.com>
The real backend has ONE blue master agent (blue/concierge_agent.py) that both
dispatches the isolated scouts and adjudicates them — there is no separate planner.
Relabel both flow nodes as the Concierge across its two phases (① dispatch / ②
adjudicate) instead of two distinct agents.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a "shopping for" category control so each run audits sellers of ONE product
type (default Beauty: CeraVe vs LumeGlow), giving a concrete buyer question
("trustworthy daily skincare moisturizer under $20") instead of a general
mixed-marketplace prompt. Category sets the question + budget + vertical; "All"
keeps the full marketplace view. Server caches per (level, category) and warms
the common selector paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Ignore red/mock_merchant_data/ (regenerable red-team output, shouldn't be versioned).
- Track prompts/generate_dock_scenario.claude.md so the scenario prompt is on cloud.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant