PC with a graphics card? Pick the card's memory (VRAM). Why?
This needs at least 32 GB. It may not run, or run very slowly.
Your modelGemma 4 12Bby Google · needs about 11.2 GBAbout 25% as smart as Claude Opus 5.5Compare other models
1
Install Ollama
Ollama downloads AI models and runs them on your computer. Open the Terminal app and paste this. It may ask for your Mac password.
curl -fsSL https://ollama.com/install.sh | sh
Or download the app from ollama.com/download
You should see: Run ollama --version. It prints a version number. If it also says “could not connect”, open Ollama from your Applications folder, wait a few seconds, then go on.
2
Download your model
This is the AI itself. It is one big file, so it takes a few minutes.
ollama pull gemma4:12b
You should see: The download finishes with “success”.
3
Give the model a long memory
Agents read a lot at once. Quit the Ollama menu-bar app, then start Ollama like this. Leave this window open.
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
4
Install Hermes Agent
In a second Terminal window, this one command installs Hermes and connects it to your model. If it asks for a model, pick gemma4:12b.
ollama launch hermes
You should see: Run hermes doctor. It shows no blocking errors.
5
Talk to it
Start Hermes and give it a small job.
hermes
You should see: It answers, and it remembers what you said next time.
6
Optional: chat from your phone
Hermes can connect to Telegram, Discord, Slack, WhatsApp, Signal or email.
Add -s -- plan to print every step and run nothing, verify to only check, rollback --yes to undo. 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.
AGENT VIEW · text/markdown · or send Accept: text/markdown
# Recipe: An agent that does tasks
A personal AI agent that remembers you, uses tools, learns skills and can chat with you from your phone.
URL: https://insidethemachine.ai/do/agent
Memory: needs 32 GB+, best with 64 GB+. Platform: macOS (Apple silicon) first.
Commands checked against each tool's official docs on 2026-10-15. Not yet run end to end on our Mac Studio.
## Model by memory (replace {MODEL})
| RAM GB | model | ollama tag | needs GB |
|---|---|---|---|
| 8 | Qwen3.5 4B | qwen3.5:4b | 5.8 |
| 16 | Gemma 4 12B | gemma4:12b | 11.2 |
| 24 | Gemma 4 12B | gemma4:12b | 11.2 |
| 32 | Qwen3.8 27B | qwen3.8:27b | 22.7 |
| 48 | Qwen3.8 27B | qwen3.8:27b | 22.7 |
| 64 | Qwen3.8 27B | qwen3.8:27b | 22.7 |
| 96 | Qwen3.8 27B | qwen3.8:27b | 22.7 |
| 128 | Qwen3.8 27B | qwen3.8:27b | 22.7 |
| 192 | Qwen3.8-Flash-Next (125B-A6B) | qwen3.8-flash-next:125b-a6b | 140 |
| 256 | Qwen3.8-Flash-Next (125B-A6B) | qwen3.8-flash-next:125b-a6b | 140 |
| 512 | Qwen3.8-Flash-Next (125B-A6B) | qwen3.8-flash-next:125b-a6b | 140 |
## Steps
1. **Install Ollama**: Ollama downloads AI models and runs them on your computer. Open the Terminal app and paste this. It may ask for your Mac password.
```sh
curl -fsSL https://ollama.com/install.sh | sh
```
(Or download the app from ollama.com/download)
Expect: Run `ollama --version`. It prints a version number. If it also says “could not connect”, open Ollama from your Applications folder, wait a few seconds, then go on.
2. **Download your model**: This is the AI itself. It is one big file, so it takes a few minutes.
```sh
ollama pull {MODEL}
```
Expect: The download finishes with “success”.
3. **Give the model a long memory**: Agents read a lot at once. Quit the Ollama menu-bar app, then start Ollama like this. Leave this window open.
```sh
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
```
4. **Install Hermes Agent**: In a second Terminal window, this one command installs Hermes and connects it to your model. If it asks for a model, pick {MODEL}.
```sh
ollama launch hermes
```
Expect: Run `hermes doctor`. It shows no blocking errors.
5. **Talk to it**: Start Hermes and give it a small job.
```sh
hermes
```
Expect: It answers, and it remembers what you said next time.
6. **Optional: chat from your phone**: Hermes can connect to Telegram, Discord, Slack, WhatsApp, Signal or email.
```sh
hermes gateway setup
```
## Alternative
Next: give it more tools MCP servers are plug-ins that let an agent use files, git, the web and more. Start with the official ones. (https://insidethemachine.ai/setups/mcp-servers)
## Rollback
- `hermes uninstall` (Keeps your data in ~/.hermes. Add --full to remove it too.)
- `ollama rm {MODEL}`
## One-command install
```bash
curl -fsSL https://insidethemachine.ai/install/agent.sh | bash # install, then check
curl -fsSL https://insidethemachine.ai/install/agent.sh | bash -s -- plan # print only
curl -fsSL https://insidethemachine.ai/install/agent.sh | bash -s -- rollback --yes
```
Run status and Windows: https://insidethemachine.ai/install/agent.md. The script picks {MODEL} from the machine's memory (override: ITM_RAM, ITM_MODEL).
## Notes
- Agents need more memory than chat because they read long instructions every turn. 64 GB is comfortable.
- Hermes changes fast. If a command fails, check its docs.
## If something goes wrong
- “could not connect to ollama app, is it running?”: Ollama is not running. Open Ollama from your Applications folder, or run `ollama serve` in a new Terminal window and leave it open.
- “command not found: ollama”: Close the Terminal window and open a new one. If it still fails, run the install command again.
- “model requires more system memory”: The model is too big for your memory. Pick a smaller memory size at the top of this page and use that model. Close other big apps too.
- “file does not exist” when you download: The model name is wrong, or Ollama is too old. Copy the command again from this page. Then update Ollama: run the install command again.
- It is very slow: Run `ollama ps`. PROCESSOR should say 100% GPU. If it shows CPU, the model does not fit in memory. Pick a smaller model.
- The computer freezes, or the fan is loud: The model uses all your memory. Stop it with `ollama stop {MODEL}`. Then use a smaller one.
- “hermes: command not found”: Close the Terminal window and open a new one. Then try again.
- It forgets the start of a long job: Ollama was started without the long memory. Quit Ollama and run step 3 again.
## After it works
- Try it: tell it your name and one thing you like. Close it, open it again, and ask what it remembers.
- Give it one small job a day, for example “sort the files in my Downloads folder”. Check what it did.
- See every model you have: `ollama list`.
- Try a different model: copy any `ollama run` name from the Models page.
- Update your model: run `ollama pull {MODEL}` again. It only downloads what changed.
- Free disk space: `ollama rm {MODEL}` deletes a model you no longer use.
## Windows / Linux (not tested by us)
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.
```powershell
irm https://ollama.com/install.ps1 | iex
```
(Windows: paste in PowerShell. Or get the installer from ollama.com/download)
```powershell
$env:OLLAMA_CONTEXT_LENGTH=64000; ollama serve
```
(PowerShell version of step 3)