Run with Browser AI · Chapter 04

Run Chapter 04: Instrument the Application

Send valid and malformed application events across the page boundary and inspect exactly what the debugger can know.

← Read From Prompt Demo to AI Debugger
Execution Not inspected
Secure contextUnknown
Top-level pageUnknown
Prompt APIUnknown
AvailabilityNot inspected

Chapter experiment

From Prompt Demo to AI Debugger

Metrics-only trace

Loading the chapter experiment…

No model output yet.
Inspect the context supplied by this chapter

What this experience knows

This experience is grounded in Chapter 04 and its explicit application-to-debugger contract.

Four planes

  • the application plane performs browser-AI work and emits sanitized semantic events;
  • the transport plane validates and moves envelopes across the extension boundary;
  • the observability plane stores, correlates, filters and displays events;
  • the control plane manages consent, capture mode, retention and destructive actions.

Trust boundary

A page-originated event is application-supplied evidence. It is not browser-attested merely because an extension accepted it. The source origin, SDK version, correlation identifiers and capture mode remain part of the envelope.

Default capture

Metrics-only mode records sizes, timings, state and outcomes without retaining prompt or response bodies. Content capture requires a separate, explicit decision.

End-to-end limit

This page can prove that it created an envelope and that the local validator accepted or rejected it. It cannot prove that an installed extension received the event. That receipt must be observed in the DevTools panel attached to the same tab.

This experience exercises the contract that turns an extension-owned prompt console into an application-aware debugger. Emit a metrics-only application event through window.postMessage, watch the local contract validator accept it, and try a malformed envelope to see it rejected.

When the Browser AI Observatory extension is loaded and instrumentation is enabled for this origin, the same valid event can continue through the installed bridge into the DevTools panel. The page deliberately cannot claim that the extension received it; confirmation belongs in DevTools.