Early bird – $50 off ProGet Pro
Blog

Agents

Computer Use vs Browser Agents vs In-App Agents

How should an AI agent operate your web app? Computer use, browser agents and in-app agents compared on cost, reliability and safety, with real benchmarks.

· Raycanvas

Computer use agents look at screenshots and move a virtual mouse, so they work on any app but are slow and costly. Browser agents read the page structure, which is cheaper and more exact. In-app agents call the app's own controls directly. That is the cheapest, most reliable path, but only apps built for it support it.

Skip the build: Agent kit is a free, MIT-licensed shadcn/ui registry item (code, not a visual component) that gives your own app the in-app path from this comparison: a UI SDK bridge, a React hook that runs a model's snapshot, act and query calls against the components on screen, and an /api/agent route. Add it with npx shadcn@latest add @panelo/agent-kit (registry setup), then change anything: the source is yours.

What are the three ways an AI agent can operate a web app?

Every agent that "uses" software has to answer two questions: what does it see, and how does it act? The three approaches answer them differently.

Approach What the agent sees How it acts Examples Works on
Computer use Screenshots of the screen Virtual mouse and keyboard Claude's computer use tool, OpenAI's Computer-Using Agent (now in ChatGPT agent) Anything on a screen
Browser agent The page's DOM or accessibility tree, sometimes screenshots Browser automation (Playwright, Chrome DevTools Protocol) Playwright MCP, Browser Use Any website
In-app agent A structured list of the app's controls and their state The controls' own API Vercel's UI SDK agent bridge, CopilotKit frontend tools Apps that expose it

There is a fourth option that sits next to these: skip the UI and give the agent your backend API as tools. That is often the right call for batch jobs. The trade-off is that the person using the app does not see anything change on screen, and every new action needs a new tool.

How does computer use work?

Computer use is a loop. The model gets a screenshot, decides on a click or keystroke, your code runs it, and the model gets a new screenshot to check the result.

Anthropic's docs describe the tool as providing "screenshot capabilities and mouse/keyboard control for autonomous desktop interaction." Your application runs every action in an environment you control. OpenAI's Computer-Using Agent works the same way: "Screenshots from the computer are added to the model's context," and it "uses a virtual mouse and keyboard to complete actions." OpenAI folded Operator into ChatGPT agent in July 2025, which also has a text browser and a terminal.

The strength is reach. Computer use does not care whether the app is a web page, a desktop program or a legacy admin screen.

The costs are real, and the vendors say so:

  • Tokens. Anthropic estimates each screenshot at "roughly 1,000–1,800 input tokens."
  • Accuracy. Anthropic notes the model "sometimes acts as if its actions succeeded without explicitly checking their results," and that small or dense UI can cause missed clicks.
  • Security. "Instructions on webpages or contained in images might override your instructions." Anthropic recommends a dedicated VM or container with minimal privileges, a domain allowlist, and "asking a human to confirm decisions that might result in meaningful real-world consequences."

How do browser agents work?

Browser agents drive a real browser, but they read the page as structure instead of pixels.

Playwright MCP is the clearest example. Its README says it lets models "interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models." Its own snapshot tool is described as "better than screenshot," and coordinate-based clicking is an opt-in vision mode.

Browser Use is an MIT-licensed open-source browser agent. Its README says the model completes a task "in a real browser by writing Python" against the Chrome DevTools Protocol, and it can use screenshots or act on accessibility-tree ids.

Browser agents are a big step up from pixels. Targets are elements, not coordinates. But the agent still has to explore: open a menu to see what is in it, scroll a table, guess which of three "Save" buttons is the right one. It also depends on how well the page is labelled. A div with an onClick and no accessible name is close to invisible.

What is an in-app agent?

An in-app agent works through an interface the app itself exposes for agents. Instead of reading the page and guessing, it gets a list of named controls, their current values, and the actions each one supports.

Vercel's UI SDK (in beta) is one way to build this. Its agent bridge turns rendered components into a snapshot like this:

{
  "ref": "c1",
  "component": "input",
  "label": "Project name",
  "value": "Apollo",
  "actions": ["setValue", "clear"]
}

And the agent acts by label:

import { createAgent } from "@ui-sdk/react/agent"

const agent = createAgent()
const page = agent.snapshot()

await agent.act({
  steps: [{ ref: "Project name", action: "setValue", args: ["Atlas"] }],
})

The docs say "the change goes through the input's API and change callback," and change callbacks receive source: "agent", so your code can tell an agent edit from a person's and cancel it.

CopilotKit offers a related idea with frontend tools, which "let the agent take actions inside your app, with your code doing the work." The difference is granularity. Frontend tools are actions you write one by one. A component-level bridge exposes every control that is already on the page.

The limit is obvious: an in-app agent only works in apps built for it. It cannot book you a flight on a site that does not expose anything.

The fiddly part of building one is the loop between a model on your server and the bridge in the browser; Panelo UI's free agent kit ships that loop as a route and a React hook.

Which approach is cheapest and most reliable?

Two public benchmarks point the same way. Both are run by vendors with a stake in the result, both use one task and a handful of runs, so treat them as directional.

