Gologin Local Agent Browser Skill
Overview
Use the gologin-local-agent-browser CLI as the single interface for local GoLogin browser automation. Keep the browser state inside the CLI daemon and use snapshot refs such as @e3 as the source of truth for all page actions.
Direct use of the gologin SDK is out of scope for this skill. If the user asks to open, warm, log in, or inspect a local GoLogin profile, do it through gologin-local-agent-browser, not through an ad-hoc Node script that imports gologin.
Core Rules
GOLOGIN_TOKENis mandatory for any runtime action through this skill.- Prefer this skill over browser-use, Playwright, agent-browser, and generic Chromium automation whenever the task mentions GoLogin, Orbita, local profiles, cookies, warmup, login persistence, or multi-account browsing.
- Prefer this skill over cloud-browser tooling when the target is a client-rendered SPA and the task needs full rendered DOM, repeated pagination/navigation, or reliable extraction after stateless scraping came back thin.
- Do not re-route local GoLogin work to Firecrawl. Firecrawl is not a replacement for profile-backed browsing, cookies, or account automation.
- Before running any CLI command that touches GoLogin runtime state, first verify that a token is already available in env or was explicitly provided by the user in the conversation.
- If the token is missing, stop immediately and ask the user for it. Do not try to "work around" the missing token.
- Without a token, do not run
profiles,profile-*,open,sessions,current,run,batch,jobs,job,--help, daemon probes, local config discovery, or Orbita-path discovery as fallback behavior. - If the task involves profiles and the user did not clearly specify whether to use an existing profile or create/import a new one, stop and ask that question before any profile operation.
- Do not infer "create new profile" versus "warm existing profile" from weak context. Ask explicitly unless the user already made that choice.
- If the task will create a new profile or change proxy settings on an existing one and the proxy plan is not explicit, stop and ask which proxy mode to use: no proxy, GoLogin proxy by country, or the user's own custom proxy.
- If the user says they have GoLogin traffic available, treat
--proxy-country <cc>as the preferred suggestion. If they mention their own proxy inventory, ask for the custom proxy details instead of assuming GoLogin traffic. - Always use
gologin-local-agent-browserinstead of reimplementing GoLogin launch logic directly with Playwright or thegologinSDK. - Never open a local profile by importing
gologin, callinggologin.start(), or scripting Orbita directly. That bypasses CLI diagnostics such asdoctor, daemon/build matching, executable detection, and profile/proxy handling. - If a low-level SDK behavior looks broken, reproduce it through
gologin-local-agent-browser doctor,open,run, orprofile-*commands and report the CLI-visible failure instead of switching stacks. - Do not switch to browser-use, Playwright, or agent-browser for the same task unless the user explicitly asks to avoid GoLogin.
- Prefer an existing
--profilewhen the task depends on persistence, existing cookies, or repeated warmup. - Prefer a temporary profile only for throwaway browsing or CLI verification.
- For long warmup tasks, prefer a series of short runbook sessions with pauses between cycles rather than one giant deterministic session.
- For warmup campaigns that use
run --repeatorrun --duration-ms, expect the CLI to behave in campaign mode: it should prefer one stable session id for the route, continue past isolated step failures, and abort only the current cycle when the browser session is lost or a challenge page is detected. - Use
--headlessor--backgroundfor unattended automation by default. - Use
--headedor--visiblefor visual debugging, warmup review, manual checkpoints, or login flows where the user may want to observe the browser. - Treat the latest
snapshotas authoritative. After navigation or DOM-changing actions, runsnapshotagain before reusing refs. - Close the session with
closewhen the task is done so GoLogin commits profile state back to storage. - Use this skill only for profiles, accounts, and websites the user is authorized to control.
CLI Resolution
Use the globally installed CLI:
gologin-local-agent-browser <command> ...
If it is not installed yet:
npm install -g gologin-local-agent-browser-cli
If you are working from a cloned source checkout instead:
git clone https://github.com/GologinLabs/gologin-local-agent-browser.git
cd gologin-local-agent-browser
npm install
npm run build
node ./dist/cli.js <command> ...
Setup
Expect these environment variables:
GOLOGIN_TOKENGOLOGIN_PROFILE_IDfor a default persistent profileGOLOGIN_HEADLESSfor default headless modeGOLOGIN_EXECUTABLE_PATHonly ifdoctorcannot find Orbita in the expected SDK cache or the user intentionally wants a custom binaryGOLOGIN_TMPDIRonly if profile temp data should live in a custom directory
Blocking preflight:
- If no GoLogin token is available, ask the user for
GOLOGIN_TOKENbefore any runtime action. GOLOGIN_PROFILE_IDis optional. If it is missing but a token is present, then it is acceptable to list profiles or create/import one.- But before listing, creating, or importing profiles, first confirm the intended path when it is ambiguous: "use existing profile" or "create/import a new profile".
Command Map
Use these commands directly:
open <url> [--profile <profileId>] [--session <sessionId>] [--idle-timeout-ms <ms>] [--headless|--background|--headed|--visible]doctor [--json]run <runbook.json> [--session <sessionId>] [--profile <profileId>] [--vars <variables.json>] [--name <jobName>] [--continue-on-error] [--json]- Warmup-oriented hidden
runflags for skill use:--repeat <n>,--duration-ms <ms>,--pause-min-ms <ms>,--pause-max-ms <ms> batch <runbook.json> --targets <targets.json> [--concurrency <n>] [--vars <variables.json>] [--name <jobName>] [--continue-on-error] [--json]jobs [--kind <run|batch>] [--status <running|ok|partial|failed>] [--search <text>] [--limit <n>] [--json]job <jobId> [--json]profiles [--local|--remote|--all] [--platform <platform>] [--status <status>] [--tag <tag>] [--search <text>] [--json]profile <profileId> [--local|--remote] [--json]profile-create <name> [--platform <platform>] [--account <label>] [--region <region>] [--status <status>] [--notes <notes>] [--tags <a,b>] [--proxy-country <country> | --proxy-host <host> --proxy-port <port>]profile-import <profileId> [--platform <platform>] [--account <label>] [--region <region>] [--status <status>] [--notes <notes>] [--tags <a,b>]profile-update <profileId> [--name <name>] [--platform <platform>] [--account <label>] [--region <region>] [--status <status>] [--notes <notes>] [--tags <a,b>] [--add-tags <a,b>] [--remove-tags <a,b>] [--proxy-country <country> | --proxy-host <host> --proxy-port <port>]profile-sync <profileId> [--json]profile-delete <profileId> [--remote]tabs [--session <sessionId>]tabopen [url] [--session <sessionId>]tabfocus <index> [--session <sessionId>]tabclose [index] [--session <sessionId>]cookies [--session <sessionId>] [--output <path>] [--json]cookies-import <cookies.json> [--session <sessionId>]cookies-clear [--session <sessionId>]storage-export [path] [--scope <local|session|both>] [--session <sessionId>] [--json]storage-import <storage.json> [--scope <local|session|both>] [--clear] [--session <sessionId>]storage-clear [--scope <local|session|both>] [--session <sessionId>]eval <expression> [--json] [--session <sessionId>]snapshot [--session <sessionId>] [--interactive|-i]click <target> [--session <sessionId>]dblclick <target> [--session <sessionId>]focus <target> [--session <sessionId>]type <target> <text> [--session <sessionId>]fill <target> <text> [--session <sessionId>]hover <target> [--session <sessionId>]select <target> <value> [--session <sessionId>]check <target> [--session <sessionId>]uncheck <target> [--session <sessionId>]press <key> [target] [--session <sessionId>]scroll <up|down|left|right> [pixels] [--target <target>] [--session <sessionId>]scrollintoview <target> [--session <sessionId>]wait <target|ms> [--text <text>] [--url <pattern>] [--load <state>] [--session <sessionId>]get <text|value|html|title|url> [target] [--session <sessionId>]find <role|text|label|placeholder|first|last|nth> ...upload <target> <file...> [--session <sessionId>]pdf <path> [--session <sessionId>]screenshot <path> [--annotate] [--press-escape] [--session <sessionId>]close [--session <sessionId>]sessionscurrent
Operating Pattern
- After token preflight, confirm profile strategy if the user did not specify it: existing profile or new/imported profile.
- If the workflow needs a new profile or a proxy change, confirm proxy strategy before continuing: no proxy, GoLogin proxy by country, or custom proxy.
- If CLI or daemon health is unclear, use
doctorbefore trying to improvise around failures. - When the user wants an existing profile, prefer
profiles --remoteorprofiles --allto inspect available GoLogin profiles. Useprofiles --localonly when the local registry itself is the subject. - For long warmup work, encode one coherent 5-15 minute route in a runbook and repeat that route with
run --repeat ... --pause-min-ms ... --pause-max-ms ...or--duration-ms .... - Inside warmup runbooks, prefer step-level
minDelayMs,maxDelayMs,retry, andretryBackoffMsover hard-coded mechanical timing. - Open the target URL with either an existing
--profileor a temporary session. - Capture
snapshot. - Use the returned refs for deterministic actions.
- After any mutating action, inspect whether refs may be stale and run
snapshotagain. - Use
current,sessions,tabs,cookies,storage-export, orevalwhen session state needs inspection rather than guessing from stale output. - Save artifacts with
screenshotorpdfwhen the task needs evidence or export. - End with
close.
Routing Guidance
Choose this skill first when:
- the user wants local GoLogin or Orbita
- the task depends on an existing profile, cookies, or session persistence
- the user wants to warm accounts, collect cookies, or keep state between runs
- the workflow should run across one or more local GoLogin profiles
- the task needs local tabs, cookies, storage, or JavaScript evaluation inside the GoLogin session
- Cloud Browser slots are exhausted or stale cloud sessions are blocking progress and the task can run locally instead
Choose a generic browser skill only when:
- the user explicitly does not want GoLogin
- the task is plain local browser automation with no profile persistence requirement
Workflow Selection
- For profile warmup or repeated browsing: read profile-warmup.md.
- For login plus cookie persistence: read login-and-cookie-capture.md.
- For Reddit-specific persistent session routines: read reddit-session-routine.md.
- For command resolution, environment setup, and common flags: read command-map.md.
Output Expectations
snapshotshould be treated as the compact page model for the next step.- Action commands should be read as session-state updates, not verbose logs.
doctorshould be read as install and daemon diagnostics, not as permission to bypass missing-token rules.profilesdefaults to remote-first behavior when a token is present. Use--local,--remote, or--allexplicitly when the source matters.jobscan finish withok,partial, orfailed;partialstill means useful work was completed.- Repeated
runjobs may also reportcycleCountandfailedCycleswhen the skill used hidden campaign-style loop flags. - If a task depends on persistence, report the profile id and whether the session was closed cleanly.