@browseragentprotocol/protocol and as Pydantic models in the Python SDK.
BAPSelector
A union type representing one of the 10 selector types. Used in all action and observation methods.- TypeScript
- Python
InteractiveElement
Returned byagent/observe. Represents a single interactive element on the page with a stable reference, selector, and metadata.
Stable element reference ID (e.g.,
"@e1" or "@submitBtn"). Persists across observations for
the same element.Pre-computed selector that uniquely targets this element. Use this directly in action methods.
What actions can be performed:
"clickable", "editable", "selectable", "checkable",
"expandable", "draggable", "scrollable", "submittable".Ref stability indicator:
"stable" (same element, same ref), "new" (newly discovered),
"moved" (element found but ref changed).Alternative selectors ordered by reliability: testId, role+name, css #id, text, css path.
ExecutionStep
Defines a single step in anagent/act sequence.
Pre-condition that must be met before execution. Object with
selector, state ("visible" |
"enabled" | "exists" | "hidden" | "disabled"), and optional timeout.Building Steps
- TypeScript
- Python
AgentActResult
Returned byagent/act. Contains results for each step and optional fused observations.
Results for each step in order. Each contains
step (index), success, duration, optional
result data, and optional error.AgentObserveResult
Returned byagent/observe. Contains the page snapshot.
Mapping from annotation labels to element refs and positions (if screenshot annotation was used).
AgentExtractResult
Returned byagent/extract.
ExtractionSchema
Simplified JSON Schema subset (max 2 levels deep) used byagent/extract:
Allowed Act Actions
These method names are permitted inExecutionStep.action: