74 / COMPUTER USE · BROWSER AGENTS / TOOL / ACTION ENGINE
74 / SPECIALIZED / OBSERVE · GROUND · PLAN · ACT · VERIFY · RECOVER

COMPUTER USE
/ BROWSER AGENTS.

Computer Use / Browser Agents — capability, при которой AI-система взаимодействует с GUI/web-приложением как оператор: наблюдает текущее состояние, находит нужный элемент, выбирает действие, кликает/вводит/навигает, проверяет результат и продолжает до достижения цели.

Главный принцип: browser agent — это не «LLM с мышкой». Production-система строится как bounded observe→decide→act loop с typed actions, explicit permissions, page-state checks, idempotency, verification after each consequential step, human approval for high-risk actions and hard stop conditions.
00. ARCHITECTURAL STATUS

DEFAULT OFF: COMPUTER USE НУЖЕН ТОЛЬКО ТАМ, ГДЕ API НЕТ ИЛИ GUI — САМ ОБЪЕКТ РАБОТЫ

Manifest задаёт №74 как SPECIALIZED / DEFAULT OFF / SEPARATE COMPONENT YES. Это принципиально: GUI automation увеличивает fragility, security surface, latency и recovery complexity. Предпочтительный путь — direct API / typed tool. Computer-use включается как отдельный capability boundary, когда UI является единственным практическим интерфейсом или когда нужно работать именно с визуальным состоянием приложения.
TYPESPECIALIZEDAutonomous/semi-autonomous UI interaction.
DEFAULTOFFExplicit enable only.
ENABLE WHENNO SAFE API / GUI IS REQUIREDAnd business value exceeds fragility.
SEPARATE COMPONENTYESContained interaction runner.
LIVES INTOOL / ACTION ENGINER07 execution capability.
COMPLEXITYHIGHSecurity + state + verification + recovery.
IMPLEMENT: EXPLICITLY, NARROWLY
Минимум 80% ценности: browser sandbox/profile, strict allowed domains/apps, typed action set, screenshot + DOM/accessibility observation, stable element grounding, action preconditions, page-state fingerprint, low-risk reads first, approval gate before consequential writes, post-action verification, step/time/action budgets, secret broker/autofill instead of model-visible credentials, download/upload controls, prompt-injection defense, deterministic stop rules and full trace with screenshots/state hashes.
01A. ARCHITECTURE BOUNDARIES & OPERATIONS

EXPLICIT SYSTEM CONTRACT

A. BOUNDARY WITH NEIGHBORS

№12 Tools & Function Calling owns typed API/tool operations; use them before GUI automation whenever possible. №73 Multimodal AI owns visual/spatial perception and grounding; №74 owns the stateful observe→act computer interaction loop. №53 Sandbox owns containment of untrusted code; browser sandbox is a related but separate interaction environment with network/session/file boundaries. №49 HITL owns approval/handoff/waiting semantics; №74 invokes approval gates for high-risk UI actions. №52 Agent Security owns threat model/prompt injection; №74 applies it to webpages/screens. №68 Durable Workflow can persist long browser jobs, but does not own browser semantics.

B. PREREQUISITES / CROSS-REFERENCES

Prerequisites: №10 State Management, №12 Tools, №23 Uncertainty, №24 Clarification, №45 Verification, №46 Observability, №48 Guardrails, №49 HITL, №50 Contracts, №51 Permissions & Secrets, №52 Security, №53 Sandbox, №63 Resilience, №68 Durable Workflow, №73 Multimodal AI. Forward references: №75 Voice/Realtime, №76 Governance, №77 Production Architecture.

C. PLANE PLACEMENT

REQUEST-TIME: observe, ground, choose next action, precondition check, execute, verify, recover/stop. CONTROL PLANE: allowed sites/apps, action classes, approval policy, credential scopes, download/upload policy, max steps, model/tool eligibility. DATA PLANE: screenshots, DOM/accessibility snapshots, element refs, action events, state hashes, session/cookie refs. OFFLINE: site adapters, selectors, eval scenarios, failure corpus, replay review and policy tuning.

D. FAILURE & OPERATIONS CONTRACT

Success: intended UI state is reached and verified, not merely an action emitted. Retryable: transient navigation timeout, stale element, render delay, temporary session issue. Permanent: forbidden domain/action, permission denied, CAPTCHA requiring unsupported human flow, unexpected irreversible state, account lockout. Persist: step_id, observation refs, chosen action, preconditions, execution result, post-state, approvals, screenshots/state hashes. Idempotency: repeated clicks/submits can duplicate business effects; each consequential action needs business-level dedupe/verification.

E. WHAT THIS TOPIC DOES NOT OWN

