Back to blog

Computer Use Architecture Diagram: AI Agents That Control Browsers & Desktops (2026)

How to diagram computer use AI systems. Covers the perception-action loop, browser automation agents, screen capture pipelines, vision models, safety guardrails, and Claude computer use architecture.

R
Ryan·Senior AI Engineer
·

Computer use refers to AI systems that can perceive and interact with graphical user interfaces — web browsers, desktop applications, and operating systems — the same way a human would: by looking at the screen, deciding what to click or type, and observing the result. A computer use architecture diagram visualizes the perception-action loop, the sandboxed execution environment, the vision model integration, and the safety guardrails that govern what the agent can do without human confirmation.

Computer use represents a fundamental shift in automation architecture: instead of integrating with APIs, these agents interact with software at the UI layer — which means they can automate any application that exists, regardless of whether an API or SDK is available. This guide covers how these systems are structured, the key architectural components, and prompt templates for diagramming your computer use system in ArchitectureDiagram.ai.

Core components of a computer use architecture

The perception-action loop

All computer use systems share the same fundamental loop: the agent takes a screenshot of the current screen state → a vision model analyzes the image and decides what action to take → an action executor sends the action (click, type, scroll, keypress) to the desktop or browser → the loop repeats until the task is complete or a stop condition is reached. This loop is the core architectural unit. In your diagram, show it as a cycle with explicit labels for each step: observe → reason → act → repeat.

Sandboxed execution environment

Computer use agents must run in a sandboxed environment to prevent accidents and contain the blast radius of errors. Common sandboxing approaches:

  • Docker container with virtual display: A Linux container running a virtual framebuffer (Xvfb) and a full browser (Chromium). The agent interacts with the virtual display; nothing touches the host OS. Most common for browser-based agents.
  • Virtual machine: Full VM isolation via QEMU, VMware, or cloud VM instances. Higher isolation overhead but required for desktop application automation or Windows-specific tasks.
  • Browser sandbox (CDP): Using Chrome DevTools Protocol directly without a full display stack. Faster and more efficient but limited to browser interactions only. Used by Playwright-based agents.
  • Cloud desktop services: Managed sandboxed desktop environments (E2B Desktop, Browserbase, Anchovy) that handle VM lifecycle, screenshots, and action execution as a service.

Vision model

The vision model is the brain of a computer use agent. It receives a screenshot (often annotated with a grid or coordinate overlay) and outputs a structured action: click at (x, y), type text, press key, scroll by delta, or stop (task complete). Claude claude-sonnet-4-6 with computer use enabled is the most capable model for this task in 2026. The model must simultaneously understand UI layout, read text on screen, reason about what step to take next, and produce precise coordinate actions — a challenging combination that makes multimodal reasoning quality the most important factor in agent reliability.

Action executor

The action executor translates model outputs into real UI interactions. For browser agents, this is typically Playwright or Puppeteer executing CDP commands. For desktop agents, this is xdotool or pyautogui. The action executor is also responsible for taking the next screenshot after each action to feed back into the loop. Your diagram should show the action executor as a distinct component between the model and the sandboxed environment — it is an important security boundary, since it controls what the agent can actually do.

Safety guardrails layer

Computer use agents can cause real-world harm: deleting files, sending emails, making purchases, submitting forms. A safety guardrails layer sits between the model's proposed action and the action executor, reviewing each proposed action against a policy before it is executed. Common guardrail types:

  • Action allowlist/denylist: Block specific action types (e.g., file deletion, form submission to external domains) regardless of what the model proposes.
  • Domain scoping: Restrict browser agents to a specific domain or set of URLs.
  • LLM-as-judge: A separate LLM call reviews the proposed action against a safety policy and blocks high-risk actions before execution.
  • Human-in-the-loop gate: For irreversible actions, pause execution and present the proposed action to a human for approval. See the agentic AI security architecture guide for full patterns.

Observation and session recorder

