文档Docs
一台电脑,多人使用One computer, several people
两种方案:同一个系统用户里开多个实例(简单),或每人一个系统用户(隔离更强)。无论哪种,每人各占一个付费席位。Two plans — several instances on one OS user (simple), or one OS user per person (stronger separation). Either way, each person takes one paid seat.
夫妻、家人或同事可以共用一台电脑,各用各的 Agent J。按办公桌类比,每个人都是一张独立的办公桌:各有自己的 Agent、自己的椅子(席位)、自己的遥控器和对话。每人占一个付费席位,可以由同一个账号购买多个席位,也可以各自购买,价格见席位与计费。不要复用已绑定的安装码,不要复制另一人的 Agent J 状态目录。
选哪种方案
| 方案 A:同一系统用户,多个实例(推荐) | 方案 B:每人一个系统用户 | |
|---|---|---|
| 怎么装 | 三条命令,不用管理员权限,不用切换登录 | 新建系统用户,切过去,在那里安装 |
| 各自独立 | Agent J 数据、遥控器、对话、设置、后台服务、工作文件夹 | 全部,由操作系统保证 |
| 仍然共用 | 这个系统用户的其他文件(~/.ssh、云密钥、其他项目、浏览器资料)、AI 工具登录和额度、程序本身 | 只有整机资源(CPU、内存、磁盘、休眠设置) |
| 适合 | 彼此信任的家人、同事,电脑上没有不该给对方看的东西 | 电脑上有敏感资料(密钥库、生产服务器、财务),或彼此的文件要保密 |
拿不准就问自己一句:电脑上有没有不能让另一个人的 Agent 读到的东西?有,选方案 B;没有,方案 A 更省事。
方案 A:同一系统用户,多个实例
每个人对应一个编号实例(1–10)。实例 1 就是这台电脑原来那套 Agent J,不带参数就是它,位置永远不变;第二个人用 2 号,第三个人用 3 号……每个实例有自己的身份密钥、中继通道、遥控器名单、设置、后台服务和工作文件夹。遥控器配对时绑定的是那一个实例,所以消息不会串:一个人的手机连不上另一个人的实例,也看不到对方的对话。
需要 Agent J 0.20.0 或更新(agentj --version),并且实例 1 已装好、agentj doctor 正常。Linux 用 systemd 用户服务和 bubblewrap,macOS 用 LaunchAgent 和 sandbox-exec,和单人安装要求一样。电脑上的 Agent 自带 agentj-multi-seat 技能,直接对它说「在这台电脑上给小王再开一个 Agent J」,它会按本页一步步做,需要人做的步骤会停下来交给你。
新开一个实例
先在账户页为这个人准备一个空席位(见账户),点「复制安装提示词」取得安装码。安装码只放进权限为 600 的文件,用完删掉,不要贴进对话。
agentj instances # 看已有哪些编号,用最小的空号
agentj --instance 2 pair --check # 2 号不存在时自动创建(还不配对)
agentj --instance 2 login --seat-file /path/to/0600-file # 绑定这个人的席位
agentj --instance 2 pair --check # 约半分钟后路线变成 account
agentj --instance 2 pair # 配对这个人的手机
创建时会自动生成新身份(~/.local/state/agentj-2),在 ~/agentj-seats/2 里接上与实例 1 相同的 AI 工具,使用独立会话并开启隔离(第 2 个及以后的实例不能共用桌面会话),再装好开机自启的后台服务 agentj-2(macOS 为 net.agentj.host.2)。
给这个人的手机配对
先确认这个实例已绑定席位、在线。有两条路:
账户页(不用终端,不用批准口令)。 在账户页找到这个实例自己的席位卡(每个实例各有一张),点「添加遥控器(手机或浏览器)」,用账户的通行密钥确认,再用那个人的手机扫二维码(5 分钟内有效,只能加一台);也可以点卡上的「复制配对链接」,在那台手机上打开。
这台电脑的终端(SSH 登录也行)。 由那个人自己运行 agentj --instance 2 pair,用手机扫二维码(5 分钟内有效,只能用一次)。手机扫不到终端里的码时,agentj --instance 2 pair --link 会同时打印链接,agentj --instance 2 pair --no-qr 只打印链接;这个链接就是配对密钥,自己发到手机上打开,不要给别人。手机连上后会显示 6 位安全码,在同一个终端里输入(可以试 3 次);也可以到席位卡上用通行密钥批准,先完成的算数。这个实例设了批准口令的话,终端还会要求输入口令。
批准口令每个实例各有一个,只在终端批准时用。命令一定要带编号:agentj --instance 2 passphrase set(设置)、passphrase status(看状态)、passphrase change(修改)、passphrase reset(忘了:删掉口令,并解除这个实例的全部遥控器)。不带 --instance 2 的话,改的是 1 号实例的口令。批准口令和六位码必须由人亲手输入,不要发到聊天里。
之后可以起名、加备注、自检:
agentj --instance 2 name 小王的J # 手机上显示的 Agent 名字
agentj --instance 2 label 销售部小王 # 本机备注,只在 agentj instances 里显示
agentj --instance 2 doctor
所有子命令都认 --instance N;也可以先 export AGENTJ_INSTANCE=N。想换总目录,创建前设 AGENTJ_SEATS_ROOT。
| 实例 1(原来那套) | 实例 N(2–10) | |
|---|---|---|
| 状态(密钥、遥控器、日志) | ~/.local/state/agentj | ~/.local/state/agentj-N |
| 设置 | ~/.config/agentj/config.json5 | ~/.config/agentj-N/config.json5 |
| 后台服务 | agentj / net.agentj.host | agentj-N / net.agentj.host.N |
| 工作文件夹 | 原来的 | ~/agentj-seats/N |
每个实例都要有效席位
0.20.0 起,每个实例必须各自绑定一个有效席位。没绑定、席位已暂停(超出已付席位且过了宽限期),或超过 72 小时没能和 Agent J 账户服务确认的实例,手机和 Telegram 的消息不会交给它的 Agent,也不能配对遥控器;它会说明原因和去哪里处理。席位证书按每个实例自己的通道签发,实例 1 有席位不代表 2 号也有。用 agentj --instance N status 查看 seat。
升级、查看与删除
所有实例共用同一份程序。任何一个实例升级(agentj update apply 或手机上的升级按钮)后,其他正在运行的实例会各自等到空闲时自动重启,最多等 10 分钟,不用逐个升级。夜间自动升级只由实例 1 执行。agentj instances 列出编号、名字、在线状态、遥控器数、席位和工作文件夹。
agentj --instance 3 unlink # 先把席位还给账号,它会变回空席位
agentj instances remove 3 # 停服务、删除状态和设置;工作文件夹保留
实例 1 不能这样删除。只想移除某台手机,用 agentj --instance 3 devices 和 agentj --instance 3 revoke <id>。
注意事项
- 一个 Telegram bot 只能接给一个实例;要用 Telegram,每个实例各用自己的 bot。
- 所有实例共用这个系统用户的 Claude Code、Codex 登录,额度也共用。要分开,由本人用自己的账号运行
claude setup-token,把令牌写进该实例服务的 env 文件(权限 600)后重启服务;令牌不进对话。 - 防休眠是整机设置,只在实例 1 上管理;免密管理员小助手每个系统用户只有一个,归实例 1。
- 本地语音转写模型装在各实例自己的目录里,每个实例各占一份磁盘。
隔离到哪一步
方案 A 是会话隔离和数据可见性隔离,不是人与人之间的安全边界。每个实例的 Agent 在隔离环境里运行,看不到其他实例的密钥、遥控器、聊天记录和设置,也看不到其他人的工作文件夹。但这个系统用户的其余文件(~/.ssh、~/.aws、其他项目、浏览器资料)仍然看得到,Agent 也能管理这个用户的后台服务。需要真正隔开,请用方案 B。
发给 Agent 的指令(方案 A)
请帮我在这台电脑上为另一个人新开一个 Agent J 实例。先读取 https://agentj.app/docs/multi-seat/zh.md 的全文,确认 agentj 版本不低于 0.20.0、实例 1 的 doctor 正常。运行 agentj instances 找最小的空编号,向我确认后用 agentj --instance N pair --check 创建。安装码由我放进权限 600 的文件,你只运行 agentj --instance N login --seat-file <文件>,不要让我把码贴进对话。绑定后等路线变成 account,再提示我自己运行 agentj --instance N pair 配对那个人的手机;批准口令和六位码由人输入。最后跑 agentj --instance N doctor,把 ! 和 ✗ 原样告诉我,并用一两句话说明这个实例能看到和看不到什么。不要动实例 1 的设置、席位和配对。
方案 B:每人一个系统用户
每个人建立自己的系统用户,在自己的用户里安装 Agent J。两个系统用户在产品里就是两台电脑,各用各的安装码、AI 登录和手机配对,命令仍是 agentj。同一账号内给两个 Agent 起不同名字,便于在账号页辨认;同主机名不会把两个席位合并。
macOS:新建用户,再快速切换
- 打开苹果菜单 → 系统设置 → 用户与群组 → 添加用户。为第二个人建一个有密码的标准用户;管理员授权只在系统窗口输入。不要用会在退出时清空的访客账户。
- 开启快速用户切换。较新的 macOS 在系统设置 → 菜单栏 → 添加控制项 → 快速用户切换,可加入控制中心;较旧版本在系统设置 → 控制中心 → 快速用户切换。菜单位置随系统版本变化。
- 切到新用户,打开终端,按准备 AI 工具登录自己的 Claude Code、Codex 或 OpenCode,再按安装页装 Agent J。
- 用新用户自己的安装码、手机完成安装。用快速用户切换回原用户,保持两个人都已登录,不要点退出登录;切走后后台继续跑。
给熟悉终端的 Agent:先检查 sysadminctl -h,确认短用户名没有被占用,再用系统交互密码提示创建用户。不要把密码放进命令参数、聊天或日志。
sudo sysadminctl -addUser spouse -fullName 'Second User' -password -
这里 spouse 是示例短用户名。让主人在电脑的交互终端输入密码;如果当前工具不能交互,就使用系统设置。不要为了建用户自动授予管理员权限。
重启后,请登录一次第二个人的系统用户。 macOS 通常只能设置一个自动登录用户,FileVault 等设置可能禁止自动登录。Agent J 使用用户登录会话里的 LaunchAgent,未登录图形界面时不会跑;SSH 登录不能替代图形登录。agentj doctor 会检查图形会话。电脑一直连不上时,手机的灰色离线页会说明:这台 Mac 好像重启了,回电脑前登录一下就好。快速切换能保持后台运行,但不能让未登录的用户在开机时自动运行。
参考:Apple 新建用户 · Apple 快速切换。
Linux:新建用户,开启 linger
可先在发行版的用户设置中添加标准用户。终端示例(把 spouse 换成未占用的短用户名):
sudo useradd -m -s /bin/bash spouse
sudo passwd spouse
sudo loginctl enable-linger spouse
loginctl show-user spouse -p Linger
密码只在 passwd 的交互提示输入。已有席位的 Agent 需要管理员权限时,用 agentj sudo 手机密码卡;创建密码仍用电脑上的交互窗口。不要在对话里提供密码。
登录新用户(本机切换用户或 SSH 均可),分别登录自己的 AI 工具、安装 Agent J、绑定自己的席位并配对手机。安装会建议开启 linger,agentj doctor 会报告未开启的情况;不会替你强制开启。检查结果应为 Linger=yes。也可在新用户里执行:
loginctl enable-linger "$USER"
agentj service status
agentj doctor
linger 让这个用户的 systemd 服务在开机时启动、退出登录后保持运行,不依赖图形桌面。但电脑仍须开机、联网,数据目录和 AI 凭据也须可用;登录才解锁的加密 home 不会因 linger 自动解锁。非 systemd 发行版需自行配置等价的常驻服务。
参考:systemd loginctl。
Windows + WSL2
Agent J 主机端走 WSL2。每个人先建自己的 Windows 用户,再在自己的 Windows 登录中安装自己的 WSL2 发行版,里面各自安装 Agent J、登录 AI 工具、配对手机。WSL 中仅建一个 Linux 用户,不等于第二套独立的 Windows 登录和发行版。
WSL 开启 systemd 后可按 Linux 流程设置 linger,但 linger 不能启动已停止的 WSL 虚拟机。重启 Windows 后先登录该 Windows 用户、打开 WSL,再检查 agentj service status;需要无人登录常驻时,应单独验证 Windows 的启动安排。电脑休眠要在 Windows 电源设置里处理。
参考:Microsoft WSL systemd · WSL 隔离边界。
哪些隔离,哪些共享
- home、Agent J 状态、AI 工具登录、配对手机、对话各归自己的系统用户。不要共用状态目录、浏览器用户数据目录或把 home 权限开放给另一人。系统管理员仍有权限访问本机文件。
- CPU、内存、磁盘、GPU、网络由整机共享;两个本地语音模型会各占一份内存。资源不足时降低并发或在自己的席位选择云服务。
- 本地设置页和 Agent J 管理的 OpenCode 服务自动选择空闲端口;本地 ASR 使用子进程管道,状态栏和控制 socket 在用户私有目录。手动指定相同端口仍会冲突。若另行配置浏览器自动化,也要为各用户选择空闲 CDP 端口和独立浏览器目录,不能共用固定 9222。
- 防休眠、电源、关机是整机设置。改变前记录原值,并协调所有使用者;两人都需要保持开机时,只在最后一个人不再需要时恢复,且先检查设置仍是自己改过的值。不要根据某一席位的旧快照直接恢复另一人的设置。合盖、断电或手动休眠仍可能让所有席位离线。
- 可免重复输入 sudo 密码的签名 helper 按系统 UID 分开安装;升级前装过旧版 helper 的用户需在自己的用户中重新运行
agentj sudo-helper install,按手机卡授权。旧版机器级文件不会自动删除;不要代另一用户卸载。
发给 Agent 的指令(方案 B)
把这段复制给当前电脑上的 Agent;用户名由主人确认后填写:
请帮我在这台电脑上为第二个人创建一个独立的系统用户,并引导他安装自己的 Agent J。先读取 https://agentj.app/docs/multi-seat/zh.md 和 https://agentj.app/install.md 的全文,检查操作系统、已有用户名与是否有管理员权限。每个系统用户在产品中相当于一台电脑,各用一个付费席位和自己的安装码。请先向我确认新用户的短用户名,再创建标准用户;密码只能在系统交互窗口或已配对的 Agent J 手机密码卡中输入,绝不放进对话、命令参数或日志。不要改现有用户的 AI 登录、席位、配对或配置,也不要复制状态目录。Linux 建好用户后建议开启该用户的 linger 并读回验证;macOS 指导快速用户切换保持两人登录,并明确提醒重启后第二个用户要登录图形界面一次。然后让我切到新用户,在那里登录自己的 AI 工具、按 install.md 安装并配对自己的手机。请分别检查服务和 doctor;需要我在新用户做的步骤就明确告诉我,不要在旧用户里代装。
A family or team can share a computer, each person with their own Agent J. In terms of the desk analogy, each person is a desk of their own: their own Agent, their own chair (seat), their own remotes and conversation. Each person takes one paid seat. One account can purchase multiple seats, or each person can purchase separately; see seat pricing. Never reuse a bound installation code or copy another person's Agent J state folder.
Which plan
| Plan A: instances on one OS user (recommended) | Plan B: one OS user per person | |
|---|---|---|
| Setup | three commands, no admin rights, no switching logins | create an OS user, switch to it, install there |
| Separate | Agent J data, remotes, conversations, preferences, background service, working folder | everything, enforced by the operating system |
| Still shared | the OS user's other files (~/.ssh, cloud keys, other projects, browser data), the AI logins and their quota, the program | only the machine (CPU, memory, disk, sleep settings) |
| Fits | family members or colleagues who trust each other, with nothing on the computer the other must not see | sensitive data on the computer (key stores, production servers, finances), or files people must keep from each other |
One question decides it: is there anything on this computer the other person's Agent must not read? If yes, plan B; if not, plan A is simpler.
Plan A: several instances on one OS user
Each person gets a numbered instance (1–10). Instance 1 is the Agent J this computer already had: no option means instance 1, and it never moves. The second person uses 2, the third 3, and so on. Each instance has its own identity keys, relay channel, remotes, preferences, background service and working folder. A remote pairs with one instance, so messages never cross: one person's phone cannot connect to another person's instance or see their conversation.
Requires Agent J 0.20.0 or later (agentj --version), with instance 1 installed and agentj doctor healthy. Linux uses a systemd user service and bubblewrap, macOS a LaunchAgent and sandbox-exec, as for a single install. The Agent on the computer ships with the agentj-multi-seat skill: just tell it "add another Agent J on this computer for Alex" and it follows this page step by step, stopping for the steps a person must do.
Add an instance
First get an empty seat for this person on the account page (see account) and press "Copy installation prompt" for the installation code. Keep the code only in a file with mode 600, delete it afterwards, and never paste it into chat.
agentj instances # which numbers exist; use the smallest free one
agentj --instance 2 pair --check # creates instance 2 when missing (no pairing yet)
agentj --instance 2 login --seat-file /path/to/0600-file # bind this person's seat
agentj --instance 2 pair --check # about half a minute later the route is account
agentj --instance 2 pair # pair this person's phone
Creating an instance makes a new identity (~/.local/state/agentj-2), connects the same AI tool as instance 1 in ~/agentj-seats/2 with an independent, fenced session (instances 2 and up never share a desktop session), and installs its background service agentj-2 (macOS net.agentj.host.2), started at login or boot.
Pair this person's phone
The instance must be bound and online first. Two ways:
Account page (no terminal, no passphrase). On the account page, find this instance's own seat card (each instance has one) and choose "Add a remote (phone or browser)". Confirm with the account passkey, then scan the QR code with that person's phone (valid 5 minutes, one remote), or copy the pairing link on the card and open it on that phone.
Terminal on this computer (also over SSH). The person runs agentj --instance 2 pair and scans the QR code (valid 5 minutes, one use). When the phone cannot scan the terminal, agentj --instance 2 pair --link prints the link as well and agentj --instance 2 pair --no-qr prints only the link; the link is the pairing key, so open it on that phone yourself and never send it to anyone else. When the phone connects it shows a 6-digit code: type it into the same terminal (3 tries), or approve on the seat card with the passkey; whichever comes first counts. If this instance has an approval passphrase, the terminal asks for it too.
Each instance has its own approval passphrase, used only for terminal approvals. Always include the number: agentj --instance 2 passphrase set (choose one), passphrase status, passphrase change, passphrase reset (forgotten: deletes it and unpairs every remote of that instance). Without --instance 2 these commands change instance 1's passphrase. The approval passphrase and the 6-digit code are always typed by a person, never sent in chat.
Then name it, add a note and check it:
agentj --instance 2 name Alex-J # the Agent name the phone shows
agentj --instance 2 label "Sales - Alex" # local note, shown only by agentj instances
agentj --instance 2 doctor
Every subcommand accepts --instance N; or export AGENTJ_INSTANCE=N first. To use another parent folder, set AGENTJ_SEATS_ROOT before creating.
| Instance 1 (the original) | Instance N (2–10) | |
|---|---|---|
| State (keys, remotes, logs) | ~/.local/state/agentj | ~/.local/state/agentj-N |
| Preferences | ~/.config/agentj/config.json5 | ~/.config/agentj-N/config.json5 |
| Background service | agentj / net.agentj.host | agentj-N / net.agentj.host.N |
| Working folder | unchanged | ~/agentj-seats/N |
Every instance needs a valid seat
From 0.20.0 every instance must be bound to its own valid seat. An instance that is not bound, whose seat is suspended (beyond the paid seats and past the grace period), or that could not confirm its seat with the Agent J account service for more than 72 hours passes no phone or Telegram message to its Agent and cannot pair a remote; it says why and where to fix it. The seat certificate is issued to each instance's own channel, so a seat on instance 1 does not cover instance 2. Check seat in agentj --instance N status.
Upgrade, list and remove
All instances run one installed program. When any instance upgrades (agentj update apply or the phone's update button), every other running instance restarts on its own once idle, within 10 minutes; there is no need to upgrade each one. The nightly auto-update runs on instance 1 only. agentj instances lists number, name, online state, remotes, seat and working folder.
agentj --instance 3 unlink # give the seat back to the account first; it becomes an empty seat again
agentj instances remove 3 # stops the service, deletes its state and preferences; the working folder stays
Instance 1 cannot be removed this way. To drop one phone only, use agentj --instance 3 devices and agentj --instance 3 revoke <id>.
Good to know
- One Telegram bot connects to one instance only; give each instance its own bot if they use Telegram.
- All instances share this OS user's Claude Code and Codex logins, and their quota. To separate them, the person runs
claude setup-tokenwith their own account and writes the token into that instance's service env file (mode 600), then restarts the service; tokens never go through chat. - Keep-awake is a whole-computer setting, managed on instance 1 only; the password-free admin helper exists once per OS user and belongs to instance 1.
- Local transcription models live in each instance's own folder, one copy each.
What the separation covers
Plan A is session and visibility separation, not a security boundary between people. Each instance's Agent runs fenced and cannot see the other instances' keys, remotes, chat history or preferences, or other people's working folders. It can still see the rest of this OS user's files (~/.ssh, ~/.aws, other projects, browser data), and an Agent can manage this user's background services. For real separation, use plan B.
Exact prompt for your Agent (plan A)
Help me add another Agent J instance on this computer for a second person. First read the full https://agentj.app/docs/multi-seat/en.md, confirm agentj is 0.20.0 or later and instance 1's doctor is healthy. Run agentj instances, pick the smallest free number, confirm it with me, then create it with agentj --instance N pair --check. I put the installation code in a file with mode 600; you only run agentj --instance N login --seat-file <file>, and never ask me to paste the code into chat. After binding, wait until the route is account, then ask me to run agentj --instance N pair myself to pair that person's phone; the passphrase and the 6-digit code are typed by a person. Finally run agentj --instance N doctor, report every ! and ✗ as it is, and explain in a sentence or two what this instance can and cannot see. Do not change instance 1's settings, seat or pairings.
Plan B: one OS user per person
Each person creates their own operating-system user and installs Agent J inside it. Two users count as two computers, each with its own installation code, AI logins and phone pairing; everyone runs agentj. Within one account, choose different Agent names so you can distinguish them; sharing a hostname does not merge seats.
macOS: create a user and switch without logging out
- Open Apple menu → System Settings → Users & Groups → Add User. Create a standard user with a password, rather than a temporary Guest account. Enter administrator authorization only in the system prompt.
- Enable Fast User Switching. Recent macOS versions use System Settings → Menu Bar → Add Controls → Fast User Switching, with an option to add it to Control Center. Older versions use System Settings → Control Center → Fast User Switching.
- Switch to the new user, open Terminal and set up AI tools with that person's own login. Follow the installation page inside this account.
- Use a separate installation code and pair that person's phone. Switch back with Fast User Switching, keeping both users logged in. Background work continues while a user is switched out.
For an Agent comfortable with Terminal: check sysadminctl -h and whether the short username already exists. The following example asks for the password interactively; never place a password in arguments, chat or logs.
sudo sysadminctl -addUser spouse -fullName 'Second User' -password -
Replace spouse with an agreed, unused short username. The owner must enter the password at the computer's interactive terminal. If your tool cannot provide an interactive prompt, use System Settings. Do not automatically grant administrator rights.
After a reboot, log in once as the second user. macOS generally offers automatic login for one user; FileVault or other settings may prevent it entirely. Agent J runs as a LaunchAgent in a GUI login session. SSH login alone is insufficient. agentj doctor checks that session. When the computer stays unreachable, the phone's grey offline page explains that this Mac seems to have restarted and needs a login at the computer. Fast User Switching keeps an existing login alive; it does not start an account that has never logged in since boot.
References: Apple: add a user, Apple: switch users.
Linux: create a user and enable linger
Use your distribution's user settings to create a standard account, or run these commands with an agreed, unused username:
sudo useradd -m -s /bin/bash spouse
sudo passwd spouse
sudo loginctl enable-linger spouse
loginctl show-user spouse -p Linger
Enter passwords only at the interactive passwd prompt. An already paired Agent can request administrator rights with the agentj sudo phone password card; creating a password still needs an interactive system prompt. Never send it in chat.
Log in as the new user through the desktop or SSH. Sign into that person's AI tools, install Agent J, bind their seat and pair their phone. Installation recommends linger and agentj doctor warns when it is off; neither forces it on. Verify Linger=yes. Inside the new account you can also run:
loginctl enable-linger "$USER"
agentj service status
agentj doctor
Linger starts this user's systemd services at boot and keeps them running after logout, without requiring a desktop login. The computer must still be powered on and online, with its data and AI credentials accessible. Linger cannot unlock a home directory encrypted until login. A distribution without systemd needs an equivalent service arrangement.
Reference: systemd loginctl.
Windows with WSL2
The Agent J host runs in WSL2. Give each person a separate Windows user and a WSL2 distribution installed from that Windows login. Install Agent J, sign into AI tools and pair a phone separately inside each distribution. Adding only a Linux user within a shared distribution is not the same as a separate Windows account and distribution.
With systemd enabled in WSL, linger works within the running distribution, but cannot start a stopped WSL virtual machine. After rebooting Windows, log into that person's Windows account, open WSL and check agentj service status. Validate any Windows startup arrangement separately if unattended operation is needed. Configure computer sleep on the Windows side.
Microsoft: systemd in WSL · WSL security boundaries.
Isolation and shared limits
- Each OS user owns their home, Agent J state, AI logins, paired phones and conversations. Do not share a state folder or browser data directory, or open home permissions to the other user. System administrators still have access to local files.
- CPU, RAM, disk, GPU and network are shared. Two local speech models use two allocations of memory. Reduce concurrency or choose a cloud provider for your own seat when resources run short.
- Local settings pages and Agent J-managed OpenCode services automatically select free ports. Local ASR uses child-process pipes; statusline files and control sockets live in private user directories. Explicitly assigning the same port can still collide. If you separately set up browser automation, choose a free CDP port and a private browser data directory for each user instead of sharing fixed port 9222.
- Sleep policy, power and shutdown affect the entire computer. Record originals before changing settings and coordinate with other users. Restore only when the last user no longer needs the machine awake, and only after checking the value still matches your change. Never restore another seat's settings from one user's old snapshot. Lid closure, lost power and manual sleep can still disconnect every seat.
- The optional signed sudo helper now installs separately by OS UID. Users with a legacy helper must run
agentj sudo-helper installagain in their own account and authorize the phone card. Legacy machine-wide files are retained; never uninstall on another user's behalf.
Exact prompt for your Agent (plan B)
Copy this to the Agent on the computer. The owner confirms the new username:
Help me create a separate OS user for a second person on this computer and guide them through their own Agent J installation. First read the full https://agentj.app/docs/multi-seat/en.md and https://agentj.app/install.md. Check the OS, existing usernames and administrator access. Each OS user counts as a separate computer and requires a paid seat and their own installation code. Ask me to confirm the short username, then create a standard user. Passwords belong only in an interactive system prompt or a paired Agent J phone password card, never in chat, command arguments or logs. Preserve existing users' AI logins, seats, pairings and configuration; do not copy their state folders. On Linux recommend enabling this user's linger and verify it. On macOS explain Fast User Switching and remind me to log into the second user's GUI once after reboot. Then have me switch to the new account to sign into its AI tools, install following install.md and pair its own phone. Check the service and doctor for each installation. Explain actions I must take in the new account; do not install on its behalf from the old user's account.
Continue: installation steps · install page · FAQ.