---
title: Agent J's own browser and staying signed in
nav: Browser & sign-ins
summary: Agent J installs its own browser, keeps your automation accounts signed in, checks them every morning and helps you reconnect with a phone QR card.
order: 24
---
# Agent J's own browser and staying signed in

Agent J comes with **its own browser** on your computer. Your Agent uses it for web work on sites you are signed in to — Gmail, YouTube Studio, Bilibili, Douyin, WeChat Official Accounts, WeChat Channels or any site you add. It is installed by default, you can turn it off, and if it fails to install Agent J still works: only the browser jobs wait.

[Install Agent J](/docs/install/) · [On your computer](/docs/computer/) · [Keep your computer awake](/docs/keep-awake/) · [Command reference](/docs/cli/)

## What you do: say "good morning"

You never need a browser button. Say **good morning** (or 「早上好」) to your Agent. It checks every site your automations use, then:

- signed in everywhere: a short morning brief from the real overnight reports;
- a site signed out and it supports QR sign-in (Bilibili, Douyin, WeChat Official Accounts, WeChat Channels): a **sign-in card** appears on your paired phone with only that site's QR code;
- a site that needs a password or passkey (Google, Gmail, YouTube): the sign-in page opens on your computer's screen; you sign in there.

A phone cannot scan its own screen. Show the card on another device, or long-press to save the image and open it from your photos in the site's app (not every app supports that). The card is valid for up to two minutes; tap **New QR code** when you are ready. "I scanned it" only asks the computer to look — **the computer's browser decides whether you are signed in.** Say "later" and only the work that needs that site waits.

Good morning is a sign-in check, never permission to publish. Sending mail, publishing, paying or deleting still ask on your phone.

## Give this to your Agent

Installed Agent J (0.18 or newer) does this by itself. For an existing computer, or to check it, send your Agent:

```text
Set up Agent J's own browser on this computer and tell me what is ready. Read https://agentj.app/docs/browser-automation/en.md and the agentj-browser skill. Run agentj browser status --json; if it is not ready run agentj browser setup --json (it downloads about 200 MB once and verifies it). If system libraries are missing, install them with agentj sudo and run setup again. Respect it if I turned the browser off. Then ask me which sites my automations use (suggest Gmail first), add them with agentj browser sites add, run agentj browser check --json and help me sign in to any that need it with agentj browser login <site> --wait. Never ask me for passwords, codes or QR screenshots in chat, never read or export cookies, and never send the browser's local address anywhere. Report the browser state, each site's status with the check time, and anything I still need to do.
```

## macOS

Agent J's browser runs as a LaunchAgent in your logged-in session, so it is visible on your screen and stays running while you are logged in. When the Mac sleeps or you log out it is offline — the morning check catches up once when the Mac wakes. Keep the Mac reachable with [keep awake](/docs/keep-awake/).

```bash
agentj browser setup --json
agentj browser status --json
```

## Linux

The browser runs as a `systemd --user` service next to Agent J. On a desktop it opens windows on your screen. On a server without a screen it runs headless: QR sign-ins still work from the phone; sites that need a password must be signed in once on a computer with a screen. For a server, enable lingering so it keeps running after you log out:

```bash
loginctl enable-linger "$USER"
agentj browser setup --json
```

If setup reports missing libraries (`missing_libs`), your Agent installs them through the phone password card (`agentj sudo`), then runs setup again.

Ubuntu 23.10 and newer restrict the browser's sandbox. If Google Chrome or Chromium from your system's packages is installed, Agent J uses that program with its own private profile; otherwise setup reports `sandbox_blocked` and your Agent runs `agentj browser sandbox-fix`, which asks for your approval on the phone password card and allows the sandbox for this user's Agent J browser only. Agent J never turns the sandbox off.

## Windows (WSL2)

Agent J and its browser both run inside WSL2 (Linux side), and WSLg shows the browser window on your Windows desktop. The profile stays in the Linux file system, never under `/mnt/c`. WSL1 is not supported — upgrade to WSL2 with WSLg. Agent J never uses your everyday Windows Chrome. When WSL stops or Windows sleeps, the browser is offline.

```bash
agentj browser setup --json
```

## Already running a browser for automation?

