Star us

Token-efficient agent browser.

AI agents control a real browser—navigate, click, type—via ASCII wireframes. Use from MCP (Cursor, Claude) or the Vercel AI SDK.

How an agent sees a website

This is how the agent sees Hacker News — interactive elements are numbered for the AI to reference.

               [1]*  [2]Hacker News [3]new|   [4]past|  [5]comments|   [6]ask|  [7]show |  [8]jobs|  [9]submit                                                                          [10]login


               1.[11]upvote [12]Welcome (back) to Macintosh( [13]take.surf)
                       101 pointsby   [14]Udo_Schmitz [15]1 hour ago |  [16]hide|  [17]42 comments
               2.
                 [18]upvote [19]Motorola announces a partnership with GrapheneOS( [20]motorolanews.com)
                       1966 pointsby   [21]km [22]15 hours ago |  [23]hide|  [24]706 comments
               3.[25]upvote [26]British Columbia to end time changes, adopt year-round daylight time( [27]cbc.ca)
                       167 pointsby   [28]ireflect [29]1 hour ago |  [30]hide|  [31]81 comments
               4.
                 [32]upvote [33]New iPad Air, powered by M4( [34]apple.com)
                       279 pointsby   [35]Garbage [36]8 hours ago |  [37]hide|  [38]455 comments
               5.[39]upvote [40]First in-utero stem cell therapy for fetal spina bifida repair is safe: study( [41]ucdavis.edu)
                       218 pointsby   [42]gmays [43]7 hours ago |  [44]hide|  [45]38 comments
               6.
                 [46]upvote [47]Show HN: Govbase – Follow a bill from source text to news bias to social posts( [48]govbase.com)
                       125 pointsby   [49]foxfoxx [50]5 hours ago |  [51]hide|  [52]60 comments
               7.[53]upvote [54]"That Shape Had None" – A Horror of Substrate Independence (Short Fiction)( [55]starlightconvenience.net)
                       59 pointsby   [56]casmalia [57]3 hours ago |  [58]hide|  [59]10 comments
               8.
                 [60]upvote [61]Show HN: Pianoterm – Run shell commands from your Piano. A Linux CLI tool( [62]github.com/vustagc)
                       22 pointsby   [63]vustagc [64]1 hour ago |  [65]hide|  [66]5 comments
               9.[67]upvote [68]Show HN: uBlock filter list to blur all Instagram Reels( [69]gist.github.com)
                       70 pointsby   [70]shraiwi [71]2 hours ago |  [72]hide|  [73]17 comments
              10.
                 [74]upvote [75]LFortran compiles fpm( [76]lfortran.org)
                       31 pointsby   [77]wtlin [78]2 hours ago |  [79]hide|  [80]8 comments

Install

npm install @agent-browser-io/browser

Ways to use

MCP

Add the server to MCP clients (Cursor, Claude Desktop). Add to Cursor MCP config (~/.cursor/mcp.json or project .cursor/mcp.json):

{
  "mcpServers": {
    "agent-browser": {
      "command": "npx",
      "args": ["-y", "@agent-browser-io/browser", "mcp"]
    }
  }
}

Vercel AI SDK

Use createBrowserTools(browser) with generateText({ tools, ... }). sdk.vercel.ai. Call launch first, then navigate, getWireframe, etc.

import { createBrowserTools, AgentBrowser, PlaywrightBrowserBackend } from '@agent-browser-io/browser';
import { generateText, stepCountIs } from 'ai';
import { openai } from '@ai-sdk/openai';

const browser = new AgentBrowser(new PlaywrightBrowserBackend());
const tools = createBrowserTools(browser);

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  stopWhen: stepCountIs(20),
  prompt: 'Go to hackernews, visit top 3 news, and summarize their content.',
});

CLI

Interactive CLI for manual testing:

npx @agent-browser-io/browser

Or after install: agent-browser-cli.

Tools

Same in MCP and SDK.