This is the runtime path a single agent claim travels through Sentinel Mesh — from the moment it crosses the A2A wire to the moment its verified verdict becomes another fleet's immunity. Every stage is a real seam in the code, not a slide. The flow runs top to bottom, the way a claim actually moves.
Workers are real ADK agents exposed over the A2A protocol with to_a2a() and live AgentCards; the
orchestrator reaches them as a RemoteA2aAgent. The sentinel binds to ADK's non-experimental
before_tool_callback — a synchronous seam where returning a dict skips the real tool.
That single hook makes an in-path veto possible: a vetoed claim's tool never fires. The plane is a sidecar — any SQLite advisory store plus a standard ADK callback, no migration.
ExecuteInterceptor exists but is @a2a_experimental
and can't be passed through to_a2a(); we bind the production-safe callback and say so.Intercept is memory-first. If the claim is already a ✓ VERIFIED row in the ledger, it is re-served straight from memory — 0 Gemini calls, ~0.3 ms. The same claim on Run 1 cost 3 calls and 3.7 s.
This is the unit-economics inversion: verified claims cost zero to re-serve, so the cost curve bends down with usage — the opposite of a per-call guardrail that re-pays for the same judgement forever.
An unknown claim is judged two ways in parallel. A 3-lens adversarial Gemini panel on Vertex AI — robust, overreach, nevers — returns temperature-0 JSON verdicts against memory as ground truth. Independently, a deterministic regex tripwire hard-vetoes money / auth / destructive claims with no model in the loop.
Memory carries weight, not the final say: [ADVISORY] agreement supports a claim and contradiction caps it at suspicion; only a [VERIFIED] contradiction earns a veto. Paraphrase is never contradiction.
Accepted claims are written into a provenance-tracked verified ledger — its own SQLite file, separate from the advisory store, so an upstream memory-broker refresh job can never clobber a ruling. Each row carries its claim hash, evidence reference and verdict chain.
Even corrections must pass the referee: correct() is gated the same way, so the ledger only ever
accumulates adjudicated truth — never an agent's unverified say-so.
The loop closes: Run N+1 reads strictly cleaner memory. A claim flagged and corrected on Run 1 is auto-vetoed on Run 2; fleet Gemini spend drops 9 → 3 lens calls between runs. Reliability and cost improve together, with no retraining.
Herd Immunity: because the ledger is a file the fleet owns, immunity is portable. A fleet exports an HMAC-signed Trust Passport; a second fleet imports it and vetoes a lie it has never seen — re-serving the inherited fact at 0 calls. A control fleet without the passport only flags the same lie.
SENTINEL_REPLAY=1 python demo.py · SENTINEL_REPLAY=1 python demo_herd.py