Half-day hands-on workshop
Ollama + Hermes Agent for everyday academic work
Chatbot
→
Agent
→
Automation
Ts. Dr. Mohd Nor Akmal Khalid · CAIT, FTSM, Universiti Kebangsaan Malaysia
Today’s journey · about 4½ hours
08:30 Welcome and machine check
10:00 Coffee break
12:30 Wrap-up and Q&A
01 · 09:00–10:00
Install Ollama, download a model, chat offline, give it a persona.
02 · 10:15–11:30
Install Hermes so it can read and write files. Cases: student records, article review.
03 · 11:30–12:30
Scheduled tasks and email. Cases: RSVP collection, meeting minutes, auto-replies.
Why local?
Student records and unpublished manuscripts never leave your machine.
After a one-time model download, every prompt is free and unlimited.
In a seminar room with weak Wi‑Fi, or on the road between campuses.
The trade-off: local models are smaller than cloud chatbots. Great for drafting, sorting and summarising. Always check facts.
Sources: Personal Data Protection Act 2010 (Act 709), pdp.gov.my · Elsevier, “Generative AI in the review process”, elsevier.com/about/policies-and-standards
Key idea
LEVEL 1
You ask, it answers. “Draft a reminder email.”
LEVEL 2
You give a goal. It plans, uses tools (files, terminal, web) and checks its work.
“Update the register from these 30 CSV files.”
LEVEL 3
A trigger fires (a time, an email). The agent runs the steps. You review.
“Every Friday 5 pm, tally RSVPs and email the organiser.”
After: Anthropic (2024), “Building effective agents”, anthropic.com/engineering/building-effective-agents
Meet the tools · both free and open source
THE ENGINE
Downloads and runs the AI model on your laptop. Gives you a chat window and a local address other apps can talk to.
ollama.com
HANDS + NOTEBOOK
By Nous Research. Uses tools (files, terminal, web), remembers you, learns skills, runs scheduled tasks, answers email.
hermes-agent.nousresearch.com
127.0.0.1 :11434
Sources: github.com/ollama/ollama (MIT) · github.com/NousResearch/hermes-agent (MIT)
00
Five minutes now saves an hour later. Find your RAM, then pick a model that fits.
00 · Choose your models
| Laptop memory | Chat · Module 1 | Agent · Modules 2–3 | Your data |
|---|---|---|---|
| 8 GB | qwen3.5:4b | gemma4:cloud | Agent work leaves the laptop |
| 16 GB | qwen3.5:9b | gemma4:cloud, or a 64K copy of qwen3.5:9b for simple file tasks | Local copy stays private |
| 32 GB+ | qwen3.5:9b | A 64K copy of gemma4:31b (20 GB) | Fully private |
| Older laptop | gemma4:cloud for both | Practice data only | |
Why two? Small laptop models chat well but often fumble tools. Hermes's own guide lists gemma4:31b as the local model that calls tools reliably. Cloud models need a free ollama.com account.
Sources: hermes-agent.nousresearch.com/docs/guides/local-ollama-setup · ollama.com/library · ollama.com/pricing · checked 22 Oct 2026
00 · Find your specs
Needs 64-bit Windows 10 (21H2+) or Windows 11
Ollama needs macOS 14 Sonoma or later
Before the day: keep 15 GB free disk space, install Ollama and download your model at home. Models are several GB.
Source: docs.ollama.com (system requirements: Windows, macOS)
01
Install Ollama, download a model, and have your first private conversation.
01 · Step 1 of 6
LINUX? PASTE THIS IN THE TERMINAL INSTEAD
curl -fsSL https://ollama.com/install.sh | sh
Source: ollama.com/download · docs.ollama.com · animation is an illustration, not the real site
01 · Step 2 of 6
Ollama now runs quietly in the background, and starts with your computer.
Source: docs.ollama.com/windows · docs.ollama.com/macos
01 · Step 3 of 6
A text window: you type a command, press Enter, the computer replies.
WINDOWS
Start → type PowerShell → Enter
MACOS
Cmd + Space → type Terminal → Enter
GOLDEN RULES
Copy and paste commands exactly. One command, one Enter. Red text is a message, not a disaster: read it, then raise your hand.
01 · Step 4 of 6
Type this and press Enter:
ollama --version
SUCCESS
You see a version number. Any number is fine.
“NOT RECOGNIZED”
Close the terminal, open a new one, try again.
Your version number will differ. Source: docs.ollama.com
01 · Step 5 of 6
ollama pull qwen3.5:9b
See what you have:
ollama list
Sizes shown are illustrative. Browse models: ollama.com/library · Source: docs.ollama.com
01 · Step 6 of 6
ollama run qwen3.5:9b
Unplug the Wi‑Fi and try again. It still works: the model lives on your laptop.
Source: docs.ollama.com/cli
01 · No-terminal option
SAME BRAIN, TWO DOORS
The app and the terminal use the same downloaded models. Use whichever feels easier.
Source: Ollama’s desktop app for macOS and Windows, ollama.com/blog/new-app (July 2025) · window is an illustration
01 · Keep this handy
ollama pull <model>
Download a model
ollama run <model>
Chat with it
ollama list
What is downloaded
ollama ps
What is running, on GPU or CPU
ollama rm <model>
Delete a model to free disk space
/bye
Leave a chat (inside ollama run)
Source: docs.ollama.com/cli · replace <model> with a name such as qwen3.5:9b
01 · Make it yours
Modelfile
FROM qwen3.5:9b
SYSTEM """You are Pembantu Akademik, an assistant for university lecturers. Reply in formal Bahasa Malaysia unless asked otherwise. Be concise. Say “saya tidak pasti” when unsure."""
PARAMETER temperature 0.3
FROM · which brain to start from
SYSTEM · standing instructions it always follows
temperature · 0 = focused, 1 = creative
1. Save as Modelfile in Documents (Notepad: “All files”; TextEdit: plain text)
2. cd Documents then ollama create pembantu -f Modelfile
3. ollama run pembantu
Source: Ollama Modelfile reference, docs.ollama.com/modelfile
01 · One setting before Module 2
Context length = how much text the model can hold in mind at once: your chat, files, tool results.
DEFAULT ON MOST LAPTOPS
4k
WHAT AGENTS NEED
64k
Ollama app → Settings → Context length → 64k. Hermes refuses anything smaller. Check with ollama ps.
Source: docs.ollama.com/context-length (defaults: 4k under 24 GiB VRAM; agents: at least 64,000 tokens)
01 · Checkpoint · 10 minutes
SUMMARISE
“Summarise this abstract in 3 bullet points for a first-year student:” [paste]
TRANSLATE
“Translate into formal Bahasa Malaysia, no English terms mixed in:” [paste]
DRAFT
“Draft a polite email declining Thursday’s meeting and offering two other slots.”
Now ask it to “open students.csv”. It can’t. A chatbot only talks. Next, we give it hands.
02
Give the model hands (tools), a notebook (memory) and habits (skills).
02 · Key idea
You give a goal. The model thinks, picks a tool, reads the result, and repeats until done.
A chatbot stops after one reply. An agent keeps going.
Known in research as ReAct: reasoning and acting, interleaved.
Yao, S. et al. (2023). ReAct: Synergizing reasoning and acting in language models. ICLR. doi.org/10.48550/arXiv.2210.03629
02 · Inside Hermes
Brain: your Ollama model
Hermes Agent
Read and write files, run commands, search the web
Remembers you and your preferences across sessions
Saved how-tos it reuses and improves
Runs tasks by itself, daily or weekly
Gateway · email, Telegram, WhatsApp
Source: hermes-agent.nousresearch.com/docs (Tools, Memory, Skills, Cron, Messaging)
02 · Install route A · macOS and Linux
ollama launch hermes
Ollama connects Hermes to your model at 127.0.0.1:11434/v1 for you.
Source: docs.ollama.com/integrations/hermes · menu text is illustrative
02 · Install route B · Windows, or if route A fails
1 · INSTALL
Download Hermes Desktop from hermes-agent.nousresearch.com and run it
2 · CONNECT · in a terminal, type hermes setup
Quick setup → More providers → Custom endpoint
URL: http://127.0.0.1:11434/v1
API key: leave blank · Context length: type 65536
Sources: hermes-agent.nousresearch.com/docs/getting-started/installation · docs.ollama.com/integrations/hermes (manual setup)
02 · Find your route
| Your computer | Easiest route | Type or download |
|---|---|---|
| Windows 10 / 11 | Hermes Desktop installer | hermes-agent.nousresearch.com → Download |
| Windows, command line | PowerShell one-liner | iex (irm https://hermes-agent.nousresearch.com/install.ps1) |
| Mac, Apple silicon | Route A, or Desktop | ollama launch hermes |
| Linux or WSL2 | Route A, or script | curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash |
| Intel Mac | Not supported | Pair with a colleague for today |
Something wrong? Type hermes doctor. It tells you what is missing and how to fix it.
Source: hermes-agent.nousresearch.com/docs/getting-started/installation (Intel Macs: not a supported platform)
02 · Before your first task
Hermes's instructions and tool list take about 13K tokens. Ollama often runs a local model at 4K, so the instructions get cut off and every tool call fails, whatever the model.
LOCAL MODEL · make a 64K copy once
Save a text file named Modelfile with two lines:
FROM qwen3.5:9b
PARAMETER num_ctx 65536
ollama create qwen3.5-64k -f Modelfile
Then hermes model → choose qwen3.5-64k
Cloud model? Run ollama signin once. Cloud models already use their full window.
Sources: github.com/NousResearch/hermes-agent/issues/43900 · hermes-agent.nousresearch.com/docs/guides/local-ollama-setup · docs.ollama.com/context-length
02 · First conversation
Type hermes in a terminal, or open Hermes Desktop. Then ask:
“What files are in my Documents/Workshop folder?”
Lines with ⚙ = the agent using a tool. No ⚙ and a made-up answer? Go back to the 64K slide.
Source: hermes-agent.nousresearch.com/docs/user-guide/cli · conversation is an illustration
02 · Before it touches your files
Risky commands pause and wait for your answer.
Read the command before you answer
Unsure? Press d to deny. That is the default
Never switch on /yolo with real data
Work on copies, keep originals elsewhere
Source: hermes-agent.nousresearch.com/docs/user-guide/security (approval modes, hardline blocklist, checkpoints and rollback)
02 · Practice folder
Documents/
└ Workshop/
├ students/
│ students.csv
├ reviews/
│ manuscript_042.pdf
├ events/
│ rsvp_*.csv · meeting_notes.txt
└ outputs/ ← agent saves here
students.csv · first rows
| matric | name | attend% | quiz1 |
|---|---|---|---|
| A21102 | Lim Wei Jie | 72 | 14 |
| A21187 | Siti Hajar | 95 | 17 |
| A21345 | Aisyah Rahman | 78 | 15 |
Fake data only today. Unzip workshop_pack.zip into Documents. Every name in it is invented.
Case study 1 · Student records
C
CREATE
“Add student A21399, Nur Iman, BSc Computer Science.”
R
READ
“Who has attendance below 80%? Show a table.”
U
UPDATE
“Set quiz1 for A21345 to 18. Show the row before and after.”
D
DELETE, SAFELY
“Move A21102 to withdrawn.csv instead of deleting.”
Start every session with: “First, copy students.csv to students_backup.csv.”
Case study 1 · Watch it work
Illustration with invented data · tool names from hermes-agent.nousresearch.com/docs/user-guide/features/tools
Case study 2 · Why a long paper fails
Ollama’s default
4K tokens
manuscript_042 (29 pages)
≈10K tokens
Hermes needs at least
64K tokens
A PhD thesis (80,000 words)
≈110K tokens
The window also holds the agent’s own instructions, its tools and your chat. A whole thesis never fits on a laptop, so we read it in sections.
Sources: docs.ollama.com/context-length · Hermes quickstart (64K minimum) · token counts are estimates (1 token ≈ ¾ of an English word) · bars to scale
Case study 2 · Memory cost
| Model | Download | Longest window | Extra RAM at 64K | Can Hermes use it? |
|---|---|---|---|---|
| qwen3:8b | 5.2 GB | 40K | – | No, too short |
| qwen3.5:4b | 3.3 GB | 256K | ≈ 2 GB | Yes · 8 GB laptop, tight |
| qwen3.5:9b | 6.6 GB | 256K | ≈ 2 GB | Yes · 16 GB laptop |
| gemma4:e4b | 6.6 GB | 128K | check ollama ps | Yes · 16 GB laptop |
| gemma4:31b | 20 GB | 256K | check ollama ps | Best for tools · 32 GB+ |
Qwen3.5 keeps full long-range memory in only 8 of its 32 layers, so a long window is cheap. Use the 64K copy, then run ollama ps: the CONTEXT column should say 65536.
Sizes and windows: ollama.com/library (22 Oct 2026) · Extra RAM: our estimate from the Qwen3.5 model configs on huggingface.co, before runtime overhead
Case study 2 · The method
python3 tools/review_by_section.py reviews/manuscript_042.pdf
· Windows: py instead of python3
tools/review_by_section.py is in the workshop pack. Each part is about 2,500 words, so it fits a 16K window, even on an 8 GB laptop.
Case study 2 · You are the reviewer
LANE A · JOURNAL ALLOWS AI ASSISTANCE
“Run tools/review_by_section.py on reviews/manuscript_042.pdf. Then read outputs/review_manuscript_042/02_draft_report.md and list the five most serious concerns.”
The tool reads it section by section. Then verify every point against the paper and rewrite in your own voice.
LANE B · JOURNAL FORBIDS IT (e.g. Elsevier)
“Turn my notes in reviews/my_notes.txt into the journal’s report template. Fix grammar only. Do not add new points.”
The agent never sees the manuscript. The judgement is entirely yours.
Sources: Elsevier, “The use of generative AI … in the review process” (elsevier.com) · COPE position statement, publicationethics.org · PDF tool needs: pip install pypdf (or use the .txt copy)
Case study 2 · Set expectations
GOOD AT, ONE SECTION AT A TIME
Missing method details and unclear writing
Numbers that disagree between sections
Citations missing from the reference list (done by code)
Thesis: does each objective get answered?
Drafting viva questions and response tables
NOT RELIABLE: STAYS YOUR JOB
Judging novelty against the latest literature
Checking statistics or reproducing results
Reading charts and images in the PDF (text only)
Whole-thesis judgement in a single pass
The accept / reject or pass / fail decision
A thesis becomes 20–40 parts, so expect a long run on a laptop: start it before lunch, or schedule it overnight with hermes cron.
Case study 2 · You are the author
“Read reviewer_comments.txt. Build a table: number, comment, polite draft reply, where to change. Mark anything needing new data as [AUTHOR TO DECIDE].”
| # | Reviewer comment | Draft response | Change made |
|---|---|---|---|
| R1.1 | Sample size not justified | Thank you. We have added a power analysis. | Sec 3.2, p. 6 |
| R1.2 | Figure 3 is hard to read | We redrew Figure 3 with larger labels. | Fig. 3 |
| R2.1 | Compare with newer baselines | [AUTHOR TO DECIDE] Which baselines can we run? | Table 4 |
Rule: it drafts the wording. You supply the science. Never let it claim work you did not do.
02 · Make it stick
Facts about you, kept across sessions.
“Remember: I teach Data Mining, and official letters must be in formal Bahasa Malaysia.”
Next week it already knows.
A saved how-to for a task that went well.
“Save what you just did as a skill called response-table.”
Reuse with /response-table · list with /skills
Sources: hermes-agent.nousresearch.com/docs/user-guide/features/memory and /skills · skills follow the open agentskills.io format
03
Let the agent work while you teach: on a schedule, or when an email arrives.
03 · Key idea
WORKFLOW
same steps every time
Friday 5 pm
Read RSVPs
Tally
Draft email
You review
AGENT
chooses its own steps
Goal: “Find out why RSVPs dropped this week.” It decides what to open, compare and ask.
TRIGGER: A TIME
Every Friday 5 pm → scheduled task
TRIGGER: A MESSAGE
New email in the event inbox → gateway
TRIGGER: A FILE
New RSVP file → picked up by an hourly check
Workflow vs agent distinction after Anthropic (2024), “Building effective agents”, anthropic.com/engineering/building-effective-agents
03 · Scheduled tasks
JUST ASK, IN PLAIN WORDS
“Every weekday at 8 am, check events/ for new RSVP files and update outputs/attendees.csv.”
MANAGE THEM
hermes cron list · pause · run · remove
Keep the gateway on so timers fire: hermes gateway install runs it in the background.
Source: hermes-agent.nousresearch.com/docs/user-guide/features/cron · list output is illustrative
Case study 3 · Event data collection
“Every day at 8 am: merge events/rsvp_*.csv into outputs/attendees.csv, remove duplicate emails, count by faculty and dietary needs, and write a 5-line summary for the organiser.”
Illustration with invented numbers · export RSVPs from Google Forms or Microsoft Forms as CSV into events/
Case study 3 · Meeting minutes
meeting_notes.txt
mtg 20/10 10am bilik mesy
7 came, Hafiz apologised
agreed workshop 12 nov
Rina book lab by 27th
budget makan?? tbc
MINIT MESYUARAT JAWATANKUASA BENGKEL AI BIL. 3/2026
Tarikh: 20 Oktober 2026 · Masa: 10.00 pagi · Tempat: Bilik Mesyuarat
1. Kehadiran: 7 ahli hadir; 1 ahli memohon maaf
2. Keputusan: Bengkel diadakan pada 12 November 2026
3. Tindakan: Tempahan makmal · Pn. Rina · sebelum 27 Oktober
[SAHKAN] Peruntukan jamuan belum diputuskan
“Turn meeting_notes.txt into formal minutes in Bahasa Malaysia: attendance, decisions, actions (who, by when). Mark anything unclear as [SAHKAN].”
Case study 3 · Email auto-reply · setup
1
Create a dedicated event inbox. Never your personal one.
2
Turn on 2-step verification, then create an App Password
3
Run hermes gateway setup → Email → follow the questions
4
List allowed senders. Everyone else is ignored
5
Start it: hermes gateway install
Gmail hosts: imap.gmail.com and smtp.gmail.com. Auth ID: mx.google.com
Ask your IT office before linking any university account.
Give it an FAQ file and tell it to answer only from that.
Source: hermes-agent.nousresearch.com/docs/user-guide/messaging/email · App Passwords: myaccount.google.com/apppasswords
Case study 3 · Watch it reply
Illustration with invented names and numbers · replies are sent in-thread by the Hermes email gateway
03 · Connect apps · Telegram
1
In Telegram, message @BotFather → /newbot → pick a name ending in “bot” → copy the token
2
Message @userinfobot to get your numeric user ID
3
hermes gateway setup → Telegram → paste token and ID
4
hermes gateway, then say hi to your bot
Keep the token secret. Leaked? Send /revoke to BotFather. Only your ID can talk to it.
Source: hermes-agent.nousresearch.com/docs/user-guide/messaging/telegram · phone is an illustration with invented numbers
03 · Connect apps · Gmail
EASY · EMAIL SKILL + APP PASSWORD
No Google Cloud project needed. Create a Gmail App Password, then ask:
“Set up the himalaya email skill for my Gmail account.”
Hermes walks you through it, then can search, read and draft mail.
FULL · GOOGLE WORKSPACE SKILL (GMAIL API)
1. Google Cloud Console → new project → enable Gmail API
2. Credentials → OAuth client ID → Desktop app → download JSON
3. Ask: “Set up google-workspace for email with ~/Downloads/client_secret.json”
4. Open the link, approve, paste the address back. Done when it says AUTHENTICATED
Try: “Summarise my unread emails about the workshop.” Sending always asks you first.
Sources: Hermes skills docs: productivity/google-workspace and email/himalaya · university Google accounts may block this, so ask your IT office
03 · Connect apps · MCP
~/.hermes/config.yaml · example: a file tool locked to one folder
mcp_servers:
workshop_files:
command: "npx"
args:
- "-y"
- "@modelcontextprotocol/server-filesystem"
- "C:/Users/you/Documents/Workshop"
Then type /reload-mcp inside Hermes. Browse ready-made servers: hermes mcp catalog
Hermes
Files
GitHub
Docs, wikis…
Sources: hermes-agent.nousresearch.com/docs/user-guide/features/mcp · modelcontextprotocol.io · npx needs Node.js, which the Hermes installer provides
Before you go live
It can be confidently wrong. Check names, numbers, citations.
You approve, sign and own every output.
Least data needed, stored securely, as PDPA 2010 expects.
Journal, university and funder rules. Disclose AI use.
Copy files before any edit. Hermes can also roll back.
Run hermes update for security fixes.
Sources: PDPA 2010 (Act 709), pdp.gov.my · COPE, publicationethics.org · Hermes security and checkpoints docs
Help desk
| What you see | Try this |
|---|---|
| “ollama” or “hermes” not recognized | Close the terminal, open a new one. Still stuck? Restart the laptop |
| Answers are very slow | Use a smaller model. Run ollama ps: 100% GPU is best |
| Hermes cannot reach the model | Is Ollama running? URL must be http://127.0.0.1:11434/v1 |
| Tool calls fail, or it invents file names | ollama ps: CONTEXT must be 65536. Use the 64K copy, or gemma4:cloud |
| Mac: can’t open Downloads or Desktop | System Settings → Privacy & Security → Full Disk Access → turn on Terminal and Hermes |
| Windows: folder not found | OneDrive may hold it. Give the full path, e.g. C:\Users\you\OneDrive\Documents |
| Email gateway receives nothing | Check allowed senders, app password and the auth ID |
| Anything else | Run hermes doctor and read its advice |
Sources: docs.ollama.com/faq · hermes-agent.nousresearch.com/docs/reference/faq · github.com/NousResearch/hermes-agent/issues/43900 · Hermes desktop docs (Full Disk Access)
Your week-one challenge
1
Write a Modelfile persona that answers from your syllabus.
2
Pick a weekly admin chore and make it a scheduled task.
3
Save a skill that works and share its folder with a colleague.
Going further: chat from your phone via Telegram (hermes gateway setup), or connect apps with MCP.
References · all links checked October 2026
TOOLS AND DOCUMENTATION
Ollama. Download. ollama.com/download
Ollama Docs. Hermes Agent integration. docs.ollama.com/integrations/hermes
Ollama Docs. Context length. docs.ollama.com/context-length
Ollama Docs. Modelfile reference. docs.ollama.com/modelfile
Nous Research. Hermes Agent docs. hermes-agent.nousresearch.com/docs
Hermes: Installation · Security · Cron · Email
Source code (MIT). github.com/NousResearch/hermes-agent
RESEARCH AND POLICY
Yao, S. et al. (2023). ReAct. ICLR. doi.org/10.48550/arXiv.2210.03629
Schick, T. et al. (2023). Toolformer. NeurIPS. doi.org/10.48550/arXiv.2302.04761
Wang, L. et al. (2024). LLM-based autonomous agents: a survey. Front. Comput. Sci. 18, 186345. doi.org/10.1007/s11704-024-40231-1
Anthropic (2024). Building effective agents. anthropic.com/engineering
Elsevier. Generative AI in the review process. elsevier.com/about/policies-and-standards
COPE (2023). Authorship and AI tools. publicationethics.org
Personal Data Protection Act 2010 (Act 709). pdp.gov.my
Q&A
Questions? Let’s get every laptop in the room running its own agent.
ollama run
hermes
hermes cron
Ts. Dr. Mohd Nor Akmal Khalid · akmal.app