Vantage documentation

Agent use

Operational guide for software agents controlling Vantage. Discover first, choose the narrowest primitive, preserve runtime IDs and generation-scoped refs, and recover from explicit errors instead of guessing.

Command map

CommandPurposeNext
vant agent statusEndpoint livenessversion → capabilities
vant agent versionBrowser/protocol versionCheck compatibility
vant agent capabilitiesDiscover methods/featuresdescribe exact schema
vant agent tabsLive tabs and IDsSelect explicit tab
vant agent open URL [TAB]NavigateWait → snapshot
vant agent snapshot TABSemantic controls/refsInteract with returned ref
vant agent click REF TABClick controlWait/resnapshot
vant agent fill REF TEXT TABReplace editable valueResnapshot
vant agent js SCRIPT TABPage-JS escape hatchPrefer semantics normally
vant agent fetch URL [JSON]Direct HTTP/APIInspect status/body
vant agent call METHOD JSONComplete RPC surfaceFollow describe

status, version, capabilities

Start here. Protocol 1 is stable but additive, so discovery is authoritative.

vant agent status
vant agent version
vant agent capabilities
vant agent call describe '{}'
vant agent call describe '{"name":"page.interact"}'
vant agent call describe '{"name":"net.fetch"}'

tabs + open

Tab/window IDs live only as long as their object and are never rebound after closure. Navigation is asynchronous; use state-based waits.

vant agent tabs
vant agent open https://example.com 1
vant agent call page.wait '{"tab_id":1,"text":"Example Domain","timeout_ms":5000}'

snapshot, click, fill

Refs such as @e8_2 are generation-scoped, not durable selectors. Normal loop: snapshot → choose ref → interact → wait → snapshot. On stale_or_missing, observe again; never invent a ref.

vant agent snapshot 1
vant agent click @e8_2 1
vant agent snapshot 1
vant agent fill @e9_4 'agent@example.com' 1

fetch

Application-side HTTP: no page CORS and no implicit browser cookies. Supply API authorization explicitly.

vant agent fetch https://api.example.com/v1/items
vant agent fetch https://api.example.com/v1/items '{"method":"POST","headers":{"Content-Type":"application/json"},"body":"{\"name\":\"demo\"}"}'

js

Use for exceptional DOM computation/page-origin behavior; prefer semantic primitives for routine operation.

vant agent js 'document.title' 1
vant agent js 'JSON.stringify({href:location.href,lang:document.documentElement.lang})' 1

call

Every non-convenience method remains reachable through the generic RPC client.

vant agent call page.inspect '{"tab_id":1}'
vant agent call page.diagnostics '{"tab_id":1}'
vant agent call events.since '{"after":0}'

Preferred abstraction order

API/HTTP resource          -> net.fetch
Browser/tab lifecycle      -> browser.*
Routine DOM operation      -> page.snapshot + page.interact
Wait for observable state  -> page.wait
Read content/metadata      -> page.inspect
Rendered evidence          -> page.screenshot
Debug page behavior        -> page.diagnostics
Exceptional DOM logic      -> page.javascript
WebKit properties/state    -> webkit.*
Async lifecycle changes    -> events.*

Error recovery

ErrorRecovery
not_foundRefresh runtime topology.
stale_or_missingSnapshot/re-identify.
timeoutInspect diagnostics/load state.
method_not_foundRefresh capabilities.
fetch_errorTransport failure; 4xx/5xx is instead a normal ok:false result.

Deep reference