NAIRR Workshop · Jetstream2
Your First AI Agent: Hermes
Install the open-source Hermes Agent, point it at a free local model on a CPU instance, and watch it take actions — not just answer questions.
First — engine vs. agent
Notebook 04 ran engines (Ollama, llama.cpp, Transformers). This one introduces an agent. Same kind of model underneath — completely different idea.
🔧 An engine
Takes a prompt, returns text. It answers. That's the whole job.
🤖 An agent
Uses the model as a brain to take actions — it can run commands, read and write files, use tools, and remember across chats. The model decides what to do.
Before you begin
- A running m3.quad instance with Jupyter open — set it up exactly as in the Workshop 04 setup guide (Steps 1–4).
- Doing notebook 04 first is ideal (Ollama is already installed) — but not required, this notebook will install Ollama for you if needed.
Open notebook 05 and run the setup cells
In JupyterLab, open:
05_Hermes_Agent_Intro.ipynb
Run the cells from the top (Shift+Enter, or Run → Run All Cells). They do three things, in order:
| Cell | What it does |
|---|---|
| Step 1 — Ollama | Makes sure a small local model (qwen2.5:3b) is downloaded and running. This is the agent's "brain." |
| Step 2 — Install Hermes | Runs the official Hermes installer (a few minutes — it sets up Python, Node.js, and tools). |
| Step 3 — Configure | Points Hermes at your local Ollama (no API key needed) by writing ~/.hermes/config.yaml. |
The install step is the slow one
Step 2 downloads and sets up several tools — give it a few minutes. It only happens once per instance. When the cells finish, the notebook tells you to switch to the Terminal.
Open the Terminal and start Hermes
Hermes's chat is a full-screen terminal app, so we run it there — not in a notebook cell. In the Web Desktop, open the Terminal and run:
The first time, Hermes may show a quick setup screen — accept the defaults (it will use the local-Ollama settings the notebook wrote in Step 3).
"command not found: hermes"?
The installer added Hermes to your shell startup, which a Terminal only reads when it opens. Open a new Terminal window, or run source ~/.bashrc first, then hermes again.
Talk to your agent — and watch what it does
Type these one at a time. Watch the screen, not just the final answer:
A plain answer — this is the "engine" part: the model just responds.
Now watch Hermes call a tool — it runs a real command and answers from the actual result.
Hermes takes an action on your instance. Check it with ls / cat hello.txt.
The takeaway to land
The model didn't just describe how to do these — Hermes turned its decisions into real actions (running commands, writing files). That's the leap from an engine to an agent. With a small CPU model it won't pick the right tool every time — that's expected; the goal is to see the mechanism.
Leave the chat with /exit (or Ctrl+C).
Troubleshooting
| Problem | Fix |
|---|---|
| command not found: hermes | Open a new Terminal, or run source ~/.bashrc first. |
| Hermes feels slow to reply | Expected on a CPU instance with a 3B model. For snappier replies, change MODEL in the notebook's Step 1 cell to qwen2.5:0.5b and re-run (it's faster but weaker at choosing tools). |
| It answers but won't use a tool | Small models are inconsistent at tool-calling. Re-phrase ("use a tool to…"), or try again — the point is to see it work at least once. |
| Disk space errors during install | Start a fresh m3.quad (clean 20 GB), or remove old model caches with rm -rf ~/.cache/huggingface. |
| I'm done — avoid using credits | Back in the Jetstream2 portal, Shelve or Delete your instance. |
What this teaches
An agent = a model + the ability to act. Hermes shows the whole pattern — tools, memory, and skills — running on free NAIRR compute with a local model. Explore more with hermes model, hermes tools, and the docs at hermes-agent.nousresearch.com/docs.