Run with Browser AI · Chapter 09
Run Chapter 09: Session Lineage Laboratory
Create a stateful Prompt API session, establish shared history, clone it, diverge two branches, compare usage and destroy both resources explicitly.
← Read A Session Is Not a Stateless FunctionObserved state machine
What “built-in” means in this browser
No capability call has been made in this page yet.
- 01Not inspected
- 02Unsupported
- 03Unavailable
- 04Downloadable
- 05Downloading
- 06Available
- 07Session ready
- 08Running
- 09Completed
- 10Failed
Derived from events
Observatory measurements
Missing evidence stays missing. The dashboard never estimates an absent measurement.
Application instrumentation
Cross the boundary without erasing it
The page can validate what it sends. Extension receipt is confirmed only in the attached DevTools panel.
- 01Application SDKBuild a sanitized envelope
- 02Same-origin bridgeValidate schema and size
- 03Extension transportRoute by inspected tab
- 04DevTools panelConfirm receipt and correlate
To test end to end, load the Observatory extension, attach DevTools to this tab and enable instrumentation for this origin.
Shared lifecycle · distinct contracts
Browser AI capability switchboard
No interface has been inspected. Each check will use that interface's declared creation options.
| Interface | Global | Exposed | Availability | Options |
|---|
Canonical fixture · live task API
Summarization contract
Load the canonical fixture, then inspect the current browser.
Generated artifact
No summary yet.
Contract evaluation
- No evaluation yet.
Ranked evidence · explicit routing policy
Language routing laboratory
Choose a fixture, then inspect Language Detector.
Ranked detector evidence
| Rank | Language | Confidence | Use |
|---|---|---|---|
| No ranked candidates yet. | |||
Translated artifact
No translation yet.
Translation evaluation
- No translation evaluation yet.
Resource state · measured lineage
Session lineage laboratory
Inspect the current browser before creating a session.
Original session
Not created- ID
- —
- Parent
- None
- Usage
- —
- Quota
- —
- Remaining
- —
- Clone / destroy
- —
No output yet.
Cloned session
Not created- ID
- —
- Parent
- —
- Usage
- —
- Quota
- —
- Remaining
- —
- Clone / destroy
- —
No output yet.
Shared-history acknowledgement
No shared-history run yet.
Lifecycle invariants
- No invariants evaluated yet.
Chapter experiment
A Session Is Not a Stateless Function
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 09 and treats a Prompt API session as a measurable resource rather than a stateless completion function.
State boundary
Creation configuration, session identity and prior exchanges affect later calls. Prompt output cannot be interpreted independently of the session that produced it.
Experimental branch
The original establishes shared history before cloning. The clone receives a new identity and records the original as its parent. Different next prompts can then be compared without replaying the shared history.
Measurement boundary
The browser’s reported inputUsage and inputQuota are recorded before and after operations. Missing properties remain missing; character counts are not substituted for runtime usage.
Lifecycle boundary
Cloning and destruction are capabilities, not assumptions. Destroying a session disables future work in that lane and records the final observable snapshot and reason.
Evidence boundary
Metrics-only capture records sizes and timing, not prompt or output text. Automatic fixture checks can test narrow expected terms, while a coherent use of inherited history remains a behavioral observation.
This laboratory exposes a Prompt API session as an owned resource with identity, history, finite context, lineage and an explicit end. Establish one shared fact, clone the resulting session, then apply different interventions to the original and clone.
The reviewed replay proves that one Chrome 152 run created a clone-capable, destroy-capable session with a reported quota of 9,216. It contains no completed prompt, clone or destruction event, so those states remain unobserved until a live run produces them.