№74 не владеет generic web research, direct HTTP/API tools, OCR/multimodal perception generally, voice sessions, credential storage, or browser vendor internals. Она владеет SAFE, STATEFUL UI INTERACTION AND ACTION EXECUTION WHEN THE COMPUTER INTERFACE ITSELF IS THE TOOL.

01. CORE LOOP

OBSERVE → INTERPRET → CHOOSE → CHECK → ACT → VERIFY → UPDATE

OBSERVEScreenshot, DOM, accessibility tree, URL, focus, downloads.
GROUNDMap goal to exact element/state.
CHOOSEOne bounded next action.
PRECHECKDomain, permission, action class, state fingerprint.
ACTClick/type/select/scroll/navigation.
WAITRender/network/condition, bounded.
VERIFYDid intended state actually occur?
UPDATE / STOPContinue, recover, ask human or finish.
Never chain ten speculative clicks from one screenshot. Production computer-use should re-observe after meaningful state changes.
02. WHY GUI IS FRAGILE

UI — НЕ СТАБИЛЬНЫЙ API CONTRACT

LAYOUT DRIFT

Button moved

Responsive design, A/B tests and redesigns change coordinates and hierarchy.

ASYNC STATE

Page still loading

Action can target a previous render while SPA state changes underneath.

AMBIGUOUS LABELS

Two “Continue” buttons

Visual/semantic grounding must include container/role/state.

IRREVERSIBLE EFFECT

Click can buy/send/delete

GUI action often maps directly to real-world side effect without typed API safeguard.

SESSION STATE

Cookies / auth / modal

Same URL can show different state per session/account.

ANTI-AUTOMATION

CAPTCHA / rate limits

Website may intentionally block automation.

HIDDEN CONTEXT

Focus / hover / scroll

What is actionable depends on cursor, viewport and keyboard focus.

EXTERNAL CONTENT

Prompt injection

Page itself is untrusted input trying to influence agent.

03. API-FIRST DECISION

СНАЧАЛА ИСКАТЬ TYPED TOOL / API, ПОТОМ BROWSER

TaskPreferred pathWhy
Fetch order statusAPI / connectorStructured, deterministic, cheap, easy to verify.
Create CRM recordAPI / toolTyped fields + permissions + idempotency.
Use legacy admin UI with no APIBrowser agentGUI is only available interface.
Validate visual renderingBrowser + multimodalRendered state itself is evidence.
Click through customer-facing wizardBrowserNeed to test/operate actual UX flow.
GUI fallback should be explicit in routing: API available and sufficient → use API; else consider browser.
04. OBSERVATION STACK

SCREENSHOT ОДИН НЕ ДОЛЖЕН БЫТЬ ЕДИНСТВЕННЫМ SENSOR, ЕСЛИ ЕСТЬ STRUCTURED UI DATA

SCREENSHOT

Visual truth

What user sees: layout, dialogs, images, canvas, visual state.

DOM

Web structure

Roles, attributes, labels, hrefs and element hierarchy.

ACCESSIBILITY TREE

Semantic controls

Often cleaner source for role/name/state and keyboard interaction.

BROWSER STATE

URL / tabs / focus

Navigation, downloads, active frame, scroll, permissions and history.

Best grounding often fuses visual + structured signals. Screenshot handles canvas/rendered state; DOM/accessibility gives exact control semantics.
05. UI STATE CONTRACT

КАЖДЫЙ STEP НАЧИНАЕТСЯ С VERSIONED OBSERVATION

{
  "observation_id": "OBS-...",
  "session_id": "BRS-...",
  "url": "https://example/app/orders/42",
  "title": "Order 42",
  "screenshot_ref": "artifact://.../screen-008",
  "dom_snapshot_ref": "artifact://.../dom-008",
  "accessibility_ref": "artifact://.../ax-008",
  "viewport": {"w": 1440, "h": 900},
  "scroll": {"x": 0, "y": 812},
  "active_frame": "top",
  "state_hash": "sha256:...",
  "captured_at": "..."
}
WHY OBSERVATION ID

Action binds to a known state

  • planner says what it saw;
  • executor checks state is still compatible;
  • trace reconstructs why action happened;
  • stale observations can be rejected;
  • verification compares before/after.
06. ELEMENT GROUNDING

НЕ «КЛИКНИ СИНИЮ КНОПКУ», А НАЙДИ STABLE TARGET

ROLE + NAME

button “Save”

Semantic accessibility/DOM target where unique.

CONTAINER

Inside “Billing” dialog

Disambiguates repeated labels.

STATE

Enabled / selected / checked

Avoid acting on disabled/stale hidden controls.

GEOMETRY

BBox

