{
  "kind": "recipe",
  "id": "agent",
  "title": "An agent that does tasks",
  "what": "It remembers you, uses tools and learns new skills.",
  "html": "https://insidethemachine.ai/do/agent",
  "md": "https://insidethemachine.ai/do/agent.md",
  "json": "https://insidethemachine.ai/do/agent.json",
  "memory": {
    "min_gb": 32,
    "good_gb": 64
  },
  "minutes": 30,
  "platform_priority": [
    "macos-apple-silicon",
    "linux",
    "windows"
  ],
  "tools": [
    {
      "slug": "hermes-agent",
      "name": "Hermes Agent",
      "md": "https://insidethemachine.ai/setups/hermes-agent.md"
    },
    {
      "slug": "mcp-servers",
      "name": "MCP Servers (official)",
      "md": "https://insidethemachine.ai/setups/mcp-servers.md"
    }
  ],
  "placeholders": {
    "{MODEL}": "ollama tag from model_by_memory_gb for the machine's RAM",
    "{WHISPER}": null
  },
  "model_by_memory_gb": {
    "8": {
      "name": "Qwen3.5 4B",
      "tag": "qwen3.5:4b",
      "gb": 5.8,
      "aa": 13.1,
      "maker": "Alibaba Qwen"
    },
    "16": {
      "name": "Gemma 4 12B",
      "tag": "gemma4:12b",
      "gb": 11.2,
      "aa": 14.2,
      "maker": "Google"
    },
    "24": {
      "name": "Gemma 4 12B",
      "tag": "gemma4:12b",
      "gb": 11.2,
      "aa": 14.2,
      "maker": "Google"
    },
    "32": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "48": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "64": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "96": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "128": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "192": {
      "name": "Qwen3.8-Flash-Next (125B-A6B)",
      "tag": "qwen3.8-flash-next:125b-a6b",
      "gb": 140,
      "aa": 39.8,
      "maker": "Alibaba Qwen"
    },
    "256": {
      "name": "Qwen3.8-Flash-Next (125B-A6B)",
      "tag": "qwen3.8-flash-next:125b-a6b",
      "gb": 140,
      "aa": 39.8,
      "maker": "Alibaba Qwen"
    },
    "512": {
      "name": "Qwen3.8-Flash-Next (125B-A6B)",
      "tag": "qwen3.8-flash-next:125b-a6b",
      "gb": 140,
      "aa": 39.8,
      "maker": "Alibaba Qwen"
    }
  },
  "frontier": {
    "name": "Claude Opus 5.5",
    "aa": 57.6
  },
  "tested": "Commands checked against each tool's official docs on 2026-10-15. Not yet run end to end on our Mac Studio.",
  "recipe": {
    "id": "agent",
    "get": "A personal AI agent that remembers you, uses tools, learns skills and can chat with you from your phone.",
    "model": "agent",
    "steps": [
      {
        "title": "Install Ollama",
        "body": "Ollama downloads AI models and runs them on your computer. Open the Terminal app and paste this. It may ask for your Mac password.",
        "cmds": [
          {
            "run": "curl -fsSL https://ollama.com/install.sh | sh",
            "note": "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."
      },
      {
        "title": "Download your model",
        "body": "This is the AI itself. It is one big file, so it takes a few minutes.",
        "cmds": [
          {
            "run": "ollama pull {MODEL}"
          }
        ],
        "expect": "The download finishes with “success”."
      },
      {
        "title": "Give the model a long memory",
        "body": "Agents read a lot at once. Quit the Ollama menu-bar app, then start Ollama like this. Leave this window open.",
        "cmds": [
          {
            "run": "OLLAMA_CONTEXT_LENGTH=64000 ollama serve"
          }
        ]
      },
      {
        "title": "Install Hermes Agent",
        "body": "In a second Terminal window, this one command installs Hermes and connects it to your model. If it asks for a model, pick {MODEL}.",
        "cmds": [
          {
            "run": "ollama launch hermes"
          }
        ],
        "expect": "Run `hermes doctor`. It shows no blocking errors."
      },
      {
        "title": "Talk to it",
        "body": "Start Hermes and give it a small job.",
        "cmds": [
          {
            "run": "hermes"
          }
        ],
        "expect": "It answers, and it remembers what you said next time."
      },
      {
        "title": "Optional: chat from your phone",
        "body": "Hermes can connect to Telegram, Discord, Slack, WhatsApp, Signal or email.",
        "cmds": [
          {
            "run": "hermes gateway setup"
          }
        ]
      }
    ],
    "alt": {
      "slug": "mcp-servers",
      "title": "Next: give it more tools",
      "body": "MCP servers are plug-ins that let an agent use files, git, the web and more. Start with the official ones.",
      "href": "/setups/mcp-servers"
    },
    "next": {
      "href": "/guides/agent",
      "title": "Then: the advanced agent guide",
      "body": "Give your agent rules and an identity, keep its memory lean, and let it install what it is missing."
    },
    "undo": [
      {
        "run": "hermes uninstall",
        "note": "Keeps your data in ~/.hermes. Add --full to remove it too."
      },
      {
        "run": "ollama rm {MODEL}"
      }
    ],
    "know": [
      "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."
    ],
    "fix": [
      {
        "q": "“could not connect to ollama app, is it running?”",
        "a": "Ollama is not running. Open Ollama from your Applications folder, or run `ollama serve` in a new Terminal window and leave it open."
      },
      {
        "q": "“command not found: ollama”",
        "a": "Close the Terminal window and open a new one. If it still fails, run the install command again."
      },
      {
        "q": "“model requires more system memory”",
        "a": "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."
      },
      {
        "q": "“file does not exist” when you download",
        "a": "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."
      },
      {
        "q": "It is very slow",
        "a": "Run `ollama ps`. PROCESSOR should say 100% GPU. If it shows CPU, the model does not fit in memory. Pick a smaller model."
      },
      {
        "q": "The computer freezes, or the fan is loud",
        "a": "The model uses all your memory. Stop it with `ollama stop {MODEL}`. Then use a smaller one."
      },
      {
        "q": "“hermes: command not found”",
        "a": "Close the Terminal window and open a new one. Then try again."
      },
      {
        "q": "It forgets the start of a long job",
        "a": "Ollama was started without the long memory. Quit Ollama and run step 3 again."
      }
    ],
    "after": [
      "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."
    ],
    "win": {
      "body": "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.",
      "cmds": [
        {
          "run": "irm https://ollama.com/install.ps1 | iex",
          "note": "Windows: paste in PowerShell. Or get the installer from ollama.com/download"
        },
        {
          "run": "$env:OLLAMA_CONTEXT_LENGTH=64000; ollama serve",
          "note": "PowerShell version of step 3"
        }
      ]
    },
    "tested": "Commands checked against each tool's official docs on 2026-10-15. Not yet run end to end on our Mac Studio."
  }
}