> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mspilot.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> MSPilot enrolls technician Windows machines so Claude Desktop and ChatGPT run through one governed gateway. Seat words are standard seat and power seat. ConnectWise PSA import is not available. HIPAA is not a self-serve switch.

# From source

> Build the agent and enroll it against a gateway you run.

This path is for building the agent. MSPs installing a fleet should use [Install](/agent/install).

```bash theme={null}
cargo build -p mspilot-agent
export MSPILOT_ENROLLMENT_KEY=mspilot_enr_...
export MSPILOT_GATEWAY_URL=http://127.0.0.1:8080
./target/debug/mspilot-agent enroll
```

`MSPILOT_STATE_DIR` overrides `~/.mspilot`. `--region` works the same way as on the published binary. Windows release builds use `cargo build -p mspilot-agent --release --target x86_64-pc-windows-msvc` on a Windows machine. Tests:

```bash theme={null}
cargo test -p mspilot-app-config -p mspilot-agent
```
