Hermes Agent: Persistent Memory, Dynamic Skills, and Self-Improvement
Hermes Agent is an open-source CLI-first AI agent from Nous Research. It maintains persistent memory across sessions, can create reusable skills from interactive workflows, and proactively reviews conversations to identify preferences worth saving. The agent is provider-agnostic, supporting OpenRouter, Anthropic, OpenAI, local models via Ollama or LM Studio, and others.
Core design
Persistent memory
Hermes stores preferences, user profiles, and learned facts in external Markdown files (memory.md, user.md). These are loaded into context as needed, so the agent carries knowledge forward across sessions. The memory store can be backed by simple files or by external providers like Supermemory, Mem0, or vector databases.
When you correct a preference or provide new feedback, Hermes programmatically updates these files rather than just acknowledging the change conversationally. The next session starts with the updated knowledge already in place.
Dynamic skill creation
After working through a multi-step task interactively, you can ask Hermes to save that entire workflow as a reusable skill. The agent generates a SKILL.md file containing structured instructions that capture the process, voice profile, and specific rules that emerged during the session. That skill is then available as a slash command in future sessions.
Available tools
Out of the box, Hermes includes web search, browser automation, terminal and process execution, file operations (read, write, patch, search), code execution, and image analysis and generation.
Proactive self-nudging
Every 10 turns, Hermes runs an internal review of the recent conversation and asks whether anything should be saved to persistent memory or automated into a new skill. This is what drives the self-improvement behavior: the agent suggests saving preferences and creating skills without being asked.
Context management
When a conversation exceeds 50% of the model's context window, a compression process runs. It removes the output of old tool calls, summarizes the middle of the conversation, and preserves the initial messages and the most recent messages. All sessions are saved in full to a local SQLite database with FTS5 full-text search, enabling accurate recall of past conversations.
Installation
Hermes runs on Linux, macOS, and Windows via WSL2. The installer is a single command:
This launches an interactive configuration wizard.
Provider selection
The wizard first asks for an AI provider.
Options include Nous Portal (the creators' own subscription service), OpenRouter (an aggregator for over 100 models from multiple providers with pay-per-use pricing), Anthropic, OpenAI, and local models. OpenRouter is flexible because it lets you switch between models without changing your configuration.
Model and tool selection
After selecting a provider, the wizard asks for a default model and which tools to enable.
Enabling all tools gives the agent its full range of capabilities. Tools can be added or changed later.
Training Hermes as a social media assistant
The following walkthrough demonstrates persistent memory and skill creation by teaching the agent to generate promotional tweets from video scripts in a specific personal voice.
Starting the agent
Building a voice profile
Providing the agent with a folder of existing scripts and a high-level task:
I want you to help me write tweets based on scripts from my videos. I have scripts inside the @scripts folder, study them to understand my writing style and my voice. My target audience is developers at mid-senior level. Tweet length under 210 chars if possible.
The @scripts syntax tells Hermes to read the contents of the local scripts directory. After running its search_files tool, Hermes returns a detailed voice profile, identifying traits like "Pragmatic and skeptical: you don't just repeat benchmarks, you run your own evals" and "Developer-centric: you care about the how and the cost." This profile is generated from the actual content of the files, not from guessing.
Iterating and saving to memory
When the 210-character limit turns out to be too short:
This is great but I'd like the tweet to be much longer and more personal, around 400 chars.
Hermes saves this change to its memory.md file immediately.
The old preference (tweet length under 210 chars) is replaced by the new one (Tweet length: ~400 chars, longer and more personal). The next session starts with this preference already applied.
Further feedback, such as avoiding words like "incredible" or "mind-blowing" and using "really good" instead, gets captured the same way. Each round of feedback makes the next output more accurate without requiring you to repeat yourself.
Mid-session model switching
If the initial large model is slow for iterative feedback rounds, switching models mid-session preserves context:
This replaces the model for the current session with a faster, cheaper one. Useful for using powerful models for initial reasoning and cheaper models for iterative refinement.
Creating a skill
After reaching a consistently good output:
Do you think it makes sense to create a skill so that I can create a tweet or multiple tweets in my style using a slash command?
Hermes uses its skill_manage tool to draft a SKILL.md file at hermes/skills/social-media/video-to-tweet/SKILL.md.
The file contains everything the agent learned during the session: the audience definition, the persona description, specific voice characteristics, a list of words to use, a list of words to avoid, and emoji usage rules. Once saved, running the skill with a script file path executes the entire workflow from a single command.
Final thoughts
Hermes's most useful property is that it moves feedback out of the conversation and into files. Instead of restating preferences at the start of each session, corrections accumulate in memory.md and skills accumulate in SKILL.md files that are reused automatically. The SQLite FTS5 session database provides accurate cross-session recall rather than relying on summarization.
It is a CLI-first tool with no GUI, which suits developers who want to script and integrate it with other tools but makes it less accessible for non-technical users. The provider-agnostic design and mid-session model switching give useful control over the cost-performance tradeoff for different stages of a task.
The project and installation documentation are at github.com/NousResearch/hermes-agent.