Cloud or local runtime
The CLI has two runtimes with the same commands. Both use Gologin profiles, fingerprints, and proxies, and a daemon keeps sessions alive across CLI calls.
Choose the runtime per command with
--runtime cloud|local|auto, or set GOLOGIN_AGENT_BROWSER_RUNTIME once:
auto), profile, runbook, and job commands run locally and everything else runs in the cloud. Once you open a local session, pass --runtime local to the commands that follow too. See Local runtime for requirements and local-only commands.
Install
Credentials
Get a token
- Sign up or log in at gologin.com
- Open API & MCP in the dashboard
- Open the API tab
- Click New Token
- Copy the generated access token
Config file
~/.gologin-agent-browser/config.json
Architecture
Two parts:gologin-agent-browserCLI — parses commands, picks the runtime, auto-starts the matching daemon, prints compact output- Persistent local daemons, one per runtime — own live browser sessions, connect to Gologin Cloud Browser or local Orbita through Playwright
connectOverCDP, keep the active page in memory, build snapshots, resolve refs, track session metadata
- Unix socket at
${TMPDIR:-/tmp}/gologin-agent-browser.sock - Localhost HTTP on
127.0.0.1:${GOLOGIN_DAEMON_PORT:-44777}
How refs work
snapshot prints a compact page view and assigns refs like @e1, @e2, @e3 to interactive elements. You act on them directly:
find is usually a better fallback than stale refs: it locates the element on the live page and acts on it in one step.
Quick start
Agent loop example
A typical AI agent loop:Full command reference
Diagnostics
Session management
Page reading
Interaction
Keyboard and scroll
Navigation
Tabs
Cookies and storage
Advanced
Profiles, proxies, and the Gologin API
These commands call the Gologin API with your token and don’t need the browser daemon.--help to any command to print its usage.
Local runtime only
profiles, profile, profile-create, profile-update, profile-import, profile-sync, profile-delete, run, batch, jobs, and job manage local profiles, runbooks, and job history. See Local runtime.
Aliases
Use cases and examples
Check if your site passes anti-detect tests
Log into a web app and extract dashboard data
Fill out a multi-step form
Take screenshots of competitor pages
Search on a site that blocks scraping
Some sites require JavaScript execution, login, or interaction before showing results. Use the browser to search:Save and restore session state
Export cookies and storage to reuse across sessions:Parallel sessions
Use explicit--session IDs for independent cloud tasks. Clean up with close --all or sessions --prune --older-than-ms.
Proxy rules
- Preconfigured profiles: proxy is set on the profile via Gologin dashboard or API, for example
proxy add-gologin <profileId> --country us - Temporary cloud profiles: no proxy, or your own proxy with
--proxy-hostand--proxy-port(plus--proxy-mode http|socks4|socks5,--proxy-user,--proxy-pass) - In the cloud runtime,
opendoesn’t accept--proxy-country. For Gologin proxy traffic from a country, add a Gologin proxy to a profile and open it with--profile - In the local runtime,
open,profile-create, andprofile-updateaccept--proxy-country
Related
- Gologin Web Access CLI — unified CLI (scraping + browser)
- Local runtime — run local Orbita profiles with this CLI
- Cloud Browser Getting Started — Puppeteer/Playwright examples
- AI Skills — plug-and-play skills for Claude Code
npm package
gologin-agent-browser-cli
Source code
GologinLabs/agent-browser