# AI agents on your machines

> Let an AI agent (Claude, ChatGPT, Cursor and others) find what's wrong with a machine and fix it, with a person allowing every change and everything recorded.

Connect an AI agent to Underpass and it can look after your machines with you. Ask "why can't my Mac get copies from my PC?" and it checks the machines, explains what's wrong and, if you allow it, fixes it.

Underpass doesn't ship its own AI. It gives the agent you already use safe access to your machines, through the dashboard's MCP server. Any agent that supports MCP works, including one running on a model you host yourself.

## What agents can do

| | What it does | Needs approval |
|---|---|---|
| **Diagnose a machine** | Whether it's online, up to date, signed in and connected, whether its clock is right and whether the Underpass app is open, with how to fix each problem | No |
| **Machine details** | Read from the machine itself: system and build, uptime, memory, disks, clock, who's signed in, recent updates | No |
| **Run a command** | PowerShell on Windows, `sh` on macOS and Linux | **Yes** |
| **Read a file** | A text file up to 1 MB, like a log or a config | **Yes** |
| **Change a file** | Replace a file's contents | **Yes**, and you see the new contents |

Commands and files work through the Underpass service on the machine, so they run as **administrator** (SYSTEM on Windows, root on macOS and Linux). Machine details, commands and files need Underpass **0.8.6 or later** on the machine, and the machine must be online. Every tool, with its inputs and limits, is on [MCP tools](/reference/mcp-tools).

## Allowing a request

When an agent wants to run something, it tells you what and why, and the request waits for you:

- **In the bell** in the dashboard (owners and admins): "Claude wants to run a command on office-pc".
- **Under Connect your agent → Waiting for you**, with the exact command (or the file and its new contents), who asked, and **Allow** or **Deny**.

