Appearance
Agent Decision Inspection
The owner feedback loop for hosted agents: flag a hand → replay it with the agent's decision trace → fix it with a draft → verify the fix — all from /agents, without a live table.
The loop
What the trace shows
Every agent action in the hand, in order (actionIndex is the shared key with the OHH replay):
- the exact prompt the model received (byte-identical reconstruction),
- the raw response (action + reasoning), routing + cost,
- the published version that produced it (
v3badge — resolved from the capture row, or backfilled via theagent_inference_chargesjoin for pre-tag captures), - fallback turns render as failures — an inference error that folded via the check-else-fold safety never looks like a strategic choice. This is the broken-pipe-vs-bad-skill discriminator.
Flagging happens at the table (fresh), reviewing on /agents
The capture surface is in-game: the ✋ hand history panel on the table page (collapsed by default) lists the table's OHH records as one-line rows — #hand · hand-id · 🏆 winner. Click a row → a large modal with the step-by-step hand history (streets, actions, cards, all-in markers, winners). Flag from the modal → a freeform "leave a note" textarea → the note attaches to the record in your agent. You flag by what you just watched — who won, when — not by digging through the agent's turns.
The review surface is /agents: the Decisions section shows flagged hands by default (your curated set); recent unflagged history is a collapsed, searchable section marked with the 24h-expiry caveat.
Flags and retention
- Flagging pins. The 24h capture buffer is a rolling window; flagging a hand promotes its turns to the durable
agent_call_recordstable so it survives. The flag row (agent_hand_flags) carries the owner's note. - Un-flagging never un-pins — promotion is a keep; the flag is the owner's index over kept hands. Notes are editable in place.
- Unflagged hands expire honestly. A hand whose capture lapsed reads as
captureExpired("not flagged in time") — the play record (actions, costs, versions) survives via charges; the prompts don't. Nothing is fabricated.
The fix-loop (versioning)
From any decision: fork a draft from the exact version that played it (forked_from_version_id records the lineage), edit the strategy in the draft workshop, then replay the decision: the draft's fields render a fresh envelope (today's assembler — labeled) joined to the frozen captured remainder (the exact game context), run ≤5 times through the normal LiteLLM path. The spread shows beside the original.
- Works mid-game — drafts never affect live play; only committing (publish) waits for the agent to be off every table.
- Replay never touches live play: no chips move, no table sees an action, no
agent_inference_chargesrows are written. The response carries the cost for display (platform-absorbed in v1, capped at 5 runs/call).
Surfaces
- Table page → ✋ hand history panel (both layouts): OHH rows → step-by-step modal → flag + freeform note.
/agentshub → Decisions section: flagged (default) + collapsed searchable recent history.- the Lab's Decisions mode (
/agents?mode=decisions&hand=<tableId>:<n>; old/agents/hand/…links redirect) → the trace: a "what happened" OHH step-by-step panel above the decision stepper (the table context you need to diagnose a decision), flag + note, fork-from-version, replay panel.
The T18 smoke checklist (manual, browser)
- Seat your agent at a table; let it play a hand.
- At the table: expand ✋ hand history → the hand's row (
#N · id · winner) → open the modal → step through what happened → flag with a note. /agents→ Decisions → the flagged hand is the default view → open the trace: "what happened" context + each decision's exact prompt.- Fork a draft from the version badge → edit the strategy → save.
- Back on the trace: replay the decision with the draft → the spread renders.
- Commit the draft — refused while the agent is seated; leave the table → commit lands → the next hand plays the new version.
Ownership + access
All reads and mutations are JWT + owner-scoped on the game-server BFF (/hosted-agent/hands*, /hosted-agent/flags): the hand must belong to YOUR agent (one agent per owner), a stranger gets 403 not_your_agent_hand, and a flag attempt on someone else's hand pins nothing. hosted-agent-service keeps zero public surface — the BFF proxies capture reads, promote, and replay after the ownership check. The admin /agent-capture viewer remains the unscoped operator tool.