AI HORIZON

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.

⏱ About 20–30 minutes 💻 CPU instance — no GPU 🧩 Notebook 05

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.
1

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:

CellWhat it does
Step 1 — OllamaMakes sure a small local model (qwen2.5:3b) is downloaded and running. This is the agent's "brain."
Step 2 — Install HermesRuns the official Hermes installer (a few minutes — it sets up Python, Node.js, and tools).
Step 3 — ConfigurePoints 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.

2

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:

hermes

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.

3

Talk to your agent — and watch what it does

Type these one at a time. Watch the screen, not just the final answer:

1. What is the NAIRR pilot, in two sentences?
A plain answer — this is the "engine" part: the model just responds.
2. What files are in my home directory? Use a tool to check, don't guess.
Now watch Hermes call a tool — it runs a real command and answers from the actual result.
3. Make a file called hello.txt that says "Hello from Hermes".
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

ProblemFix
command not found: hermesOpen a new Terminal, or run source ~/.bashrc first.
Hermes feels slow to replyExpected 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 toolSmall 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 installStart a fresh m3.quad (clean 20 GB), or remove old model caches with rm -rf ~/.cache/huggingface.
I'm done — avoid using creditsBack 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.

NAIRR Workshop Series · Workshop 01 — Notebook 05: Intro to AI Agents (Hermes)
Part of the AI Horizon project · NSF #2528858 · CSUSB Center for Cyber and AI