chrome-agent
What It Is
chrome-agent is Corey Gallon's open source Python CLI for letting AI agents observe and interact with Chrome through the Chrome DevTools Protocol (CDP). It connects directly to a running browser rather than presenting a separate browser abstraction layer.
Why It Matters At World's Fair
chrome-agent is named in The Dark Arts of Web Automation as the tool Corey Gallon uses to make browser work programmatic. In the context of the talk, it represents a broader pattern: use CDP-level browser control to turn repeated web workflows into scripts instead of prompting an agent through every click.
Important Capabilities
- Direct CDP commands and event subscriptions against a running Chrome or Chromium instance.
- Browser launch, status, navigation, JavaScript evaluation, screenshots, and live protocol help.
- Multiple human and agent participants with isolated event subscriptions.
- One-shot commands for scripts and persistent event streams for longer-running observation.
- Access to the running browser's available CDP domains rather than a fixed curated browser-tool subset.
How To Use It
Install the Python CLI with uv tool install chrome-agent, then launch an isolated Chrome instance. The instance name is the address used for all later CDP commands.
# Start an isolated, CDP-enabled browser.
chrome-agent launch
# Inspect available instances and page targets.
chrome-agent status
# Navigate and read an exact value from the page.
chrome-agent myproject-01 Page.navigate '{"url":"https://example.com"}'
chrome-agent myproject-01 Runtime.evaluate '{"expression":"document.title","returnByValue":true}'
# Discover the protocol supported by this running Chrome.
chrome-agent help myproject-01 Page.navigate
# Shut down the isolated instance when the work is complete.
chrome-agent stop myproject-01
For event-driven debugging, keep an attach process running while another process drives the page. The observer receives JSON lines only for the events it subscribed to.
chrome-agent attach myproject-01 +Page.loadEventFired +Network.requestWillBeSent > /tmp/chrome-agent-events.jsonl &
chrome-agent myproject-01 Page.navigate '{"url":"https://example.com"}'
Effective Use Cases
| Situation | Useful approach | Why this tool fits |
|---|---|---|
| Debug a web app against a real Chrome | Use Runtime.evaluate, Network, and Log commands against one named instance. | The CLI forwards arbitrary CDP methods instead of limiting work to a small browser-tool surface. |
| Observe a workflow while a human or another agent drives it | Run attach with narrow Page or Network subscriptions. | Each participant has an isolated event subscription, avoiding a shared noisy stream. |
| Turn a repeated browser check into a script | Use one-shot commands for navigation, evaluation, screenshots, and direct protocol calls. | The command interface is stable while the exact supported CDP surface comes from the running browser. |
| Operate a UI that ignores a synthetic DOM click | Locate coordinates, dispatch paired Input.dispatchMouseEvent press and release events, then observe the result. | Input-domain events go through Chrome's native input pipeline. |
| Investigate a SPA or network-backed page | Wait on a Page event or observable page condition, then observe the actual request rather than guessing endpoints. | Persistent event streaming exposes browser-observed navigation and network consequences. |
Operating Tricks And Guardrails
- Ask the live browser for the command signature with
chrome-agent help <instance> Domain.methodbefore using a less familiar or newly added CDP capability; its protocol schema is more current than a static command list. - Use a sense-act-sense loop: inspect DOM, accessibility, runtime, or network state; act; then confirm an observable effect. A successful command response alone is not proof the UI changed.
- Prefer
--urlor a target-id prefix when more than one tab is open. Numeric target positions can change as tabs are added or removed. - Avoid fixed sleeps after navigation. Wait for
Page.loadEventFired,document.readyState, or the element/state that establishes page readiness. - Keep credentialed work within accounts and systems you are authorized to access. Use an isolated browser profile by default; do not treat CDP access as permission to extract credentials or bypass site controls.
- Use
cleanupafter interrupted headless runs to remove stale instance records.
Alternative Implementation
sderosiaux/chrome-agent is an independent Rust browser-agent CLI that also works through Chrome DevTools Protocol. It is not Corey Gallon's work and is not evidence for his scheduled session. See the implementation delta for the project identities, technical differences, and source boundary.
Related Scheduled Sessions
- 2026 06 30 corey gallon the dark arts of web automation teaching agents to use websites like humans — The Dark Arts of Web Automation: Teaching Agents to Use Websites Like Humans (Computer Use / Track 7)
Related Pages
- corey gallon
- rexmore
- agentic web
- ai sandboxes
- sderosiaux chrome agent
- chrome agent implementation delta
Public Sources
Evidence Boundary
The official schedule confirms the talk and describes chrome-agent as the tool being demonstrated. The repository and PyPI package are supporting technical context for the tool's implementation and capabilities; they do not substitute for a recording of the scheduled session.