文档Docs
Agent J 专用浏览器与登录保活Agent J's own browser and staying signed in
在本机设置 Agent J 的专用浏览器,检查哪些网站已登录,掉线时用手机登录卡重新登录。Set up Agent J’s browser on your computer, check which sites are signed in and reconnect with a phone sign-in card.
Agent J 用专用浏览器在你已登录的网站上干活,比如 Gmail、YouTube 工作室、B 站、抖音、微信公众号和视频号。Mac 和 Windows 在本机设置 Ego Lite。Linux 用系统安装的 Chrome 或 Chromium,单独保存登录资料。设置浏览器时,Agent J 的其他工作照常进行。
安装 Agent J · Agent J 主机端说明 · 让主机保持唤醒 · 命令参考
你要做的:说一声「早上好」
不需要任何浏览器按钮。跟你的 Agent 说「早上好」(或 good morning),它会检查自动化要用的每个网站:
- 都登录着:给你一份根据昨夜真实报告写的简短晨报;
- 某个支持扫码的网站掉线了(B站、抖音、公众号、视频号):已配对的手机上弹出一张登录卡,上面只有这个网站的二维码;
- 要密码或通行密钥的网站(Google、Gmail、YouTube):登录页会在Agent J 主机屏幕上打开,你在Agent J 主机前登录。
同一台手机扫不了自己的屏幕:用另一台设备显示这张卡,或长按保存图片,再在对应 App 里从相册识别(不是每个 App 都支持)。二维码最长两分钟有效,准备好了点「刷新二维码」。「我扫好了」只是请Agent J 主机现在看一眼——是否登录成功,由Agent J 主机上的浏览器来判断。说「稍后」也行,只有要用那个网站的活会先等着。
「早上好」只是登录体检,不等于允许发布。发邮件、发布、付款、删除,照样要在手机上批准。
交给你的 Agent
想让 Agent 帮你设置,把下面这段发给它:
请帮我设置这台 Agent J 主机上的 Agent J 专用浏览器。先读 https://agentj.app/docs/browser-automation/zh.md 和 agentj-browser 技能,再运行 agentj browser status --json。如果我已经把浏览器关掉,就尊重我的选择。Mac 或 Windows 上,请从官网帮我下载并核验 Ego Lite,确认后帮我安装,带我准备专用资料并关闭产品改进开关,再运行 agentj browser connect,让我在配对手机上确认。Linux 上运行 agentj browser setup --json,告诉我哪些步骤需要我在本机完成。问我要用哪些网站,用 agentj browser sites add 加上,再运行 agentj browser check --json。需要登录的网站用 agentj browser login <网站> --wait 带我登录。聊天里不要出现密码、验证码、二维码截图、cookie 或浏览器地址。告诉我哪些网站已就绪、什么时候查的、还有什么要我处理。
Mac 和 Windows
- 在首次准备清单点让 Agent 帮我装,也可以在聊天里说「帮我装 Ego Lite」。Agent 会从Ego Lite 官网下载安装包,核验签名,得到你的确认后安装,并逐步提示需要你亲自完成的系统授权。Mac 有 Apple 芯片版和 Intel 版。Windows 版目前是测试版,运行在 Windows 桌面上。Agent J 在 WSL2 中运行。
- 在 Ego Lite 新建一份名为
Agent J的专用资料,也可以沿用 Chrome 的工作资料。要导入时,打开导入数据,核对范围后选中你愿意让 Agent 使用的工作资料,再把导入后的 Ego Lite 资料改名为Agent J。打开常用网站核对账号和组织,网站可能还会要求重新登录。 - 切换到这份专用资料,在 Ego Lite 的设置 → 个人资料 → Citro Labs 服务里关闭帮助改进 ego(lite) 的功能和性能(英文界面为 Help improve ego(lite)’s features and performance)。打开这项设置时,Citro 可能收到 Agent 的任务信息、相关网页内容和操作结果。见 Ego Lite 隐私政策。
- 保持 Ego Lite 打开。Agent 会运行
agentj browser connect,然后请你在已配对手机的首次准备清单里点使用 Ego Lite。确认后,Agent 可以用agentj browser check --json检查哪些网站已就绪。
这台 Agent J 主机上只有 1 号 Agent J 席位使用 Ego Lite。
Mac 的短期站点授权正在验收。首批支持的操作仅限查询。
Linux
从系统软件源安装 Google Chrome 或 Chromium,然后运行 agentj browser setup --json。Agent J 用用户服务运行浏览器,单独保存的登录资料在重启后仍可用。没有桌面的服务器上,浏览器会在后台运行。需要密码或通行密钥的网站,请在有桌面的 Agent J 主机上登录。安装软件包需要管理员权限时,请在手机密码卡上批准。
Linux 桌面上,Agent J 会复用已经打开的浏览器。关窗后,后台体检会让它保持关闭。在需要时运行 agentj browser open <网址>。各 Linux 席位的登录资料分开保存。除 1 号席位外,其他席位平时在后台运行,只有你明确打开网页或要在本机登录时才显示窗口。
以前用过 Agent J 的专用浏览器
升级后运行 agentj browser check --json。如果发现旧浏览器的资料,Agent J 会提醒你迁移一次,旧资料继续留在本机。Mac 和 Windows 上,Ego Lite 只能导入导入数据里能选到的资料。如果列表里没有旧 Agent J 浏览器的资料,或者网站再次要求验证,就在本机重新登录。Linux 上,如果系统浏览器和旧资料兼容,Agent J 可以沿用。做任务前,检查一下哪些网站还需要登录。
Linux 上已经有一个自动化浏览器?
如果 Linux 主机已经有带本机调试端口的专用浏览器,请 Agent 用 agentj browser adopt --endpoint http://127.0.0.1:9222 提议使用它。在首次准备清单点「用我已有的浏览器」才生效。Agent J 只打开和关闭自己开的标签页,浏览器和登录资料仍由你管理。浏览器关着时请在本机启动。运行 agentj browser adopt --forget 可以断开。
可以添加的网站
| 网站 | 模板 | 怎么登录 |
|---|---|---|
| Google 账号 | google | 在Agent J 主机前登录(密码 / 通行密钥)。能简化其他「用 Google 登录」的网站,但每个网站可能仍要单独授权。 |
| Gmail | gmail | 在Agent J 主机前登录。只确认是否登录,从不读邮件。 |
| YouTube 工作室 | youtube-studio | 在Agent J 主机前登录;频道权限单独确认。 |
| B站创作中心 | bilibili | 手机扫码卡 |
| 抖音创作者中心 | douyin-creator | 手机扫码卡 |
| 微信公众号 | mp-weixin | 手机扫码卡;部分账号每天都要重新扫 |
| 微信视频号助手 | channels-weixin | 手机扫码卡 |
| 其他网站 | custom | 在Agent J 主机前登录;Agent J 没有可信的检查方法,所以显示「尚未确认」 |
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
添加网站只是把它加进每日体检,不会启用任何任务。
每日体检
每天本地时间 08:00(用 agentj config set browser.check_time 07:30 修改),Agent J 只读地检查每个网站:在自己的标签页里打开这个网站固定的页面,只看页面最终停在哪里,然后关掉这个标签页。它不会替你登录、刷新 cookie、点任何东西,也不会让你退出登录。08:00 时Agent J 主机在休眠的话,醒来后补查一次。
每日体检从不发二维码。某个网站刚掉线,你会收到一条简短提醒(22:00 到 07:00 之间不发),下次你说「早上好」时 Agent 会带你重新登录。做任务前,超过 15 分钟没确认的网站会先复查。体检只代表检查那一刻的状态,网站当天晚些时候仍可能让你重新登录。
状态包括:已登录、需要登录、尚未确认(超时或页面改版不算掉线)、暂时不可用(没网或浏览器没在运行)以及已关闭。
agentj browser check --json
agentj browser check --site mp-weixin --if-stale --json
Telegram
如果接了 Telegram 机器人,有登录卡在等你时,机器人只会收到一条文字提醒。请到已配对的手机上打开登录卡扫码。Telegram 能看到收到的提醒文字。
隐私与限制
- 登录资料留在本机。 Linux 用单独的私有资料目录。Mac 和 Windows 上,你在手机上确认后,Agent J 才能使用名为
Agent J的专用资料。Agent J 不会把 cookie、密码或验证码放进聊天。 - 浏览器控制只在本机进行。 Linux 的调试端口只监听
127.0.0.1。Mac 和 Windows 用 Ego Lite 的本机自动化接口。请把浏览器控制留在运行浏览器的主机上。 - 登录卡只显示裁剪后的二维码。 它端到端加密发给你已配对的手机。登录成功、过期、关闭卡片或点「全部停下」后清除。二维码只显示在这张卡上。
- 由你决定是否使用浏览器。 运行
agentj browser disable关闭 Agent J 的浏览器功能和每日体检。用agentj browser enable重新打开。登录资料仍留在本机。 - 网站随时可能要求额外验证。请在网站的正式登录页或登录卡上自己完成。
Agent J uses a dedicated browser for web work on sites you sign in to, including Gmail, YouTube Studio, Bilibili, Douyin, WeChat Official Accounts and WeChat Channels. On Mac and Windows, set up Ego Lite on the computer. On Linux, Agent J uses the system Chrome or Chromium with a separate profile. While you set up the browser, your other Agent J work can continue.
Install Agent J · On the Agent J host · Keep the Agent J host awake · Command reference
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 the Agent J host'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 Agent J host to look — the Agent J host'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
Send your Agent this if you want help with setup:
Help me set up Agent J’s browser on this computer. Read https://agentj.app/docs/browser-automation/en.md and the agentj-browser skill. Run agentj browser status --json. If I turned the browser off, leave it off. On Mac or Windows, download Ego Lite from the official site and verify its signature. Install it after I confirm, guide me to prepare the dedicated profile and turn off product improvement, then run agentj browser connect for my phone confirmation. On Linux, run agentj browser setup --json and explain any step I need to do on this computer. Ask which websites I want to use, add them with agentj browser sites add, then run agentj browser check --json. Use agentj browser login <site> --wait for sites that need sign-in. Keep passwords, codes, QR screenshots, cookies and browser addresses out of chat. Tell me which sites are ready, when you checked and what still needs my attention.
Mac and Windows
- Tap Ask Agent to install in the first-run checklist or say “Help me install Ego Lite” in chat. Your Agent downloads the installer from the official Ego Lite site, verifies its signature, and installs it after you confirm. Your Agent guides you through any system prompts that need your approval. Mac has builds for Apple Silicon and Intel. The Windows app is in beta and runs on the Windows desktop. Agent J runs in WSL2.
- In Ego Lite, create a fresh profile named exactly
Agent Jor reuse an eligible Chrome work profile. For an import, review Import data, choose the work profile you want the Agent to use, then rename the imported Ego Lite profile toAgent J. Open the sites you need and confirm the account and organization shown. A site may still ask you to sign in again. - Switch to the dedicated profile, then open Settings → Profile → Citro Labs services in Ego Lite and turn off Help improve ego(lite)’s features and performance. When enabled, this setting can send agent task details, page content and results to Citro. See Ego Lite’s privacy policy.
- Keep Ego Lite open. Your Agent runs
agentj browser connect, then asks you to confirm Use Ego Lite in the first-run checklist on your paired phone. After you confirm, your Agent can runagentj browser check --jsonto see which sites are ready.
Ego Lite is available to the first Agent J seat on this computer.
Short-term website access is being tested on Mac. The first supported actions will be read-only.
Linux
Install Google Chrome or Chromium from a system package. Run agentj browser setup --json to start Agent J’s browser. It runs under a user service with a dedicated profile that keeps sign-ins across restarts. On a server without a desktop, it runs without a window. For sites requiring a password or passkey, sign in on the Agent J host with a desktop. If the package needs administrator permission, approve the package installation on the phone password card.
On a Linux desktop, Agent J reuses its open browser. Background checks leave it closed after you close it. Run agentj browser open <url> when you need it again. Each Linux seat keeps separate sign-ins. Seats other than the first normally run without a window until you explicitly open a page or sign in on the computer.
If you used the previous Agent J browser
Run agentj browser check --json after upgrading. If Agent J finds the previous browser’s profile, it shows a migration reminder once. Its data stays on the computer. On Mac and Windows, Ego Lite can import only profiles it offers in Import data. If it does not offer the previous Agent J profile or a site asks to verify again, sign in to that site on the computer. On Linux, Agent J can reuse its old profile when the system browser is compatible. Check which sites still need sign-in before running a task.
Already running a Linux browser for automation?
If your Linux host already runs a dedicated browser with a local debugging port, ask your Agent to propose it with agentj browser adopt --endpoint http://127.0.0.1:9222. Tap Use my existing browser on the first-run checklist to approve it. Agent J opens and closes only its own tabs. You keep control of the browser and its profile. If it is closed, start it yourself. Run agentj browser adopt --forget to disconnect it.
Sites you can add
| Site | Template | How you sign in |
|---|---|---|
| Google account | google | On the Agent J host (password / passkey). Makes other "Sign in with Google" sites easier, but each site may still ask for its own consent. |
| Gmail | gmail | On the Agent J host. Only the signed-in state is checked; mail is never read. |
| YouTube Studio | youtube-studio | On the Agent J host; 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 Agent J host; shown as "not verified" because Agent J has no trusted check for it |
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.
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. Open the card on your paired phone for the QR code. Telegram can read the reminder it receives.
Privacy and limits
- Keep sign-in data on the computer. Linux uses a private, dedicated profile. On Mac and Windows, your phone confirmation gives Agent J access to the dedicated
Agent Jprofile. Agent J keeps cookies, passwords and verification codes out of chat. - Browser controls stay local. On Linux, the debugging port listens only on
127.0.0.1. On Mac and Windows, Agent J uses Ego Lite’s local automation interface. Keep the controls on the computer where the browser runs. - The sign-in card contains just the cropped QR code. It travels end-to-end encrypted to your paired phone and clears after success, expiry, dismissal or Stop everything. The QR code appears only on that card.
- You control whether Agent J uses the browser. Run
agentj browser disableto turn off browser use and daily checks andagentj browser enableto turn them back on. Your profile stays on the computer. - A website can require extra verification at any time. Complete it yourself on the real sign-in page or with its sign-in card.