> ## Documentation Index
> Fetch the complete documentation index at: https://gologin.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Browser CLI: Local Runtime

> Run local Gologin Orbita profiles with gologin-agent-browser --runtime local. It replaces the separate Local Agent Browser CLI.

> [!NOTE]
>
> Local Agent Browser CLI is now part of [Agent Browser CLI](https://gologin.com/docs/cli-tools/agent-browser.md). The `gologin-local-agent-browser-cli` npm package is deprecated: install `gologin-agent-browser-cli` and use `--runtime local`. Scripts that call `gologin-local-agent-browser` keep working, see [Migrate from Local Agent Browser CLI](#migrate-from-local-agent-browser-cli).

Agent Browser CLI has two runtimes with the same commands. The `cloud` runtime runs sessions in Gologin Cloud Browser. The `local` runtime runs them in Orbita, the Gologin browser, on your own machine. This page covers the local runtime. Snapshots, refs and other commands work as described on the [Agent Browser CLI](https://gologin.com/docs/cli-tools/agent-browser.md) page.

***

## When to use local vs cloud

| Use `local` for | Use `cloud` for |
| - | - |
| Profile warmup | Many sessions in parallel |
| First logins and checks you pass by hand | Remote browser sessions |
| Reusing a profile's local state and cookies | Machines that shouldn't run Orbita |
| Matching the browser to your computer's OS | Temporary profiles, no profile ID needed |
| Runbooks and batch jobs across profiles | Screenshots and PDFs from a remote browser |

***

## Requirements

* Node.js 20 or later. The local runtime starts Orbita through the Gologin Node.js SDK, which needs Node.js 20.
* A Gologin API token in `GOLOGIN_TOKEN`. See [Get a token](https://gologin.com/docs/cli-tools/agent-browser.md#get-a-token).
* A profile ID for every session. Unlike the cloud runtime, the local runtime doesn't create temporary profiles.
* Orbita. If it isn't installed yet, the Gologin SDK downloads it to `~/.gologin/browser` on first launch. If Orbita is somewhere else, set `GOLOGIN_EXECUTABLE_PATH`.

***

## Install

```bash theme={null}
npm install -g gologin-agent-browser-cli
```

The package installs two commands:

* `gologin-agent-browser` runs browser sessions in the cloud unless you choose local.
* `gologin-local-agent-browser` is a compatibility alias that runs commands in the local runtime.

***

## Choose the local runtime

Pass `--runtime local` to a command, or set the runtime once for the whole shell:

```bash theme={null}
# one command
gologin-agent-browser open https://example.com --runtime local --profile your_profile_id

# every command in this shell
export GOLOGIN_AGENT_BROWSER_RUNTIME=local
```

`--local` and a leading `local` work too: `gologin-agent-browser local open https://example.com --profile your_profile_id`.

> [!WARNING]
>
> Session commands such as `snapshot`, `click` and `close` go to the cloud runtime unless you choose local. After you open a local session, pass `--runtime local` to every command that follows, or set `GOLOGIN_AGENT_BROWSER_RUNTIME=local`.

| `--runtime` | What it does |
| - | - |
| `local` | Browser and profile commands run in local Orbita |
| `cloud` | Browser commands run in Gologin Cloud Browser |
| `auto` (default) | Profile, runbook and job commands run locally, everything else in the cloud |

Gologin API commands such as `api`, `browser` and `proxy` always call the API directly, whatever the runtime.

***

## Environment variables

| Variable | Description |
| - | - |
| `GOLOGIN_TOKEN` | Gologin API token. Required for `open` and profile commands |
| `GOLOGIN_PROFILE_ID` | Default profile ID |
| `GOLOGIN_AGENT_BROWSER_RUNTIME` | Default runtime: `cloud`, `local` or `auto` |
| `GOLOGIN_EXECUTABLE_PATH` | Path to the Orbita executable, if it isn't in `~/.gologin/browser` |
| `GOLOGIN_HEADLESS` | `true` runs Orbita without a window. Default: `false` |
| `GOLOGIN_DAEMON_PORT` | Port of the local daemon. Default: `44778` |
| `GOLOGIN_TMPDIR` | Folder for temporary profile files |

The local runtime keeps its config, profile list and job history in `~/.gologin-local-agent-browser/`, the same folder the old CLI used.

***

## Quick start

```bash theme={null}
export GOLOGIN_TOKEN='your_token'
export GOLOGIN_AGENT_BROWSER_RUNTIME=local

# open a profile in a visible Orbita window
gologin-agent-browser open https://example.com --profile your_profile_id

# or open it without a window
gologin-agent-browser open https://example.com --profile your_profile_id --headless

# read the page and act on refs
gologin-agent-browser snapshot -i
gologin-agent-browser click @e3

gologin-agent-browser screenshot ./page.png
gologin-agent-browser close
```

`--visible` (or `--headed`) and `--headless` (or `--background`) choose the window mode for one `open`. `open-visible` and `open-background` are shortcuts for them.

***

## Browser commands

Session commands are the same as in the cloud runtime: `snapshot`, `click`, `type`, `fill`, `find`, `wait`, `press`, `scroll`, `tabs`, `cookies`, `storage-export`, `eval`, `screenshot`, `pdf`, `upload` and more. See the [command reference](https://gologin.com/docs/cli-tools/agent-browser.md#full-command-reference). `back`, `forward` and `reload` work only in the cloud runtime for now.

`find` locates an element on the live page and acts on it in one step. Use it when refs go stale on dynamic pages:

```bash theme={null}
gologin-agent-browser find placeholder "Search" fill "r/programming"
gologin-agent-browser find role button click --name "Submit"
```

***

## Profile commands

These commands run in the local runtime even without `--runtime local`:

| Command | Description |
| - | - |
| `profiles` | List profiles: `--local`, `--remote` or `--all`. Filters: `--platform`, `--status`, `--tag`, `--search` |
| `profile <id>` | Show one profile |
| `profile-create <name>` | Create a profile in your Gologin account and add it to the local list |
| `profile-import <id>` | Add an existing Gologin profile to the local list |
| `profile-update <id>` | Change the template, name, tags, notes or proxy |
| `profile-sync <id>` | Refresh the local record from your Gologin account |
| `profile-delete <id>` | Remove the profile from the local list. Add `--remote` to delete it in Gologin too |

`profile-create` and `profile-update` take a use-case template and a proxy. `--proxy-country us` adds a Gologin proxy, `--proxy-host` with `--proxy-port` sets your own.

| Template | For |
| - | - |
| `linkedin` | LinkedIn lead generation or recruiting, with short warmup loops |
| `ads` (alias `facebook`) | Ad accounts that need strict isolation and a stable proxy |
| `smm` | Social media profiles shared between people, with stable cookies and storage |
| `scraping` | Repeated rendered scraping that reuses cookies |
| `geo` | Geo testing and local-market QA |

```bash theme={null}
gologin-agent-browser profile-create "LinkedIn - Sales 1" --template linkedin --proxy-country us

# check Orbita, the token, the profile and its proxy for this use case
gologin-agent-browser doctor --runtime local --use-case linkedin --check-proxy your_profile_id
```

***

## Runbooks and batch jobs

A runbook is a JSON file with a list of CLI steps:

```json theme={null}
{
  "variables": { "url": "https://www.google.com" },
  "steps": [
    { "command": "open-visible", "args": ["${url}"] },
    { "command": "wait", "args": [2000] },
    { "command": "scroll", "args": ["down", 500] },
    { "command": "wait", "args": [1500] },
    { "command": "close" }
  ]
}
```

Run it on one profile, or on many profiles in parallel:

```bash theme={null}
gologin-agent-browser run ./warmup.json --profile your_profile_id
gologin-agent-browser batch ./warmup.json --targets ./targets.json --concurrency 5 --name daily-warmup
```

`targets.json` lists the profiles:

```json theme={null}
{
  "targets": [
    { "name": "account-1", "profileId": "profile_id_1" },
    { "name": "account-2", "profileId": "profile_id_2" }
  ]
}
```

Check the results with `jobs` and `job <jobId>`. `--status` takes `running`, `ok`, `partial` or `failed`:

```bash theme={null}
gologin-agent-browser jobs --kind batch --status failed
```

***

## Migrate from Local Agent Browser CLI

```bash theme={null}
npm uninstall -g gologin-local-agent-browser-cli
npm install -g gologin-agent-browser-cli
```

* Scripts that call `gologin-local-agent-browser` keep working. The command now comes from `gologin-agent-browser-cli`.
* Profiles, config and job history in `~/.gologin-local-agent-browser/` stay where they are.
* For AI agents, install the [Agent Browser skill](https://gologin.com/docs/api-reference/ai-integrations/ai-skills.md). It covers both runtimes, and the separate Local Agent Browser skill is deprecated.

***

## Related

* [Agent Browser CLI](https://gologin.com/docs/cli-tools/agent-browser.md) — full command reference and the cloud runtime
* [Gologin Web Access CLI](https://gologin.com/docs/cli-tools/web-access.md) — scraping and browser commands in one CLI
* [AI Skills](https://gologin.com/docs/api-reference/ai-integrations/ai-skills.md) — skills for Claude Code and other agents
* [Node.js SDK](https://gologin.com/docs/api-reference/sdks/nodejs-sdk.md) — run profiles from your own code

> [card] [npm package](https://www.npmjs.com/package/gologin-agent-browser-cli)
>
> gologin-agent-browser-cli

> [card] [Source code](https://github.com/GologinLabs/agent-browser)
>
> GologinLabs/agent-browser


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.