What is agent-browser?
agent-browser is a command-line browser automation tool for agents and shell workflows. It provides browser actions and observations through a CLI. Remote Browser supplies the separate browser process, account state, and runtime access that those commands operate on.
The official repository documents a CDP mode for an existing browser, including remote WebSocket endpoints. Treat the CLI session and hosted browser allocation as separate lifetimes.
Why run the CLI against remote Chromium?
This pairing is useful when a coding agent already works through shell tools but its browser should run independently. A remote allocation can outlive a short command or worker if the service policy permits it. A human can observe the intended runtime through its viewer rather than trying to reproduce an agent's local environment.
Choose a session ownership rule before adding several workers. A single command interface does not prevent two jobs from navigating the same tab or using the wrong account.
Quick start
Install a pinned agent-browser version using the upstream instructions. Create a dedicated Remote Browser session and set REMOTE_BROWSER_CDP_URL securely. With the CLI on your PATH, a small verification workflow is:
agent-browser --cdp "$REMOTE_BROWSER_CDP_URL" open https://example.com
agent-browser --cdp "$REMOTE_BROWSER_CDP_URL" snapshotCheck that the expected page is visible in the intended browser allocation. Start with public, read-only navigation before adding account state or actions that change a website. The endpoint may contain credentials; avoid command tracing and shared command logs.
Connection methods and session state
The remote path uses a full CDP WebSocket URL. Upstream also documents local port attachment, but a local port is not a remote service endpoint. Supply the explicit destination when a worker could otherwise attach to a different browser.
Do not confuse a CLI session name with a saved website login. The browser's context and profile hold account state, while the CLI tracks its connection and command workflow. Reinspect the page after reconnecting: a previous command might have completed before its response was lost.
Use cases
- Coding agents that inspect a deployed UI through command output.
- Shell-based smoke checks against an authorized application account.
- Cloud development workers that share a clearly owned remote browser.
- Repeatable navigation tasks with an explicit confirmation condition.
Record the target page, task result, and allocation identifier without copying the credential-bearing endpoint into reports. Release the browser through the runtime's documented lifecycle after the workflow finishes.
FAQ
Is agent-browser itself the hosted browser service?
The CLI controls a browser. The runtime service allocates and operates it. Evaluate each layer independently.
Can several tasks reuse one login?
They can be designed around an authorized profile, but simultaneous writers need coordination. Prefer separate allocations and explicit account ownership for independent jobs.
Is CDP attachment a full agent benchmark?
No. Connection timing excludes prompt processing, tool selection, most page interactions, and task verification. Use fixed command sequences for a CLI comparison and publish failures beside timing results.