## Windows {#windows}

For Windows 10 and Windows 11 (64-bit). Agent J runs in Ubuntu inside Microsoft's Linux subsystem (WSL2); the install command sets that up first, so there is nothing to prepare.


### ① Install it yourself: one command {#windows-self}

**When to choose it:** the Agent J host has no AI tool yet, or you would rather do it yourself. You need one code from start to finish: the **installation code** (it starts with `AJI-`) on an empty seat card in your account.

**Time:** usually 15 to 30 minutes, mostly downloading; the first WSL install may need one restart. The parts that need you add up to a few minutes.

1. On https://agentj.app/account/ press "Get installation command" on the empty seat card, then "Copy installation command". Opened on Windows, the page gives you the PowerShell line; if not, press "Windows (PowerShell) command".
2. Open PowerShell (search Start for PowerShell; no administrator needed), paste and press Enter. The command looks like

   ```powershell
   $env:AGENTJ_CODE='AJI-…'; irm https://agentj.app/install.ps1 | iex
   ```
3. Follow the screen. Every step starts with its number and what it is doing:

| On screen | What you do |
|---|---|
| Installation code | Taken from the command; if it is missing you paste it once (hidden) |
| WSL2 and Ubuntu | Allow the Windows administrator prompt; restart if asked, then paste the same command again |
| Ubuntu user | Pick a user name (Enter takes the suggestion) and a password (hidden; remember it) |
| System parts | Nothing; Windows does not ask for a password |
| AI | Reuses Claude Code or Codex if you are signed in. Otherwise pick a route: if the official services are unreachable choose the Agents Relay route (see [Hong Kong and mainland China](/docs/install/#hk-cn)); if they work, sign in with your own account in the browser |
| Agent J | Nothing: it installs, starts the background service and links this seat with the same code |
| Phone | A QR code appears: open https://m.agentj.app on **your own phone**, tap "Scan QR code" and scan it |
| Connect the AI | Nothing: the AI must answer one real request before it is connected |
| Keep it awake | Shows the Windows power steps to do in PowerShell yourself; nothing changes inside Ubuntu ([details](/docs/keep-awake/#windows)) |

> **One more option**: the AI step's menu also has item 6, 「用 OpenCode 自带的免费模型先跑起来」 (start now with OpenCode's own free model): no sign-in, no key, ready at once; your conversations and code go to OpenCode and its model provider. It prefers free models whose provider does not train on your conversations; free models are rate-limited and can disappear, so switch to a model of your own for sensitive work later (Models & Key on the phone). The other choices and the recommended default are unchanged.

4. When you see "✅ 全部完成" (all done), say hello to it from your phone. To use `agentj` on the Agent J host later, open "Ubuntu" from the Start menu, not PowerShell.

If something goes wrong:

- If a step fails, the screen says what to do. Fix it and **paste the same command again**; finished steps are skipped.
- The installation code works once and expires after 24 hours (the card shows the time).
- Already installed, but the AI is missing or an old version will not upgrade? In "Ubuntu" run `curl -fsSL https://agentj.app/install.sh | bash` again (no code). It checks the version first: an older Agent J is repaired forward with the signed package from agentj.app (not the old `agentj update`, no GitHub; seat, pairing and settings stay), then only the AI step runs.
- Confirm systemd is on: the background service runs on it. In "Ubuntu" run `ps -p 1 -o comm=`; it should print `systemd`. If not, in "Ubuntu" run `printf '[boot]\nsystemd=true\n' | sudo tee -a /etc/wsl.conf` (skip it when the file already has `systemd=true` under `[boot]`), then in PowerShell run `wsl --shutdown`, reopen "Ubuntu" and run `agentj service install`. The install command does both steps itself; `agentj service install` and upgrades also name these two steps in one sentence when systemd is off.


### ② Get someone to help: beside you or remotely {#windows-helper}

**When to choose it:** you are not at home with computers or terminals, and a family member, friend or colleague can sit with you or help over a video call or screen sharing.

What to do today:

1. The helper walks you through ①. The code is copied only from **your own** account page and pasted only on your own computer; when helping remotely, you share your screen and the helper tells you what to do. Never put the code or a key into a chat.
2. A Windows administrator prompt appears along the way, and there may be one restart. A helper who warns you in advance saves you a fright.
3. Scan the pairing QR code with **your own phone**. If the helper's phone scans it, that phone becomes a remote for the Agent J host: afterwards run `agentj devices` to find its device ID, then `agentj revoke <device-id>` to remove it.
4. Phone not at hand, or the scan did not work? No need to reinstall: once it is installed, press "Add a remote" on the Agent J host's seat card in your account, confirm with your passkey, and scan with your phone.

> **Tip:** One-step helper pairing arrives in a later planned release: the helper connects their own phone for a while and guides you through the install from it; once your phone is paired and the AI is connected, the helper is disconnected automatically.

### ③ Let the AI on the Agent J host install it {#windows-ai}

**When to choose it:** you already use Claude Code, Codex or OpenCode inside Ubuntu on WSL and want it to do the work and explain as it goes. On Windows Agent J installs only inside WSL2, and an AI running on Windows itself stops and tells you so; without WSL yet, ① is simpler.

1. Already bought a seat: press "Copy installation prompt" on the empty seat card in your account and send it to the AI in Ubuntu.
2. Not yet: send it this sentence exactly as written, and it walks you through opening an account and buying a seat:

```text
Please download https://agentj.app/install.md with curl, read the whole file with your file-reading tool, then follow it step by step, re-reading each section before you do it. Tell me when you need me to do something.
```

What the AI does at each step, and where it stops for you: [When the AI installs it](/docs/install/#ai-steps).


### ④ Remote installation assistant (cloud) {#windows-assistant}

**When to choose it:** nobody is around to help, there is no AI on the Agent J host, and you are stuck halfway and want to ask someone.

How it works today:

1. Install with the command from ①. That command is the installation assistant: the screen says what each step is doing, and when something fails it says what to do. Fix it and paste the same command again to carry on.
2. Still stuck, and Agent J is already installed: run this command in "Ubuntu". It sends your question and a health check with the secrets removed to our support desk, which usually answers with concrete steps within a few minutes.

```bash
agentj support ask "<your question>" --attach-doctor
```

3. Not installed yet, or you cannot reach us: email feedback@agentj.app with the step, the exact error and a screenshot (cover the installation code, keys and QR code first).

> **Tip:** In a later planned release the cloud assistant suggests the next step right on your phone, and nothing runs until you tap it.


[Full installation instructions](/docs/install/#windows)