Fallback for canvas/visual controls where semantic structure is unavailable.

{
  "target": {
    "role": "button",
    "name": "Save",
    "ancestor_name": "Billing address",
    "bbox": [1120, 742, 1248, 786]
  },
  "expected_state": {
    "enabled": true,
    "visible": true
  }
}
Coordinates alone are last resort because viewport changes invalidate them. Prefer semantic selectors, then visual grounding.
07. TYPED ACTION SET

LLM НЕ ДОЛЖЕН ГЕНЕРИРОВАТЬ ПРОИЗВОЛЬНЫЕ BROWSER COMMANDS

NAVIGATE

Open allowed URL

URL/domain policy validated before navigation.

CLICK

Activate target

Element ref + expected precondition + action class.

TYPE

Input text

Field target + text source/classification; secret text supplied by broker.

SELECT

Dropdown/list choice

Prefer semantic option values over coordinate clicks.

SCROLL

Viewport move

Bounded relative/element-targeted scroll.

UPLOAD

Attach approved file

File ref from Artifact Store, not arbitrary local filesystem path.

DOWNLOAD

Receive file

Captured into controlled quarantine/artifact pipeline.

SUBMIT

Consequential commit

Separate high-risk action class with approval/verification policy.

08. ACTION CONTRACT

КАЖДОЕ ACTION — TYPED COMMAND С PRECONDITIONS И EXPECTED EFFECT

{
  "action_id": "ACT-...",
  "session_id": "BRS-...",
  "based_on_observation": "OBS-008",
  "type": "click",
  "target": {
    "ref": "ui://OBS-008/el-42",
    "role": "button",
    "name": "Submit order"
  },
  "risk": "HIGH",
  "preconditions": [
    "url matches /checkout/review",
    "order_total == 124.90",
    "button.enabled == true"
  ],
  "expected_effect": {
    "state": "ORDER_CREATED"
  },
  "approval_ref": "APR-...",
  "idempotency_key": "order-submit-..."
}
EXECUTOR CHECKS

Model proposes; host authorizes

  • observation still current;
  • target still matches;
  • domain/action permitted;
  • risk class correct;
  • approval valid for exact intent;
  • business dedupe key unused;
  • budgets not exceeded.
09. RISK CLASSES

НЕ ВСЕ CLICKS РАВНЫ

CLASS
EXAMPLES
DEFAULT
VERIFY
APPROVAL
RETRY
READ
open page, scroll, inspect
allow
light
no
safe
REVERSIBLE WRITE
edit draft, set filter
policy
required
conditional
with state check
EXTERNAL COMMIT
send, publish, order
gated
strong
usually yes
dedupe/reconcile
DESTRUCTIVE
delete, revoke, cancel
blocked/gated
strong
yes
never blind
SECURITY
permissions, secrets, MFA
strict
strong
yes/human
manual policy
10. PRECONDITION CHECKS

ПЕРЕД CLICK ПРОВЕРИТЬ, ЧТО МИР ВСЁ ЕЩЁ ТАКОЙ, КАКИМ ЕГО ВИДЕЛ PLANNER

URL

Correct page

Prevent action after unexpected redirect/navigation.

ELEMENT

Same target

Role/name/container/state still match observation.

BUSINESS STATE

Total / recipient / item

Re-read consequential values immediately before commit.

AUTHORITY

Permission still valid

Approval/scope/session has not expired.

For high-risk actions, re-observe the review/confirmation page immediately before commit instead of trusting a state captured several steps earlier.
11. POST-ACTION VERIFICATION

SUCCESS = STATE CHANGED AS INTENDED, NOT “CLICK RETURNED OK”

BEFORE

Known observation + intended effect.

ACT

Click / type / submit.

VERIFY

URL changed? Success message? Record exists? Button state changed? External reference returned?

If effect is external/irreversible, verification should use strongest available channel: API/read-back/confirmation ID rather than visual toast alone.
12. IDEMPOTENCY

DOUBLE CLICK / REFRESH / RETRY МОЖЕТ СОЗДАТЬ ДВА REAL-WORLD EFFECTS

RISK

Ambiguous submit

Page times out after purchase/send; agent cannot know whether action succeeded.

READ-BACK

Reconcile first

Search order/message/activity history before retrying.

IDEMPOTENCY KEY

If app supports it

Prefer API/tool or hidden application-level operation ID over blind UI repeat.

HUMAN GATE

Unknown outcome

Escalate when duplicate cost is high and no reliable read-back exists.

№69 distributed reliability applies strongly to browser actions: ambiguous outcome → reconcile before retry.
13. FORM FILLING

