---
slug: agent
kind: recipe
status: docs-checked
sh: https://insidethemachine.ai/install/agent.sh
ps1: https://insidethemachine.ai/install/agent.ps1
json: https://insidethemachine.ai/install/agent.json
page: https://insidethemachine.ai/do/agent
---

# Install: An agent that does tasks

A personal AI agent that remembers you, uses tools, learns skills and can chat with you from your phone.

**Run status: Not run: commands checked against the official docs only.** Commands checked against each tool's official docs on 2026-10-15. Not yet run end to end.

**This script:** The wrapper scripts are generated from the site data. Every .sh passed bash -n and shellcheck and ran in plan mode on Linux (Debian 13). Every .ps1 passed the PowerShell parser and chat.ps1 ran in plan, verify and rollback mode under PowerShell 7 on Linux with Windows calls mocked. Not run on macOS or real Windows.

## One command

```bash
curl -fsSL https://insidethemachine.ai/install/agent.sh | bash
```

Windows (PowerShell):

```powershell
irm https://insidethemachine.ai/install/agent.ps1 | iex
```

Actions: `| bash -s -- plan` (print only), `verify`, `rollback --yes`. Env: ITM_RAM, ITM_MODEL. Read the script first: `curl -fsSL https://insidethemachine.ai/install/agent.sh | less`.

Lines marked YOU RUN are not run by the script (servers, interactive apps, your own files). The script prints them at the end, in order.

## Model by memory (picked automatically)

| memory GB (at least) | ollama tag |
|---|---|
| 8 | qwen3.5:4b |
| 16 | gemma4:12b |
| 24 | gemma4:12b |
| 32 | qwen3.8:27b |
| 48 | qwen3.8:27b |
| 64 | qwen3.8:27b |
| 96 | qwen3.8:27b |
| 128 | qwen3.8:27b |
| 192 | qwen3.8-flash-next:125b-a6b |
| 256 | qwen3.8-flash-next:125b-a6b |
| 512 | qwen3.8-flash-next:125b-a6b |

## Steps

### macOS and Linux (bash; brew lines are macOS only)

Install:

1. **Install Ollama**
   - run: `curl -fsSL https://ollama.com/install.sh | sh`
2. **Download your model**
   - run: `ollama pull $MODEL`
3. **Give the model a long memory**
   - YOU RUN (starts a server that keeps running; run it in its own window): `OLLAMA_CONTEXT_LENGTH=64000 ollama serve`
4. **Install Hermes Agent**
   - YOU RUN (interactive; run it yourself): `ollama launch hermes`
5. **Talk to it**
   - YOU RUN (interactive; run it yourself): `hermes`
6. **Optional: chat from your phone**
   - YOU RUN (interactive; run it yourself): `hermes gateway setup`

Verify:

- `ollama --version` → expect: a version number
- `ollama list | grep -F "${MODEL%%:*}"` → expect: your model is in the list
- by hand: `hermes doctor` → expect: no blocking errors (after you ran `ollama launch hermes`)

Rollback:

- run: `hermes uninstall`
- run: `ollama rm $MODEL`

### Windows (PowerShell, not run by us)

Install:

1. **Install Ollama**
   - run: `irm https://ollama.com/install.ps1 | iex`
   - YOU RUN (starts a server that keeps running; run it in its own window): `$env:OLLAMA_CONTEXT_LENGTH=64000; ollama serve`
2. **Download your model**
   - run: `ollama pull $MODEL`
3. **The rest of the recipe**
   - note: Install Ollama with this PowerShell command, or the installer from ollama.com/download. On Linux, the install command above works as it is. After that, every ollama command on this page is the same. In PowerShell, start Ollama with a long memory like this. Hermes Agent's page has its Windows install line. Steps: https://insidethemachine.ai/do/agent

Verify:

- `ollama --version` → expect: a version number
- `ollama list` → expect: your model is in the list

Rollback:

- run: `ollama rm $MODEL`