Computer use agents are notoriously hard to debug without visibility. A session recorder captures every screenshot, every proposed action, every guardrail decision, and every execution result in a structured log. This is critical for: debugging failures (why did the agent click the wrong element?), auditing (what actions did the agent take in the customer's account?), and fine-tuning (which sessions succeeded vs. failed, for training data collection).

Prompt templates for computer use architecture patterns

Browser automation agent with safety guardrails

"A Claude computer use agent automates web-based data entry. The agent runs inside a Docker container with a virtual Xvfb display and Chromium browser managed by Playwright. Architecture: the orchestrator sends the agent a task (e.g., 'fill out this vendor onboarding form at vendor-portal.acme.com with these values'). The agent enters the perception-action loop: take screenshot → send to Claude claude-sonnet-4-6 with computer use tool → model returns action (click, type, scroll) → safety guardrail checks the action against a domain allowlist (only vendor-portal.acme.com) and an action denylist (no file downloads, no navigation away from the target domain) → if safe, the Playwright action executor runs the action → take next screenshot → repeat. The session recorder captures all screenshots, actions, and outcomes to S3. On task completion, the agent returns a structured result (success/failure + summary). Show the guardrail as a separate decision node in the action dispatch path."

Desktop RPA replacement agent

"A Claude computer use agent replaces a legacy RPA (UiPath) workflow for a finance team. The agent runs inside a Windows VM on Azure. It uses pyautogui for action execution and PIL/Pillow for screen capture. Task: extract invoice data from an ERP system that has no API, then copy it into a spreadsheet template. Architecture: a task queue (AWS SQS) delivers work items to the agent. The agent starts the ERP application, navigates to the invoice module using the perception-action loop, extracts data by reading screen regions, and writes the data to an Excel template using openpyxl (direct file write, no GUI needed). A HITL gate is placed before the final 'save and upload' step: the agent sends a summary of extracted data to Slack for a human to verify before committing. Session recordings are stored in Azure Blob Storage for 90 days for compliance. Show the ERP application as a black-box legacy system that the agent interacts with only via the VM screen."

AI QA testing agent

"A Claude computer use agent performs end-to-end QA testing of a web application. The agent runs in a Browserbase managed cloud browser sandbox. For each test scenario: the agent receives a natural-language test description ('sign up as a new user, complete onboarding, and verify the dashboard loads') and an expected outcome. The perception-action loop navigates the app. A separate assertion layer runs after each action: a screenshot is sent to a Claude haiku model that checks whether the screen matches the expected state (semantic assertion, not pixel-perfect matching). On assertion failure, the agent captures a failure report (screenshot + action log + assertion rationale) and stops the test. On success, it proceeds to the next step. At the end, a test report is generated and posted as a GitHub PR comment via the GitHub MCP server. Show the assertion layer as a parallel check running alongside the main perception-action loop."

Computer use architecture comparison

ApproachSandbox typeBest forKey trade-off
Claude computer use + DockerContainer + XvfbWeb + desktop automationFull flexibility; infra to manage
Claude computer use + BrowserbaseManaged cloud browserBrowser-only, fast setupNo desktop apps; vendor dependency
Playwright + Claude visionCDP / headless ChromeQA testing, structured web tasksBest performance; browser only
E2B DesktopManaged Linux VMDesktop + browser, easy sandboxCost per session; VM startup latency
Legacy RPA (UiPath, AA)Windows robot processExisting RPA workflowsFragile selectors; not AI-adaptive

Frequently asked questions

What is computer use in AI?

Computer use refers to the ability of an AI model to interact with graphical user interfaces — clicking, typing, scrolling, and reading screen content — to complete tasks in any application, without needing a dedicated API. Anthropic introduced computer use capabilities in Claude claude-sonnet-4-6 in late 2024. Unlike traditional RPA tools that rely on brittle element selectors or recorded macros, Claude computer use understands the semantic meaning of what it sees on screen and can adapt to UI changes, error states, and unexpected screens in real time.

How is a computer use agent different from a Playwright or Selenium script?

A Playwright or Selenium script uses deterministic element selectors (CSS, XPath, text matches) to interact with a browser — it does not "see" the screen, it reads the DOM. A computer use agent takes a screenshot and uses vision to decide where to click, treating the UI as a visual artifact rather than a structured document. This makes computer use agents far more robust to UI changes and capable of handling applications without accessible HTML (e.g., legacy desktop apps, Flash embeds, canvas-based UIs). The trade-off is speed and reliability: DOM-based automation is faster and more precise for well-structured web apps; computer use is better for unstructured or visual-first interfaces.

What safety measures does a computer use agent need?

At minimum: a sandboxed execution environment that isolates the agent from the host system, an action guardrail that restricts what domains and action types are allowed, and human-in-the-loop gates before irreversible actions (form submissions, file writes, financial transactions). For enterprise deployments, add a session recorder for audit trails, rate limiting to prevent runaway loops, and network egress filtering to prevent the agent from exfiltrating data to unexpected destinations.

Related guides: agentic AI security architecture, Claude Agent SDK architecture, AI agent architecture diagrams, zero-trust architecture diagrams, and MCP architecture diagrams.

Ready to try it yourself?

Start Creating - Free