ЗАПОЛНЕНИЕ FORM ДОЛЖНО БЫТЬ DATA-MAPPED, А НЕ “ПЕЧАТАЙ ПО ОЧЕРЕДИ”

FIELD MAP

Source → field

Each form field references a known input source/value and validation rule.

VALIDATE

Format / constraints

Email, date, enum, country, number, required fields checked before typing.

REVIEW

Before submit

Re-read filled form or structured DOM values; compare with intended payload.

{
  "form_intent": {
    "full_name": {"value":"...", "source":"contact://..."},
    "email": {"value":"...", "source":"contact://..."},
    "country": {"value":"LV", "source":"profile://..."}
  },
  "verification": {
    "all_required_present": true,
    "field_mismatches": []
  }
}
14. SECRET HANDLING

MODEL НЕ ДОЛЖЕН ВИДЕТЬ PASSWORD, ЕСЛИ BROWSER МОЖЕТ ПОЛУЧИТЬ ЕГО ИЗ SECRET BROKER

SECRET REF

Capability, not plaintext

Planner requests “fill credential for account X”, not actual secret value.

HOST AUTOFILL

Trusted executor

Secret injected directly into target field outside model context/logs.

SCOPE

Domain + field + TTL

Credential capability limited to expected site/account and short session.

NO SCREEN ECHO

Avoid leakage

Do not expose secret through screenshots, logs or clipboard history where possible.

№51 owns secrets. №74 consumes a narrow credential capability, not the password itself.
15. MFA / CAPTCHA

НЕКОТОРЫЕ BOUNDARIES ДОЛЖНЫ ОСТАВАТЬСЯ HUMAN HANDOFF

MFA

User / trusted authenticator

Pause workflow and request human/session completion rather than asking model to handle secrets.

CAPTCHA

Anti-automation control

Treat as explicit stop/handoff unless an authorized supported flow exists.

RESUME TOKEN

Continue safely

After human completes gate, resume from fresh observation rather than replaying old action.

Trying to “outsmart” anti-bot controls is not a reliability strategy. Product architecture should define supported handoff.
16. DOWNLOADS

DOWNLOADED FILE — UNTRUSTED ARTIFACT, НЕ “ГОТОВЫЙ INPUT”

DOWNLOAD EVENTBrowser captures file.
QUARANTINENo automatic execution/open.
VERIFYMIME/hash/size/policy.
ARTIFACT STOREStable ref.
PARSE / INSPECT№56/53 as appropriate.
USEOnly after policy permits.
Never execute downloaded scripts/macros/binaries just because a webpage told the agent to.
17. UPLOADS

AGENT НЕ ДОЛЖЕН ИМЕТЬ ПРОИЗВОЛЬНЫЙ ДОСТУП К LOCAL FILESYSTEM

APPROVED ARTIFACT REF

Explicit source

Upload command points to controlled Artifact Store object.

SITE POLICY

Where allowed

Domain/action policy specifies whether uploads are permitted.

PREVIEW / HASH

Confirm exact file

For consequential uploads, verify filename/type/hash before commit.

Model should never browse arbitrary server directories to “find the right file”.
18. SESSION ISOLATION

ONE AGENT JOB = BOUNDED BROWSER SESSION, НЕ ОБЩИЙ ВЕЧНЫЙ PROFILE

EPHEMERAL

Fresh session

Default for untrusted browsing and isolated tasks.

PERSISTENT PROFILE

Conditional

Needed for logged-in workflows; must be scoped to account/use case.

COOKIE BOUNDARY

Tenant/account isolation

No session sharing across users/tenants.

CLEANUP

End lifecycle

Tabs, temporary downloads, clipboard and transient state cleaned per policy.

19. DOMAIN ALLOWLIST

BROWSER AGENT НЕ ДОЛЖЕН БЕСКОНТРОЛЬНО ПЕРЕХОДИТЬ ПО ЛЮБЫМ LINKS

ALLOW

Expected domains

Task profile lists domains/subdomains the agent may visit.

EXTERNAL LINK

Policy check

New domain requires explicit eligibility, not page instruction.

BLOCK

Dangerous schemes/hosts

Local services, internal metadata endpoints, file schemes and forbidden domains denied.

SSRF-like risks apply even to browser agents: webpage-controlled navigation must not grant access to internal network targets.
20. WEB PROMPT INJECTION

СТРАНИЦА — ВРАЖДЕБНЫЙ DOCUMENT, КОТОРЫЙ МОЖЕТ ПРИКАЗЫВАТЬ AGENT-У ЧТО УГОДНО

VISIBLE TEXT

“Upload your secrets”

Rendered instructions are content, not authority.

HIDDEN DOM

Invisible injection

Off-screen/hidden text must not gain more trust than visible content.

