browser_summarize_page
POST /api/execute/browser_summarize_pageGenerates a concise, structured semantic digest of the loaded web document using the configured on-device or external language model. Before prompting the model, the engine distills the live DOM into a token-efficient representation capturing the primary article narrative, section hierarchy, key facts, and available interactive controls. Advertisements, tracking pixels, and repetitive navigation chrome are stripped automatically during distillation. The resulting digest is indexed in an in-memory cache keyed by the canonical URL so repeated inspections within the same workflow return instantaneously without redundant inference latency. Passing `force_refresh=true` invalidates the cached entry and recomputes a fresh digest after Single-Page Application state mutations or AJAX updates. Downstream agents rely on this compact overview to plan actions without exhausting context limits or token budgets.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| context_id | string | yes | Session identifier of the loaded document to distill into a structured semantic digest. |
| force_refresh | boolean | no | Boolean flag bypassing the per-URL summary cache to recompute after dynamic DOM updates. |
Usage
result = await browser.summarize_page(context_id=context_id)