Once you allow it, the machine runs it within seconds and the agent gets the output. A request nobody decides on lapses after 30 minutes. Nothing is kept on the page afterwards: what agents did is in [Logs](/manage/logs#ai-agents), under **AI agents**.

**Who can allow:** owners and admins. Commands run as administrator on the machine, so a member's agent waits for an owner or admin, even on the member's own computer. Members see their agent's requests under **Waiting for you** until someone decides, and their agent gets the result.

**Allowing takes a fresh code.** If you've turned on two-factor authentication, **Allow** asks you to confirm it's you, every time, with a touch of your passkey or a fresh code from your authenticator app. Someone who got hold of your password or a signed-in browser still can't allow commands. Turn it on in **Account → Two-factor authentication**.

**You're told by email.** Each time a request is allowed, the workspace owner and the person who allowed it get an email with the machine, the command (or file) and who asked. If you didn't allow it, the email says what to do: sign out everywhere, check your authenticator app, and turn agents off.

Agents also ask before they change who's in your workspace: inviting someone, sharing a machine with someone outside it, or approving a machine that's waiting. Those requests appear in the same place. The agent only files the request; when you allow it, the dashboard does it as you, and the invite or share link goes by email, never back to the agent. Inviting an admin is for the owner to allow, and needs two-factor turned on.

An agent's access can't change your workspace on its own in any other way either: it can't change roles, remove people, rename the workspace or change your account, even by going around the dashboard.

## Choosing what agents may do

Owners and admins set it in **Settings → AI agents**:

| Setting | What agents may do |
|---|---|
| **Off** | Nothing on machines: no details, commands or files. Agents still see what the dashboard shows, like the machine list and **Diagnose a machine** |
| **Look only** (default) | Diagnose and read machine details |
| **Ask first** | Also run commands and read or change files, each one allowed by a person |

**Which machines** limits agents to some machines: list tags (`tag:servers`), machines (`machine:<id>`) or people's machines (`user:name@example.com`, their machines without tags). Leave it empty for every machine, and click **Save** after changing it.

**Activity** on the same page opens [Logs → AI agents](/manage/logs#ai-agents): what agents asked for, who allowed it, and what ran.

## Keeping agents off one machine

Whatever the workspace allows, each machine can refuse agents. Then nothing runs there, not even machine details, and agents are told `agents are turned off on <machine> itself`.

- **Windows and macOS:** in the Underpass app, **⋯ → AI agents → Let agents work here** (Underpass 0.8.7 or later; before that, on Windows, it's under **⋯ → Remote control**).
- **Any machine:** `underpass agents off` (and `underpass agents on` to allow them again).

## Everything is recorded

The [audit log](/manage/logs#ai-agents) keeps every request, who allowed or denied it, and how it ended (exit code and time). It records the command or file path but never a file's contents or a command's output. Filter by **AI agents** to see only these. The audit log is for owners and admins.

## Agents on your own computer

An agent running on one of your computers (Claude Code, Cursor, LM Studio, Goose and others) can also work on your machines without the dashboard: it starts `underpass mcp` on that computer. Pair it with a model you run yourself, and no AI company sees anything.

- **The output stays on your machines:** commands run on the target machine and their output goes straight back to your computer over your Underpass network, never through Underpass's servers.
- **The request goes through Underpass** so you can allow it: the command, or the file and its new contents.
- **Allow it in the dashboard** (Connect your agent, or the bell), as an owner or admin. Or, from 0.8.8, **in the Underpass app on another of your Windows computers**, with Windows Hello: see [Allowing on your own computer](#allowing-on-your-own-computer). Never on the computer the agent runs on.
- **Your own machines only.** For servers and other people's machines, connect the agent to the dashboard.
- **Who can allow:** owners and admins in the dashboard; the workspace owner in the app.

Machines need Underpass **0.8.7 or later**. Add it to your agent app as a local (stdio) MCP server with the command `underpass mcp` (on Windows, `"C:\Program Files\Tailnet\tailnet.exe" mcp`).

`underpass agents requests` lists what's waiting. A terminal can't allow or deny: `underpass agents allow` says to use the app or the dashboard.

## Allowing on your own computer

From Underpass 0.8.8, the workspace owner can answer agents' requests in the Underpass app on their own Windows PCs, instead of the dashboard. Each **Allow** asks for **Windows Hello** (your PIN, fingerprint or face), so an agent running on that computer as you can't allow anything: it can't get past that prompt.

On a Mac this isn't available yet: answer requests in the dashboard. (The service can't yet tell the Underpass app apart from another program on a Mac reliably enough.)

**Your first computer:**

1. **In the app**, open **⋯ → AI agents** and press **Set up with Windows Hello**. Windows asks you to confirm. The app shows a short code. You get an email that a computer asked to answer agent requests.
2. **In the dashboard**, open **Settings → AI agents → Allow on your computers**. The computer is listed with its code and who added it. If the codes match, press **Confirm** (and confirm it's you with your passkey or a code from your authenticator app, if you have 2FA).
3. **It starts working 24 hours later.** The dashboard shows **Active from** and the time, and you get an email at once and again when it starts. If you didn't set it up, press **Cancel** before then. The wait means someone who gets into your dashboard account can't quietly add a computer of their own and use it straight away.

**Later computers** are allowed on a computer that already answers requests, not in the dashboard: set the new one up in its app, then on the first one, in **⋯ → AI agents**, press **Allow this computer** next to it (check the code matches) and confirm with Windows Hello. It works at once, and you get an email.

**Requests show in the app.** When an agent on another of your computers asks for something, the app comes to the front with the request. **Allow** asks for Windows Hello; **Deny** doesn't. Every Allow made in the app is emailed to the owner too, so you'd notice one you didn't make.

Only computers the workspace owner added themselves (with their own key or sign-in) can do this, never for the computer that asked, and a computer an admin hands to the owner doesn't count. To stop, press **Stop allowing here** in the app, or **Remove** in the dashboard (owners and admins). Removing the machine removes it too. Needs Windows 10 (version 1903) or later with Windows Hello set up; not Macs (yet), Linux or phones, where requests go to the dashboard.

**What it protects against, and what it doesn't.** Windows Hello stops an agent or other program on that computer from allowing anything by itself. But Underpass can't yet check that the key really lives in Windows Hello (that needs hardware attestation): a program that can tamper with the Underpass app itself could set up a key of its own. That's why a new computer has to be allowed on one you already trust, or waits a day with an email, and why each Allow is emailed.

Turning agents back **on** for a computer (after **Keep agents off this computer**) is done in the app, or with `underpass agents on` as an administrator; anyone can turn them off.

**Answer on devices only.** In **Settings → AI agents → Where requests are answered**, turn on **Answer agent requests on devices only**. Then the dashboard can't allow anything (it can still deny): every request, from agents connected to the dashboard too, goes to the owner's confirmed computers. Someone who gets into a dashboard account still can't run commands. It needs one confirmed computer first.

- Turning it **on** is immediate.
- Turning it **off** from the dashboard asks you to confirm it's you (your passkey or an authenticator code, if you have 2FA), takes **24 hours**, and the owner gets an email at once. If it wasn't you, turn it back on: that calls it off.
- In the app on a confirmed computer, **Allow in the dashboard again** turns it off at once (with Windows Hello).

## Connecting an agent

Open **Connect your agent** in the dashboard and follow the steps for your app; the same steps are in [Connect an AI agent](/getting-started/connect-an-ai-agent). The agent signs in as you, so it has your role in each workspace: a member's agent can only work on that member's machines.