TOOL BAIT

“Open internal URL”

Page cannot expand network/tool permissions.

AUTHORITY SEPARATION

Host policy wins

User/system task contract and deterministic policy remain above page content.

The browser agent must interpret page instructions only insofar as they are relevant data for the user-authorized task.
21. CONFUSED DEPUTY

AUTHENTICATED BROWSER СТАНОВИТСЯ МОЩНЫМ DEPUTY — PAGE МОЖЕТ ПОПЫТАТЬСЯ ИСПОЛЬЗОВАТЬ ЕГО AUTHORITY

AUTHORITY

Agent is logged in

Session may have access to email, CRM, cloud console or finance app.

UNTRUSTED CONTENT

Page asks for unrelated action

“To continue, open your admin portal and disable security...”

TASK SCOPE

Capability confinement

Agent may act only within explicit task/domain/action scope, regardless of page text.

Authentication does not imply authorization for every action possible in the authenticated UI.
22. HIGH-RISK APPROVAL

APPROVAL ДОЛЖЕН БЫТЬ НА EXACT INTENT, А НЕ НА “ПРОДОЛЖАЙ”

APPROVAL SUMMARY

Action:
  Submit order

Account:
  acme@example.com

Merchant:
  Example Store

Items:
  2 × ...

Total:
  124.90 EUR

Delivery:
  Riga, ...

Operation ID:
  ORDER-INTENT-...

Allowed next action:
  exactly one click on
  "Submit order"
  from review page
  matching the above values

If total/recipient/items change:
  approval invalid
  → re-approve.
№49 owns HITL state. №74 must present a human-readable diff/summary of the exact UI intent before consequential commit.
23. BUDGETS

AGENT НЕ ДОЛЖЕН “ПРОБОВАТЬ ЕЩЁ НЕМНОГО” БЕСКОНЕЧНО

MAX STEPS

Loop bound

Hard number of observe/action iterations.

MAX WALL TIME

Session timeout

Long hanging pages cannot consume indefinite capacity.

MAX WRITES

Action risk budget

Bound number of state-changing actions per run.

MAX COST

Model/browser compute

Escalation models/screenshots/retries remain within task budget.

Budget exhaustion should produce explicit NEEDS_HUMAN / FAILED_BOUNDED result, not silent continuation.
24. STOP CONDITIONS

У COMPUTER-USE НУЖНЫ DETERMINISTIC STOP RULES

ConditionAction
Goal verifiedSTOP SUCCESS.
Forbidden domain/action appearsSTOP BLOCKED.
Unexpected high-risk confirmationPAUSE FOR APPROVAL.
CAPTCHA/MFA unsupportedPAUSE / HUMAN HANDOFF.
Same state repeated N timesSTOP STUCK / RECOVER.
Max steps/time/cost reachedSTOP BUDGET_EXHAUSTED.
Unknown outcome after irreversible actionSTOP / RECONCILE, never blind repeat.
Account locked / security warningSTOP immediately.
25. STUCK DETECTION

ЕСЛИ SCREEN STATE НЕ МЕНЯЕТСЯ, НЕ НУЖНО CLICK-АТЬ ЕЩЁ 20 РАЗ

STATE HASH

Repeated observation

Same URL + DOM/AX fingerprint + screenshot similarity suggests no progress.

ACTION CYCLE

A→B→A

Detect repeated navigation/action patterns.

RECOVERY BUDGET

Few alternate attempts

Try reload/back/fresh observation only within bounded recovery policy.

Stuck detection is deterministic guardrail; do not rely on model self-awareness alone.
26. RECOVERY

RECOVERY ДОЛЖЕН НАЧИНАТЬСЯ С NEW OBSERVATION, НЕ С ПОВТОРА OLD CLICK

STALE ELEMENT

Re-ground

Take fresh DOM/AX/screenshot and locate target again.

RENDER DELAY

Wait condition

Wait for expected element/state with timeout.

SESSION EXPIRED

Re-auth / handoff

Use trusted auth flow, not arbitrary credential retry loops.

UNKNOWN WRITE

Reconcile

Check history/record before considering repeat.

27. BROWSER MEMORY / STATE

WORKING STATE ДОЛЖЕН ХРАНИТЬ FACTS О UI, А НЕ SCREENSHOTS В PROMPT FOREVER

CURRENT

Active page state

URL, task phase, important fields, current observation ref.

HISTORY

Compact step log

Actions/results and milestone observations referenced by artifact IDs.

NO IMAGE ACCUMULATION

Context control

Old screenshots stay in Artifact Store/trace, not continuously in model context.

Context Manager supplies only current/relevant UI evidence. Full trace remains outside prompt.
28. DURABLE BROWSER JOBS

