Nous Research released Hermes Agent, a free open-source agent that rewrites its own prompts after each conversation using DSPy and GEPA. The result: an agent that learns which reasoning patterns actually got you good answers and skips the dead ends next time. It runs on your laptop, connects to any model, and deploys across Telegram, Discord, Slack, WhatsApp, Signal, or CLI.
Step 1: Clone the Repository
Open a terminal and pull down the project:
bash
git clone https://github.com/NousResearch/hermes-agent
cd hermes-agent
No account required. Everything runs locally.
Step 2: Install Dependencies
Hermes Agent uses Python. Create a virtual environment and install:
bash
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
This pulls in DSPy, the optimization layer that powers self-evolution, along with all channel adapters.
Step 3: Configure Your Model
Copy the example config and point Hermes at your preferred model:
bash
cp .env.example .env
Open .env and set your model endpoint. Hermes accepts OpenAI-compatible APIs, so this covers Claude (via proxy), GPT-4o, a local Ollama instance running Llama or Mistral, or any other compatible backend. If you are running locally with Ollama:
MODEL_PROVIDER=ollama
MODEL_NAME=llama3
For cloud models, drop in your API key for the relevant provider.
Step 4: Choose Your Deploy Channel
Hermes supports multiple interfaces. Pick the one that fits your workflow:
- CLI -- fastest to start, no tokens required:
python main.py --channel cli - Telegram -- create a bot via BotFather, paste the token into
.env - Discord / Slack / WhatsApp / Signal -- each has a dedicated adapter section in
.envwith instructions inline
For a first run, CLI is recommended so you can watch the prompt-evolution logs directly in your terminal.
Step 5: Run the Agent and Watch It Evolve
Start a session:
bash
python main.py --channel cli
Have a real conversation -- ask it to help with something you do repeatedly. After the session ends, Hermes uses DSPy + GEPA to score which reasoning steps produced good outcomes and rewrites its internal prompts before your next session. Check the /prompts directory to see exactly what changed.
First prompt worth running: Ask it to help you draft a recurring work deliverable (a weekly report, a code review checklist, a client update). Do it three sessions in a row. By session three, you should see it skip the setup questions it asked in session one.
Why This Works
DSPy treats prompts as optimizable programs rather than static strings, and GEPA provides a gradient-like signal from real conversational outcomes. Because the optimization happens between sessions on your own machine, the improvements are compounding -- each conversation becomes training data for the next prompt revision -- without sending anything to a third-party trainer.
Pro Tips
- Commit your
/promptsfolder to git. You get a full version history of how your agent evolved and can roll back any change that made things worse. - Use the same task type repeatedly early on. Hermes needs enough signal to spot patterns. Varied one-off tasks slow the optimization loop.
- Swap models without losing progress. Evolved prompts are model-agnostic text files. Switch from GPT-4o to a local Mistral and your optimized prompts carry over.
- Pin the DSPy version in
requirements.txt. DSPy is under active development and minor version bumps can change optimization behavior in ways that are hard to debug.
The full source, adapter docs, and contribution guide live at github.com/NousResearch/hermes-agent. Star it if you want to track the self-evolution roadmap -- the project added 30K stars in a single week and the issue tracker is moving fast.
Want a hand?
Book a 30-min call.
Walk through your stack with us. We'll find the bottleneck and map out the exact wiring you need — free.