Hermes Agent Phase 2: Making Your Agent Remember, Learn Skills, and Connect to Telegram/Discord
Hermes Agent Phase 2: Making Your Agent Remember, Learn Skills, and Connect to Telegram/Discord
"Phase 1 got you running. Phase 2 makes your agent useful."
What You'll Learn in Phase 2
In Phase 1, you installed Hermes Agent, ran your first conversations, and learned the CLI basics. Now it's time to unlock what makes Hermes different from every other agent framework.
By the end of this guide, your agent will:
- 🧠 Remember your preferences and project context across sessions
- 🔧 Automatically create reusable skills from solved problems
- 📱 Respond to you on Telegram, Discord, and Slack — from your phone
- ⚡ Run faster with local models via the integrated inference engine
Part 1: Understanding Hermes Memory — The Brain Behind the Agent
How Hermes Remembers
Unlike chatbots that forget everything between conversations, Hermes maintains three layers of memory:
Layer 1: Working Memory (Session)
├── Current conversation context
├── Temporary variables
└── Tool outputs (cleared when session ends)
Layer 2: Episodic Memory (Persistent)
├── Past conversations (indexed & searchable)
├── User preferences (learned over time)
└── Project-specific context
Layer 3: Skill Memory (Reusable)
├── Custom skill documents
├── Learned procedures
└── Automatically created solutions
Layer 1: Working Memory
This is the current conversation. Everything you say and everything the agent generates stays in working memory for the duration of the session. When you exit (Ctrl+C / Ctrl+D), working memory is saved to episodic memory as a searchable entry.
You don't need to configure anything for Layer 1 — it works automatically.
Layer 2: Episodic Memory
This is where Hermes shines. Every conversation is indexed, summarized, and stored in ~/.hermes/memory/. When you start a new session, Hermes automatically searches its memory for relevant context.
Try this: Start a conversation, tell Hermes something specific about a project, exit, then start a new session and ask "What was I working on?"
You: Remember, I'm building a Python CLI tool called "data-forge"
that processes CSV files.
Hermes: Got it. I'll remember that for future sessions.
[Exit and restart]
You: What was I working on?
Hermes: You're building "data-forge" — a Python CLI tool for CSV processing.
Let me pull up what we discussed last time...
How to inspect memory:
hermes memory list # List all memory entries
hermes memory search "csv" # Search memory by keyword
hermes memory prune # Remove low-relevance entries
hermes memory stats # Show memory usage statistics
Layer 3: Skill Memory — The Game Changer
This is the most powerful feature of Hermes Agent. When Hermes solves a complex problem, it can automatically create a skill document — a reusable recipe that it (or you) can invoke anytime.
How it works:
- You give Hermes a complex task
- Hermes solves it (using tools, research, multiple steps)
- Hermes asks: "Would you like me to save this as a reusable skill?"
- You say yes
- The skill is saved to
~/.hermes/skills/as a markdown + YAML document - Next time, Hermes loads the skill automatically when relevant
Manual skill creation:
hermes skills create # Interactive skill creation wizard
hermes skills list # View all installed skills
hermes skills enable <name> # Enable a specific skill
hermes skills disable <name> # Disable a skill
hermes skills edit <name> # Edit a skill document
Skill document structure (stored in ~/.hermes/skills/):
---
name: csv-data-forge
description: Build data processing pipelines for the data-forge CLI tool
version: 1.0
triggers:
- "csv processing"
- "data transformation"
- "data-forge"
instructions: |
When helping with data-forge, always:
1. Check the existing code structure
2. Suggest pandas-based transformations
3. Include error handling for malformed CSV
4. Add CLI argument parsing with argparse
templates:
- "Create a new {{type}} command for data-forge"
- "Add {{feature}} to the CSV pipeline"
---
Key insight: Skills are the mechanism by which Hermes gets "smarter over time." Each solved problem becomes a reusable capability. After a week of use, your agent will have a personalized toolkit that no default install provides.
Part 2: Creating Your First Custom Skill
Let's walk through creating a skill from scratch — manually, so you understand the format.
Step 1: Create the skill file
hermes skills create
The wizard will ask you:
- Skill name — e.g., "weekly-blog-post"
- Description — e.g., "Template and workflow for writing weekly AI news roundup posts"
- Trigger keywords — e.g., "weekly roundup, blog post, AI news"
- Instructions — Paste the step-by-step workflow
- Templates — Optional reusable prompt templates
Step 2: Verify it loaded
hermes skills list
# Output:
# weekly-blog-post (enabled) — Template for weekly AI news roundups
# csv-data-forge (enabled) — Data processing for CLI tool
# (any auto-created skills)
Step 3: Test it
You: Let's write this week's roundup.
Hermes: (checks the skill and uses the template)
Sure! Following the weekly-blog-post workflow:
1. First, let me search for this week's top AI stories...
When to Create a Skill
| Scenario | Create a Skill? |
|---|---|
| Repetitive task you do weekly | ✅ Yes |
| Complex multi-step workflow | ✅ Yes |
| Domain-specific knowledge | ✅ Yes |
| One-off task | ❌ No |
| Something the base agent already handles well | ❌ No |
Pro tip: Check hermes skills list every few days to see what your agent has auto-created. These auto-generated skills often reveal use cases you hadn't considered.
Part 3: The Multi-Platform Gateway — Your Agent on Telegram, Discord & Slack
Hermes Agent's gateway lets you access your agent from messaging platforms. Once configured, you can message your agent from your phone as easily as chatting with a friend.
Gateway Architecture
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ Telegram │────▶│ │────▶│ Hermes │
│ Discord │────▶│ Gateway │────▶│ Agent Core │
│ Slack │────▶│ (runs 24/7) │────▶│ (LLM + Tools)│
│ WhatsApp │────▶│ │────▶│ │
│ Signal │────▶│ │ │ │
└─────────────┘ └──────────────┘ └──────────────┘
The gateway is a background service that connects your messaging apps to the Hermes agent core. It runs continuously, handling multiple users and platforms simultaneously.
Setting Up the Gateway
hermes gateway setup
This launches an interactive wizard. Let's walk through each supported platform:
Telegram Setup
-
Create a bot on Telegram:
- Open Telegram and search for
@BotFather - Send
/newbotand follow the prompts - Save the bot token (looks like
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)
- Open Telegram and search for
-
Configure in Hermes:
hermes gateway setup → Select "Telegram" → Paste your bot token → Choose message format (text / markdown / HTML) → (Optional) Set a channel for group chats -
Start the gateway:
hermes gateway start -
Test it: Find your bot on Telegram and send
/start. Then send any message. Your agent should respond within seconds.
Discord Setup
-
Create a Discord application:
- Go to discord.com/developers/applications
- Click "New Application" → name it
- Go to "Bot" section → "Reset Token" → save the token
- Enable: Message Content Intent (required for reading messages)
- Use the OAuth2 URL Generator to invite the bot to your server (scopes:
bot,applications.commands)
-
Configure in Hermes:
hermes gateway setup → Select "Discord" → Paste your bot token → Set the server ID (optional, for scoping) -
Restart the gateway:
hermes gateway restart
Slack Setup
-
Create a Slack app:
- Go to api.slack.com/apps
- Click "Create New App" → "From scratch"
- Add bot token scopes:
chat:write,channels:history,im:history,app_mentions:read - Install the app to your workspace
-
Configure in Hermes:
hermes gateway setup → Select "Slack" → Paste your bot token → Set the signing secret (optional, for verification)
Gateway Management Commands
hermes gateway start # Start the gateway service
hermes gateway stop # Stop the gateway
hermes gateway restart # Restart with new config
hermes gateway status # Check which platforms are connected
hermes gateway logs # View recent gateway log entries
hermes gateway config # View/edit gateway configuration
Persistent Gateway (Running 24/7)
The gateway is designed to run as a background service on your server. On Linux with systemd:
hermes gateway install-service # Install as systemd service
systemctl --user enable hermes-gateway
systemctl --user start hermes-gateway
On macOS with launchd:
hermes gateway install-service # Install as launchd service
This keeps your agent accessible 24/7 — even when your terminal is closed.
Part 4: Performance Tuning — Running Local Models
One of Hermes Agent's best features is the integrated inference engine that can run local models on your hardware. This means zero API costs and zero latency for many tasks.
Checking Your Hardware
hermes hardware check
This tests your system and recommends the best local model for your setup:
| Hardware | Recommended Model | Quality |
|---|---|---|
| 8GB RAM, no GPU | Hermes 3 8B (Q4) | Good for basic tasks |
| 16GB RAM, no GPU | Hermes 3 12B (Q4) | Good for most tasks |
| 24GB+ RAM, no GPU | Command R+ (Q4) | Very good |
| 12GB VRAM GPU | Qwen 2.5 32B (Q4) | Excellent |
| 24GB VRAM GPU | Hermes 3 70B (Q4) | Frontier-level |
| 48GB+ VRAM | Any 120B+ model | Best available |
Setting Up Local Inference
# Automatic setup (recommended)
hermes model
→ Select "Local" from the provider list
→ Choose your model (based on hardware check)
→ Wait for download (~5-30 minutes depending on model size)
# Manual setup for advanced users
hermes model set local --model "hermes-3-12b" --quantization q4_k_m
Hybrid Mode (Best of Both Worlds)
You can configure Hermes to automatically route tasks between models:
hermes config set hybrid-inference true
hermes config set local-model hermes-3-12b
hermes config set cloud-model claude-sonnet-5
How routing works:
- Simple queries → handled by local model (instant, free)
- Complex reasoning → routed to cloud model (higher quality)
- Code execution → local (fast iteration)
- Creative writing → cloud (better prose)
Cost impact: With hybrid mode, most users report 60-80% of queries are handled locally, slashing API costs while maintaining quality for hard problems.
Phase 2 Quick Reference
Memory Commands
hermes memory list # List all memories
hermes memory search <query> # Search memories
hermes memory forget <id> # Delete specific memory
hermes memory prune # Clean up low-value memories
hermes memory export <file.json> # Export memories as JSON
Skill Commands
hermes skills list # List installed skills
hermes skills create # Create a new skill
hermes skills edit <name> # Edit existing skill
hermes skills enable/disable <name> # Toggle skills
hermes skills remove <name> # Delete a skill
hermes skills import <file.yaml> # Import a skill from file
Gateway Commands
hermes gateway setup # Configure messaging platforms
hermes gateway start/stop/restart # Control gateway service
hermes gateway status # Check connected platforms
hermes gateway logs # View gateway logs
hermes gateway install-service # Install as system service
Troubleshooting Phase 2
Memory Not Persisting Between Sessions
# Check if the memory directory exists
ls -la ~/.hermes/memory/
# Verify config
hermes config get memory-enabled
# Should return: true
# If not configured:
hermes config set memory-enabled true
Skills Not Loading
# Check skill directory
ls -la ~/.hermes/skills/
# Reindex skills
hermes skills reindex
# Verify skill YAML format
hermes skills validate <name>
Gateway Won't Connect
# Check if gateway is running
hermes gateway status
# View detailed logs
hermes gateway logs --tail 50
# Common fixes:
# 1. Double-check your bot token
# 2. Ensure the bot has proper permissions
# 3. Restart the gateway: hermes gateway restart
hermes gateway restart
Local Model Too Slow
# Try a smaller quantization
hermes model set quantization q4_k_m
# Try a smaller model
hermes model set model hermes-3-8b
# Enable GPU acceleration (if you have a GPU)
hermes config set gpu-layers 32
What's Next: Phase 3 Preview
You've now unlocked the three features that make Hermes more than a chatbot. Your agent remembers across sessions, creates skills from solved problems, and responds to you on any platform.
Here's the full series roadmap:
| Phase | Title | Status |
|---|---|---|
| 🟢 Phase 1 | Beginner's Guide — Install, configure, first conversation | ✅ Complete |
| 🟡 Phase 2 | Memory, Skills & Gateway — You're here | ✅ Complete |
| 🟠 Phase 3 | Advanced Operations — Custom models, cron automation, sub-agents | 📅 Coming next |
| 🔴 Phase 4 | The Master Level — RL training, trajectory generation, fine-tuning | 📅 Coming soon |
Your mission for Phase 2:
- Have a conversation, exit, restart, and verify memory works
- Create at least one custom skill for a task you do regularly
- Set up the gateway on at least one messaging platform (Telegram is easiest)
- Try hybrid mode and see how many queries your local model handles
Ready for Phase 3? Advanced Operations covers custom model configs, cron-scheduled agent tasks, parallel sub-agents, and custom tool creation.
Series accuracy: This guide reflects Hermes Agent latest stable release as of July 10, 2026.
Found this helpful? Share it with your team.
Read more articles →