ДЛИННЫЙ FLOW МОЖЕТ ЖДАТЬ EMAIL/APPROVAL/SESSION И ПРОДОЛЖАТЬ ПОЗЖЕ

WORKFLOW STARTTask + browser session policy.
BROWSER STEPSReach approval boundary.
CHECKPOINTPersist task state, not live browser process assumption.
WAITHuman/event/timer via №68.
RESUMERestore/re-auth if needed.
FRESH OBSERVEUI may have changed.
Durable workflow should persist business phase and refs, not assume a browser tab stays alive for days.
29. SITE ADAPTERS

GENERAL COMPUTER USE + SMALL DETERMINISTIC SITE ADAPTERS — ХОРОШИЙ HYBRID

GENERIC PERCEPTION

Novel pages

Model handles layout variation and unexpected UI.

SITE ADAPTER

Known stable flow

Deterministic selectors, page fingerprints, form schemas and success checks for high-volume workflow.

FALLBACK

When selector breaks

Generic grounding can recover, then adapter can be updated offline.

If same browser task runs thousands of times, move repeated knowledge from LLM reasoning into deterministic adapters.
30. COMPUTER USE + VERIFICATION

VERIFY EVERY CONSEQUENTIAL MILESTONE

VISUAL

UI state changed

Success page/banner/button state appears.

STRUCTURED

DOM / value

Input/record/status represented in structured UI state.

API READ-BACK

Strongest when available

After GUI write, use read-only API/tool to verify business record.

HUMAN

Critical ambiguity

Escalate when UI evidence cannot prove irreversible result.

Hybrid pattern is powerful: browser executes only missing write path; API verifies final business state.
31. OBSERVABILITY

TRACE ДОЛЖЕН ПОКАЗЫВАТЬ ЧТО AGENT ВИДЕЛ, ЧТО РЕШИЛ И ЧТО ИЗМЕНИЛОСЬ

SR

Task Success Rate

Goal reached and independently verified.

STP

Steps / Success

Efficiency and loop quality by site/task.

REC

Recovery Rate

Stale element/timeouts/re-ground events per run.

HITL

Approval / Handoff Rate

Human interventions by reason/risk class.

DUP

Duplicate Effect Rate

Should approach zero for external commits.

BLK

Policy Blocks

Forbidden domains/actions/injections caught.

P95

End-to-End Time

Navigation/render/model/approval/recovery total.

$

Cost / Verified Success

Model + browser + human review normalized by completed task.

Do not log raw passwords/secrets. Screenshots may contain sensitive information and need retention/access policy.
32. EVALS

BROWSER AGENT НУЖНО ТЕСТИРОВАТЬ КАК STATEFUL CONTROL SYSTEM

HAPPY PATH

Normal flow

Goal reached within expected steps.

LAYOUT VARIANTS

A/B / responsive

Different viewport, element order and labels.

ASYNC

Slow render

Delayed elements, SPA transitions and network wait.

INJECTION

Malicious page

Page tries to redirect agent outside task scope.

AMBIGUOUS COMMIT

Timeout after submit

Agent reconciles instead of double-submit.

AUTH EXPIRED

Session boundary

Correct handoff/re-auth flow.

DOWNLOAD

Malicious file

Quarantine and no auto-execution.

STOP RULES

Bounded failure

Agent stops on loops/budgets/forbidden state.

33. FAILURE INJECTION

ЛОМАТЬ PAGE STATE МЕЖДУ OBSERVE И ACT

MOVE BUTTON

Layout drift

Semantic grounding recovers; raw coordinates fail safely.

DISABLE TARGET

Precondition

Executor refuses click and re-observes.

CHANGE TOTAL

Approval invalidation

High-risk action pauses for fresh approval.

REDIRECT DOMAIN

Policy

Navigation blocked outside allowlist.

INJECT PAGE TEXT

Prompt injection

Agent ignores unrelated instructions.

DROP RESPONSE

Unknown submit

Reconcile before repeat.

EXPIRE SESSION

Auth

Handoff or trusted re-auth, not password guessing.

REPEAT SCREEN

Loop

State-hash stuck detector stops boundedly.

34. FAILURE MODES

КАК BROWSER AGENT СТАНОВИТСЯ СЛУЧАЙНЫМ ROBOTIC PROCESS AUTOMATION С БОЛЬШИМИ ПРАВАМИ