If this computer already runs a browser that automation tools connect to (for example a Chromium started with `--remote-debugging-port=9222`, signed in everywhere), Agent J does not install a second one: `agentj browser setup` finds it and asks first. Your Agent proposes it with `agentj browser adopt --endpoint http://127.0.0.1:9222` (this computer's loopback only); it takes effect when you tap "Use my existing browser" on the first-run checklist page. From then on Agent J checks and uses that browser as it is — it never starts, stops or changes it, never reads its cookies, and only opens and closes its own tabs. If it is not running, the checklist says "the browser you registered is not running". `agentj browser adopt --forget` stops using it.

Agent J's own browser is easy to tell apart from your everyday one: its window title says "Agent J 专用浏览器 · Agent J browser" and its start page is purple. When you sign in from the checklist, it comes to the front (Linux with Hyprland or X11, and macOS).

## Sites you can add

| Site | Template | How you sign in |
|---|---|---|
| Google account | `google` | On the computer (password / passkey). Makes other "Sign in with Google" sites easier, but each site may still ask for its own consent. |
| Gmail | `gmail` | On the computer. Only the signed-in state is checked; mail is never read. |
| YouTube Studio | `youtube-studio` | On the computer; channel access is confirmed separately. |
| Bilibili creator center | `bilibili` | Phone QR card |
| Douyin creator center | `douyin-creator` | Phone QR card |
| WeChat Official Account | `mp-weixin` | Phone QR card; some accounts need a fresh scan every day |
| WeChat Channels assistant | `channels-weixin` | Phone QR card |
| Any other site | `custom` | On the computer; shown as "not verified" because Agent J has no trusted check for it |

```bash
agentj browser sites add gmail
agentj browser sites add custom --origin https://shop.example.com --url https://shop.example.com/admin
agentj browser sites list --json
```

Adding a site only adds it to the daily check. It never turns on a task.

## The daily check

Every day at **08:00 your local time** (change it with `agentj config set browser.check_time 07:30`) Agent J checks each site read-only: it opens the site's fixed page in its own tab, looks only at where the page ends up, and closes that tab. It never signs in for you, refreshes cookies, clicks anything or signs you out. A computer that was asleep at 08:00 checks once when it wakes.

The daily check never sends a QR code. If a site newly needs a sign-in, you get one short note (not between 22:00 and 07:00), and your Agent helps you the next time you say good morning. Before a task, your Agent re-checks any site not confirmed in the last 15 minutes. A check says what was true at that moment; sites can still sign you out later in the day.

Statuses: **signed in** · **needs a sign-in** · **not verified** (a timeout or a changed page is never treated as signed out) · **unavailable** (no network or the browser is not running) · **off**.

```bash
agentj browser check --json
agentj browser check --site mp-weixin --if-stale --json
```

## Telegram

If you connected a Telegram bot, it gets a **text reminder** when a sign-in card is waiting — no link, no QR. A Telegram bot is not end-to-end encrypted: Telegram can read what it receives. If you also want the QR image itself there, tap **Also send QR codes to Telegram** on a sign-in card on your phone. Only you can turn this on, from the phone; your Agent can only turn it off:

```bash
agentj browser telegram-qr status
agentj browser telegram-qr off
```

## Privacy and limits

- **Your sign-ins stay on your computer.** The profile lives in Agent J's private state folder (only your user can read it). Cookies and passwords never leave the computer and never enter a chat; Agent J never imports your everyday browser's data.
- **The browser's control port listens on 127.0.0.1 only**, on a random port, and is never forwarded, tunnelled or sent to our relay. Agent J checks this on every start and stops the browser otherwise. Another program running as your own user could still use it — the private profile separates data; it is not a sandbox against your own software.
- **The QR card** contains only the cropped QR code, travels end-to-end encrypted to your paired phones, is not kept in the chat or on the phone, and is wiped after success, expiry, "Not now" or Stop everything. Our servers only see encrypted data.
- **Download**: about 200 MB, Chrome for Testing from the official source, checked byte for byte against a manifest inside the signed Agent J package (about 1.5 GB free space needed). In mainland China you can set an HTTPS mirror that serves the same bytes: `agentj config set browser.mirror https://<mirror>`; anything that does not match is discarded.
- **Off means off**: `agentj browser disable` stops the browser and the daily check and keeps your sign-ins; `agentj browser enable` turns it back on. Deleting the profile is a separate delete your Agent asks you about.
- Not yet: watching the whole browser screen live from the phone, and a native Windows browser outside WSL. Sites may still ask for extra verification; Agent J never tries to get around it.
