Using Hermes Agent From Nous Research as a Self-Improving Personal AI Agent
The AI tools we have explored so far in this book operate in a fundamentally stateless way: you send a prompt, receive a response, and the model forgets you ever existed. Each session begins from zero. Hermes Agent, an open-source project from Nous Research (hermes-agent.org), breaks this pattern entirely. It is not a chatbot or a coding copilot. It is a persistent, self-hosted AI agent that lives on your own infrastructure, remembers your projects across sessions, and gets more capable the longer it runs. It builds reusable “skills” from its own experience, reaches you across Telegram, Discord, Slack, and other messaging platforms, and can schedule recurring tasks autonomously. It is, in the language of Nous Research, “the agent that grows with you.”
For the purposes of this book, Hermes Agent is an excellent example of how Small AI thinking applies to agentic workflows. Because it is model-agnostic, you can point it at a local Ollama instance running a small model for day-to-day tasks and switch to a frontier model only when the complexity demands it, precisely the hybrid architecture we have advocated throughout this book.
What Makes Hermes Agent Different
Most AI assistants are session-based: they exist only for the duration of a conversation. Hermes Agent is designed to be a persistent process that runs continuously on your server, VPS, or local machine. This architectural distinction enables several capabilities that session-based tools cannot provide:
- Persistent Memory: Hermes Agent maintains multi-level memory (short-term, episodic, and procedural) across every conversation. It remembers your preferences, your project contexts, and the refined workflows you have developed together. You never need to re-explain your environment or constraints.
- Automated Skill Creation (Closed Learning Loop): This is the defining feature. When Hermes solves a complex or novel task, it autonomously distills the solution into a reusable “skill document.” Future similar tasks use these cached skills rather than reasoning from scratch, which reduces token usage and improves consistency. Skills are searchable, shareable, and compatible with the agentskills.io open standard.
- Multi-Platform Gateway: A single Hermes installation can be accessed from Telegram, Discord, Slack, WhatsApp, Signal, email, or a full terminal UI (TUI). You can start a conversation on Telegram from your phone while Hermes works on a cloud VM, then pick it up in your terminal at home.
- Scheduled Automations: A built-in cron scheduler allows Hermes to perform recurring tasks unattended: daily reports, nightly backups, weekly code audits, morning briefings delivered to any connected platform.
- Parallel Sub-Agents: For complex pipelines, Hermes can spawn isolated sub-agents that work in parallel, each with its own conversation context and terminal session.
- 40+ Built-In Tools: Out of the box, Hermes comes equipped with tools for file operations, web search, browser automation, vision analysis, image generation, text-to-speech, GitHub integration, and MLOps workflows. It also supports the Model Context Protocol (MCP) for extending its capabilities with external tool servers.
Model Agnostic: Using Small AI With Hermes
Dear reader, the feature most relevant to our discussion is that Hermes Agent is completely model-agnostic. You can configure it to use any provider:
- Nous Portal (the default, with free tier access)
- OpenRouter (access to 200+ models)
- Local models via any OpenAI-compatible endpoint (including Ollama and LM Studio)
- Ollama Cloud, OpenAI, Anthropic, NVIDIA NIM, and many others
Switching models requires a single command with no code changes:
1 hermes model
This presents an interactive menu where you select your provider and model. For our Small AI use case, you could configure Hermes to use a local Qwen 3 4B model via Ollama for routine tasks like file management, text summarization, and structured data extraction, while keeping a frontier model available for complex reasoning when needed.
Security and Privacy Considerations
Any agentic system that can read files, execute commands, and access network services demands careful thought about isolation. Hermes Agent is powerful precisely because it has broad access to your environment, which means you should be deliberate about the environment you give it.
Dear reader, I follow one of two practices depending on the situation:
- Dedicated VPS: For production or long-running Hermes installations, I run the agent on a dedicated virtual private server that contains only the projects and data I want the agent to access. A $5/month VPS is sufficient. This provides strong isolation: even if the agent behaves unexpectedly, it cannot reach my primary workstation, personal files, or credentials.
- Unprivileged macOS Account: When running Hermes locally on my Mac, I use a separate macOS user account that is not signed into Apple iCloud and has no access to my primary user’s files or keychain. This prevents the agent from inadvertently accessing personal documents, photos, email, or saved passwords that iCloud syncs across devices.
For Linux users, the equivalent practice is to create a dedicated low-privilege user account for running the agent. This user should not have sudo access and should only have read/write permissions to the specific project directories you want the agent to work with. This is standard Unix security hygiene, but it is worth stating explicitly because the convenience of running an agent under your primary account can be tempting.
These precautions are not specific to Hermes Agent. Any agentic tool that executes commands on your behalf, including OpenCode which we discuss in the next chapter, benefits from the same isolation practices.
Installing Hermes Agent
Installation is handled by a single command that works on Linux, macOS, and WSL2. The installer manages all dependencies automatically, including setting up uv and Python 3.11:
1 curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
After installation, reload your shell and start chatting:
1 source ~/.zshrc # or ~/.bashrc
2 hermes # start the interactive TUI
On first launch, the setup wizard walks you through model provider configuration. For a minimal local setup using Ollama, you would select your local endpoint and preferred model.
A Walkthrough: Using Hermes Agent
Once installed, Hermes operates through its terminal UI or through any connected messaging platform. Here is a typical workflow demonstrating its key features.
Starting a Conversation
1 $ hermes
2 Welcome back, Mark. I remember we were working on the RAG
3 pipeline project yesterday.
4
5 You> Can you check if the zvec index is still built from
6 last session?
7
8 Hermes> Yes, I can see the temp_zvec_example directory exists
9 in your project. The index contains 27 chunks from
10 your data directory. Would you like me to run a test
11 query against it?
Notice that Hermes remembers the context from a previous session. This is the persistent memory at work.
The Skill Creation Loop
When Hermes encounters a novel problem and solves it, it autonomously creates a skill:
1 You> I need to convert all the PNG images in ./assets to
2 WebP format with 80% quality.
3
4 Hermes> I'll write and execute a script to batch convert your
5 images.
6 [Tool: bash] Running conversion...
7 Converted 14 images from PNG to WebP (avg 62% size
8 reduction).
9
10 I've also created a new skill: "batch-image-convert"
11 so I can do this instantly next time. You can invoke
12 it with /batch-image-convert.
The next time you or anyone with access to this Hermes installation needs to convert images, the agent skips the reasoning step entirely and executes the cached skill. This is the closed learning loop in action: the agent distills experience into reusable procedures, reducing both latency and token consumption over time.
Scheduled Automations
Hermes can run tasks on a schedule, delivering results to any connected platform:
1 You> Every morning at 8am, check my GitHub repos for new
2 issues and send me a summary on Telegram.
3
4 Hermes> Done. I've set up a daily cron job at 08:00 that
5 will check your configured GitHub repositories for
6 new issues and deliver a formatted summary to your
7 Telegram account.
Hermes Agent and the Small AI Philosophy
The design philosophy of Hermes Agent aligns closely with the themes of this book. Consider the architecture:
- The agent itself is lightweight: It runs comfortably on a $5/month VPS or on the same local machine where you run Ollama. There is no requirement for GPU infrastructure to run the agent framework. The compute-intensive work is handled by whatever model you connect.
- Skills reduce model dependency over time: As Hermes accumulates skills from solved problems, it needs to invoke the underlying LLM less frequently for repeated task types. This is a form of knowledge distillation at the application level: the agent compresses learned procedures into deterministic, token-free execution paths.
- Model routing is built in: You can configure different models for different contexts. Use a small, fast model for routine file operations and text processing. Reserve the frontier model for complex reasoning tasks. This is the same hybrid architecture we explored with RouteLLM, but implemented at the agent level.
- Privacy by design: All data stays on your machine. There is no telemetry, no tracking, and no cloud lock-in. The MIT license ensures you have full control over the codebase and your data.
Hermes Agent for MLOps and Training Data Generation
Beyond its utility as a personal agent, Hermes Agent serves a dual purpose as a platform for generating training data for AI models. This is particularly relevant to the Small AI ecosystem because it addresses the fundamental challenge of improving small models:
- Batch Processing: Generate thousands of tool-calling trajectories in parallel with automatic checkpointing, providing training data for fine-tuning tool-use capabilities in smaller models.
- Atropos Integration: Built-in support for reinforcement learning on agent behaviors, with 11 tool-call parsers for training any model architecture.
- Trajectory Export: Export conversations in ShareGPT format for fine-tuning, with trajectory compression to fit training data into token budgets.
This means that Hermes Agent is not just consuming Small AI models; it is actively contributing to the training pipeline that makes future small models better at agentic tasks.
Wrap Up for Hermes Agent
Dear reader, Hermes Agent represents a significant evolution in how we think about AI assistants. Rather than treating AI as a disposable tool that forgets you after every session, it proposes a model where your agent accumulates knowledge, builds skills, and becomes genuinely more useful over time. For practitioners of Small AI, it offers a compelling framework: a lightweight, self-hosted agent that can leverage local models for routine work while preserving the option to escalate to frontier models when the task demands it. The closed learning loop, where solved problems become cached skills, is particularly elegant because it reduces the ongoing compute cost of the agent the longer it runs. You can explore the project at hermes-agent.org and on GitHub at github.com/NousResearch/hermes-agent.