GUI BEFORE API
Fragile expensive interaction replaces stable typed tool.
API-FIRST ROUTING
COORDINATES ONLY
Responsive layout breaks target.
SEMANTIC GROUNDING
MULTI-CLICK PLAN
UI changes after first action; rest of plan becomes stale.
RE-OBSERVE
PAGE TEXT = INSTRUCTION
Prompt injection becomes tool authority.
UNTRUSTED CONTENT
MODEL SEES PASSWORD
Secret leaks through context/trace.
SECRET BROKER
BLIND RETRY SUBMIT
Duplicate order/send/delete.
RECONCILE FIRST
NO STEP BUDGET
Infinite recovery/scroll/click loops.
HARD STOP RULES
NO POST-VERIFY
Agent reports success when action had no effect.
VERIFY STATE
SHARED PROFILE
Cross-user/session leakage.
SESSION ISOLATION
35. MVP IMPLEMENTATION

ONE SITE, ONE TASK, LOW-RISK FIRST

computer_use/
├── contracts.py
├── session.py
├── observe.py
├── grounding.py
├── actions.py
├── policy.py
├── approvals.py
├── verify.py
├── recovery.py
├── downloads.py
├── metrics.py
└── evals/

MVP FLOW:

task contract
  ↓
launch isolated browser session
  ↓
allowed-domain check
  ↓
observe:
  screenshot
  accessibility tree / DOM
  URL
  ↓
model proposes ONE next action
  ↓
host validates:
  target
  state
  risk
  permissions
  budget
  ↓
execute typed action
  ↓
fresh observation
  ↓
verify intended effect
  ↓
continue / stop / human

HIGH-RISK:
  prepare exact intent
  ↓
  human approval
  ↓
  recheck page values
  ↓
  one commit action
  ↓
  reconcile + verify
80% VALUE MVP

Constrain aggressively

  • One known site/app.
  • One narrow workflow.
  • Read-only or reversible actions first.
  • Isolated browser profile.
  • Domain allowlist.
  • Screenshot + accessibility/DOM.
  • Typed action schema.
  • One action per observation.
  • Precondition check.
  • Post-action verification.
  • Hard max steps/time.
  • No raw secret in model context.
  • HITL for commit/delete/send/purchase.
  • Full trace + artifact refs.

If the same workflow is high-volume and stable, progressively replace LLM decisions with deterministic site adapters/selectors.

36. UPGRADE PATH

УСЛОЖНЯТЬ ПО ФАКТИЧЕСКИМ FAILURE CLUSTERS

Observed needUpgrade
DOM selectors break oftenFuse accessibility + visual grounding; add page adapters.
High-volume repeated taskDeterministic workflow/site adapter, LLM only for exceptions.
Long waiting flowPersist business state in №68 Durable Workflow and resume with fresh browser observation.
Many consequential actionsStronger approval summaries, API read-back verification, business idempotency ledger.
Multiple websitesPer-site policy/adapters/credential scopes, not one global unconstrained browser.
Visual-only canvas appsStronger №73 multimodal grounding + coordinate/action verification.
Realtime co-pilotIntegrate with №75 session layer, but keep action policy deterministic.
37. PRACTICAL DECISION

СТОИТ ЛИ ДЕЛАТЬ ОТДЕЛЬНЫЙ КОМПОНЕНТ?

ВопросОтвет
Стоит ли реализовывать?Только если GUI действительно нужен. Для API-доступных операций — нет.
Separate Component?YES. Contained browser/computer runner inside Tool / Action Engine.
Минимум 80% ценности?Isolated session, typed actions, screenshot+DOM/AX, semantic grounding, preconditions, post-verification, approval gates, secret broker, budgets and traces.
Когда overkill?Использовать agentic browser для CRUD, который надёжно решается одним API call.
Trigger?No suitable API, UI itself must be tested/operated, or visual state is material to task.
Как измерить uplift?Verified task success, steps/success, recovery rate, duplicate-effect rate, HITL rate, policy-block rate, latency and cost/success.
Можно ли rule/tool/code заменить LLM?Частично и желательно. Repeated stable flows should become deterministic adapters. LLM remains for visual interpretation, novel layout and exception handling.
38. DESIGN RULES

ПРАВИЛА ДЛЯ РЕАЛЬНОЙ СИСТЕМЫ

RULE 01

API first

Use browser only where UI interaction is genuinely required.

RULE 02

One action per fresh state

Re-observe after meaningful UI changes.

RULE 03

Model proposes, host authorizes

Permissions, risk and preconditions stay deterministic.

RULE 04

Ground semantically

Role/name/container before raw coordinates.

RULE 05

Verify state, not click

Success means intended business/UI effect exists.

RULE 06

Never blind-retry commits

Reconcile ambiguous external effects first.

RULE 07

Page content is untrusted

It cannot grant permissions or redirect task authority.

RULE 08

Secrets bypass model context

Use scoped credential capability/autofill.

RULE 09

Bound every loop

