NewsCrawler.org

agent-browser: a Rust CLI that lets AI agents control a browser from the shell

vercel-labs/agent-browser
Image: GitHub Trending

agent-browser is a native Rust command-line tool that gives an AI agent a browser it can control one command at a time. The `snapshot` command returns the page as compact text, with a reference such as `@e1` for each element, based on the page's accessibility tree[1]. The agent acts on a reference, reads the page again to check the result, and repeats, while the browser stays open between commands.

The CLI sends each command to a background daemon that controls Chrome over the Chrome DevTools Protocol[2]. Each session gets its own daemon and browser, and by default a headless[3] browser closes after one hour without commands. References describe the page only at the time of the snapshot, so a new snapshot is needed after navigation or a DOM change.

Chrome for Testing is the default browser, but the tool can also attach to a running Chrome, use other engines, drive Mobile Safari in the iOS Simulator, or use cloud browser providers. It can be installed with npm, Homebrew, or npx. The CLI ships skills that match its version, and `agent-browser mcp` starts an MCP[4] server over stdio.

Read the original github.com

Sources

  • GitHub Trending

    vercel-labs/agent-browser

    366 stars today50,481 stars3,512 forks

First seen: Читать по-русски

Open as a page