**Make websites learnable by agents.**
Our mission is to turn websites into capabilities that agents discover, verify, reuse and
maintain themselves. The calling agent supplies the reasoning; chrome-agent preserves the
discovered knowledge and its validation evidence. Shared recipes will have a GitHub catalogue
with automated validation and updates, starting with reading and extraction. Recipes that modify
a site will follow later. Local and private recipes will use the same lifecycle.
Today, chrome-agent provides the execution foundation: a 3 MB Rust binary over CDP, browser
observations, assertions, structured outputs and local macros. It reports retained values,
intercepted clicks and missing observations so the calling agent can check what happened.
The repository now includes a [persistent discovery protocol](docs/discovery.md): the calling
agent records experiments, resumes them across processes and exports local candidate macros.
Autonomous discovery without a supplied procedure and independent recipe acceptance remain M1
and later roadmap gates; there is no public catalogue yet.
Read the [mission](docs/mission.md) and [implementation roadmap](docs/roadmap.md).
> Independent project. Not affiliated with, endorsed by, or sponsored by Google or the Chrome team.
## Install
```bash
npx skills add sderosiaux/chrome-agent # skill file + binary, for coding agents
npm install -g chrome-agent # prebuilt binary
cargo install chrome-agent # from source
```
Linux builds are static musl binaries, so they run on any distro without a glibc version to match.
## 60-second quickstart
```bash
# Navigate and read the page as an accessibility tree with stable uids
chrome-agent goto https://example.com --inspect
# uid=n9 heading "Example Domain" level=1
# uid=n12 link "More information..."
# Act by uid, by CSS selector, or by coordinates
chrome-agent click n12 --inspect
chrome-agent click --selector "button.submit"
chrome-agent click --xy 100,200
# Fill and check what the page kept
chrome-agent fill --uid n20 "user@test.com"
chrome-agent assert value --uid n20 --equals "user@test.com"
# Get content, not markup
chrome-agent read
chrome-agent extract --limit 30
chrome-agent text --selector "main" --truncate 500
# Everything is available as JSON
chrome-agent --json eval "document.title"
```
Chrome stays alive between invocations, so a command costs a connection, not a browser launch.
Use `--browser ` to give each parallel agent its own Chrome and its own session state.
## Commands
### Navigation and session
| Command | What it does |
|---|---|
| `goto [--inspect] [--max-depth N] [--header "K: V"]` | Navigate. Auto-prefixes `https://`. Reports `landed` (see below). `--header` is repeatable. |
| `back [--inspect]` | History back. Answers `url` and `title`, or a message when there is nowhere to go. |
| `forward [--inspect]` | History forward. Same answer, opposite sign. |
| `history [--filter pattern]` | Pages this browser visited. |
| `tabs` | List open tabs. |
| `status` | Browsers the session store knows, their pids, and running ones no entry claims (`orphan=`). |
| `close [--purge] [--orphans]` | Stop the browser. `--purge` deletes cookies and profile. `--orphans` closes unclaimed browsers. |
### Reading the page
| Command | What it does |
|---|---|
| `inspect [--verbose] [--max-depth N] [--uid nN] [--filter "role,role"] [--scroll] [--limit N] [--urls] [--max-chars N] [--offset K]` | Accessibility tree with uids. `--urls` resolves link hrefs. Narrowing flags change what is PRINTED; the stored baseline is always the full tree. |
| `diff` | What changed since the last inspect, compared against that full baseline. |
| `text [uid] [--selector "css"] [--truncate N]` | Visible text of the page or one element. |
| `read [--html] [--truncate N]` | Article extraction via Mozilla Readability. |
| `extract [--selector "css"] [--limit N] [--scroll] [--a11y]` | Auto-detect repeating records (products, feeds, search results). No selectors needed. `--a11y` for React SPAs. |
| `eval [--selector "css"]` | JS in page context. `el` is the matched element. |
| `screenshot [--filename name] [--format jpeg\|png] [--quality N] [--max-width N] [--uid nN\|--selector "css"]` | Screenshot to a file path. `--uid`/`--selector` clip to one element. |
| `pdf [--filename name] [--landscape] [--background]` | Print the page to PDF. |
| `download [--out path] [--timeout N] [--max-bytes N]` | Fetch in-page so cookies and auth carry over. Also `download --uid nN` / `--selector "css"` to click and capture a browser-native download. |
### Acting
| Command | What it does |
|---|---|
| `click [--selector "css"] [--xy X,Y] [--inspect]` | Click. Falls back to JS `.click()` when there is no box model. |
| `dblclick ` | Double-click, same three targeting modes. |
| `fill --uid [--secret] [--inspect]` | Fill an input. Also `--selector "css"`. Reports what the page kept; `--secret` reports only its length. |
| `fill-form ...` | Fill several fields, one kept-value report per field. |
| `select --uid ` | Pick a `