DocsAgent Renderingbrowser_observe

browser_observe

Browser Observe

Agent-native page observation. Returns the compacted OwlMark render (text-only structural view of the page), a handle table of interactive elements with stable tokens, page metadata, and a token estimate. Pass a handle token (e.g. 'b3') or 'pm:N' to browser_click/browser_type. Requires the context to be created with render_mode 'agent' or 'both'. ~20-100x fewer tokens than a screenshot for AI agent page understanding.

Usage Example

1234567891011
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.observe(
context_id=context_id
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001'). The context must have been created with render_mode 'agent' or 'both'

Optional

detailenum
minnormalfulloutline

Compaction aggressiveness. 'min': collapse boilerplate/dedup hardest. 'normal' (default). 'full': expand everything except offscreen-far buckets. 'outline': tight headings-only crop (doc header + heading outline, no body) — 5-10x cheaper for reach-and-read tasks on long references

regionstring

Filter to a specific page region: 'main', 'nav', 'header', 'footer', 'sidebar', 'article', 'form', 'dialog'. Empty = whole page

max_tokensstring

Soft token budget (0 = none). The salience scorer honors per-region guarantees so a budget never drops the only actionable control in a region

deltaboolean

Opt IN to delta-observes (default false = always full). When true, re-observing the same tab while nothing changed returns a compact @delta block (a pure speedup, losslessly reconstructable from the prior full snapshot + the delta) instead of a full render+handle table. Only enable if the consumer maintains a delta reconstructor; the default full render is the byte-stable contract every standard consumer expects

full_refreshboolean

Force a FULL snapshot even when delta=true (back-compat opt-out of the delta channel). Has no effect when delta is false, since full is already the default

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}