# Prime Agent
URL: https://docs.munito.ai/sandboxes/cloud-agents/prime-agent

For files on your computer, use the [local Prime Agent guide](https://docs.munito.ai/agents/prime-agent).

<Callout type="warn">
  The `agent` [template](https://docs.munito.ai/sandboxes/templates) does **not** carry Prime Agent: it offers only a shell
  installer from its own domain, which no digest pins. Install it in the sandbox.
</Callout>

## Install the CLI [#install-the-cli]

```bash
npm install -g @munitoai/cli
```

The command is `munito`. See [the command line tool](https://docs.munito.ai/cli).

## Install it in a sandbox [#install-it-in-a-sandbox]

```bash
munito create --persistent --agent prime
munito ssh <sandbox id>
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
```

`--agent prime` writes `~/.prime/agent/models.json` and puts the key in `MUNITO_API_KEY` before you connect, so
the agent is pointed at Munito AI as soon as the installer ends. A create does the same:

```bash
curl -sS --fail-with-body https://api.munito.ai/sandboxes/v1/sandboxes \
  -H "Authorization: Bearer $MUNITO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template": "agent", "agent": "prime", "internet": true,
       "env": {"MUNITO_API_KEY": "'"$MUNITO_API_KEY"'"}}'
```

The file names the global host. For the EU host, replace `baseUrl` with
`https://api.eu.munito.ai/inference/v1`, or pass `--region eu`. See [Regions](https://docs.munito.ai/regions).
`munito init prime` in [the command line tool](https://docs.munito.ai/cli) writes the same file on your own machine.