Steps, time, cost, writes and recovery attempts have hard limits.

39. FINAL MAP

COMPUTER USE IS A SAFETY-CRITICAL TOOL EXECUTION LOOP, NOT A GENERAL “BROWSE AROUND” CAPABILITY

TASK
  user intent
  target site/app
  allowed action classes
  data/credential scope
  risk budget
        ↓
FIRST QUESTION:

IS THERE A SAFE API / TOOL?
  YES → USE №12 TOOL
  NO  → CONSIDER №74 BROWSER
        ↓
ISOLATED BROWSER SESSION
  domain allowlist
  tenant/account isolation
  credential scope
        ↓
OBSERVE
  screenshot
  DOM
  accessibility tree
  URL
  focus / viewport
        ↓
№73 PERCEPTION / GROUNDING
  if visual interpretation needed
        ↓
ONE NEXT ACTION
  click
  type
  select
  navigate
  scroll
  upload/download
        ↓
HOST PRECHECK
  observation still current?
  target still valid?
  action allowed?
  domain allowed?
  risk class?
  budget?
  approval?
        ↓
IF HIGH-RISK:
  present exact intent
  recipient / amount / object
  ↓
  human approval
  ↓
  re-read current state
        ↓
EXECUTE
        ↓
FRESH OBSERVATION
        ↓
VERIFY EFFECT

did intended state occur?
  YES → update task state
  NO  → recover / stop
        ↓
CONTINUE UNTIL:
  goal verified
  OR policy block
  OR HITL boundary
  OR budget exhausted
  OR stuck
  OR unknown irreversible outcome

UNKNOWN COMMIT RESULT:
  NEVER BLIND RETRY
        ↓
  READ BACK / RECONCILE
        ↓
  duplicate already exists?
    yes → mark success
    no  → safe next decision
    unclear → human

SECURITY:

WEB PAGE CONTENT
  text
  image
  hidden DOM
  audio/video
  QR/link
        =
UNTRUSTED DATA

it may explain the site
but cannot:
  expand permissions
  reveal secrets
  authorize new tools
  change allowed domains
  approve purchases/deletes
  access internal network

SECRETS:

model sees:
  credential_ref

trusted host:
  injects secret into
  exact approved field

model never needs:
  plaintext password

DOWNLOADS:
  quarantine
  verify
  artifact ref
  parse safely

UPLOADS:
  approved artifact ref only

BOUNDARIES:

№12 TOOLS
  preferred deterministic API actions

№73 MULTIMODAL
  sees/understands visual state

№74 COMPUTER USE
  performs bounded UI interaction loop

№49 HITL
  approves consequential intent

№52 SECURITY
  defines injection/authority threat model

№68 DURABLE WORKFLOW
  persists long-running business process

CORE PRINCIPLE:

A BROWSER AGENT
SHOULD NOT BE
"A MODEL WITH A MOUSE."

IT SHOULD BE:

A CONTAINED EXECUTOR
WITH A CAMERA,
A SMALL ACTION SET,
A PERMISSION BOUNDARY,
A CHECKLIST BEFORE EACH MOVE,
A VERIFIER AFTER EACH MOVE,
A HUMAN GATE BEFORE DANGER,
AND A HARD STOP
WHEN THE WORLD
NO LONGER MATCHES
WHAT IT EXPECTED.

ECC RETROFIT / PRACTICAL HARNESS INTEGRATION

A. Related ECC ideas. Context-as-cache, scoped memory, lifecycle hooks, selective capabilities, feature flags, deterministic enforcement, provider-neutral adapters and eval-gated learning are applied only where relevant to №74 Computer Use / Browser Agents.

B–E. Existing boundary and placement. The existing conceptual boundary, class SPECIALIZED, default OFF and owner Tool / Action Engine remain authoritative. Runtime/control/data/offline placement is unchanged; durable state stays outside model context.

F–H. Hooks and contracts. Use bounded PRE_MODEL/POST_MODEL, PRE_TOOL/POST_TOOL, CHECKPOINT and TASK_COMPLETED events as applicable. Illustrative fields and canonical contracts are defined in NEW_CONTRACTS_SPEC.md; no universal schema is implied.

I–J. Security and evaluation. Host-side schema, permission, secret, budget, idempotency and audit checks take precedence over LLM output. Optional mechanisms require a feature flag and WITH/WITHOUT ablation; measure quality, acceptance, correction, latency, cost, escalations and severe errors.

K–L. Task profiles and cross-references. A TaskProfile selects the relevant skill, tool/context slice, memory scope and enforcement profile independently from FAST/STANDARD/DEEP. See cross-reference map, hook spec and ablation plan. Provider adapters remain outside the core.