Reflex, April 2026. An admin-panel task (find the customer with the most orders, accept their pending reviews, mark an order delivered). A screenshot-driven agent (Browser Use with Claude Sonnet) took a mean of 53 steps, about 17 minutes and 550,976 input tokens. An agent calling the app's event handlers as tools (also Sonnet) took 8 calls, 19.7 seconds and 12,151 input tokens.

Vercel's UI SDK repo, November 2026. A project settings task: rename a project, change visibility, change a member's role, remove a member and confirm, flip two switches, save. React results, median of three runs, every run correct:

Library Tools Tool calls Time Cost
Base UI Browser 17 53 s $0.139
Ark UI Browser 19 65 s $0.144
UI SDK Browser 17 56 s $0.140
UI SDK Agent tools 7 31 s $0.044

The repo's own summary is the important line: "With browser tools, the ui-sdk screen takes about as much as the others. The difference comes from the agent tools." The saving comes from giving the agent a structured interface, not from the component library.

When should you use each approach?

  • Use computer use for desktop software, legacy systems with no API, and workflows that cross several apps. Run it in a sandbox.
  • Use a browser agent for websites you do not control, end-to-end testing, and tasks across many third-party sites. Good labels on the target site help a lot.
  • Use an in-app agent for your own product, when you want an assistant that changes things on screen while the person watches, with approvals on risky actions.
  • Use backend API tools for bulk or background work where nobody needs to see the UI move.

Many teams will use more than one. A support team might run a browser agent against vendor portals and an in-app assistant inside their own dashboard.

How do approvals and safety differ?

All three face prompt injection, because all three read content they did not write. What differs is where you can put a gate.

With computer use and browser agents, the gate lives in the model's behaviour and your harness. OpenAI says "ChatGPT requests permission before taking actions of consequence." Anthropic recommends a human confirm consequential steps.

With an in-app agent, the app can mark the controls that need a person. In Vercel's UI SDK that is data-agent-confirm="Charges $20 to your card for 1,000 credits" on the button, plus an allow callback that asks. Without allow, the step fails with "Needs a person." We cover the UI side of this in human-in-the-loop approval UI.

Can browser agents use an in-app interface?

Yes, where the browser supports it. Vercel's UI SDK has registerTools, which "exposes snapshot, act, and query through the browser's document.modelContext API," the WebMCP proposal. In a browser without it, the docs say "registerTools does nothing." So a browser agent visiting an app built this way could use the structured tools instead of reading the DOM. See WebMCP in React with UI SDK.

Where does Panelo UI fit?

Panelo UI is a set of shadcn/ui dashboard components built on Vercel's UI SDK, so an in-app agent can read and operate them. Its free agent-kit runs the model on your server and runs snapshot and act in the browser against the components on screen, with confirm-first controls handled through an approval prompt. You can try it on the live agent demo or browse the components. For the wider picture, read what agent-ready UI means.

Get this working in your app

Add the Panelo registry to components.json:

"registries": {
  "@panelo": "https://www.paneloui.com/r/{name}.json"
}

Then install the kit:

npx shadcn@latest add @panelo/agent-kit

You get components/panelo-ui/lib/agent.ts (the bridge), components/panelo-ui/hooks/use-agent-chat.ts (the useAgentChat hook) and app/api/agent/route.ts, plus the panelo-theme tokens. Set GROQ_API_KEY on your server, a free key from console.groq.com; nothing else in the kit needs a key. The bridge sees UI SDK components only, so pair it with UI SDK controls or Panelo blocks. In a client component, call useAgentChat(), render its entries (messages and a plain-words log of each step) and its confirm question, and pass the person's text to send().

The same bridge also registers its tools through WebMCP, so a browser agent that supports it gets the structured tools under the same approval rules instead of reading the DOM.

See it live: the agent demo is a dashboard an AI agent operates through Vercel's UI SDK, and it asks before anything destructive.

The Pro step: AI Automation Dashboard is the full screen from that demo: an AI workflow-automation dashboard with stat cards, an active-workflows table, a templates carousel and an Ask AI assistant panel. Panelo Pro is a one-time payment with no subscription: see plans.

FAQ

Is computer use the same as a browser agent?

No. Computer use works from screenshots with a virtual mouse and keyboard and can operate any app on a screen. A browser agent drives a browser and usually reads the page's DOM or accessibility tree.

Why are screenshot-based agents more expensive?

Each screenshot costs input tokens (Anthropic estimates roughly 1,000 to 1,800 each), and the agent needs a new one after most actions to check the result. Structured interfaces return compact text and need fewer steps.

Does the accessibility tree make browser agents as good as in-app agents?

It helps, but the UI SDK benchmark found a UI SDK screen driven with browser tools cost about the same as Base UI. The gain came from the agent tools that expose controls directly.

Can an in-app agent operate websites I do not own?

No. An in-app agent only works where the app exposes an interface for it. For third-party sites, use a browser agent or computer use.

Which approach is safest?

None is safe by default, since all read untrusted content. In-app agents let the app itself mark which controls need human approval, which is easier to audit than relying on the model to ask.

Sources