Select Page

What You’ll Learn

In this guide, you'll connect Hermes Agent (an open-source AI assistant) to TencentDB Agent Memory (the memory system from our previous article). When connected, your AI assistant will:

🧠
Remember
Your preferences across conversations.
📚
Recall
Past projects and decisions.
💡
Learn
Reusable skills from experience.
🤝
Share
Knowledge with other AI agents on your team.
📋 Prerequisite
You should already have TencentDB Agent Memory running. If not, read our first article first — it takes about 15 minutes.

What Is Hermes Agent?

Hermes Agent is a free, open-source AI assistant created by Nous Research. Think of it as an alternative to ChatGPT or Claude, but one that:

  • Runs on your computer (your data stays private)
  • Works with any AI model (OpenAI, Anthropic, Google, local models, and 20+ others)
  • Has tools — it can read files, run commands, search the web, and more
  • Is self-improving — it learns skills from experience

When you connect it to TencentDB, it gains a persistent memory that survives across sessions.

How the Connection Works (The Simple Version)

You → Hermes Agent → TencentDB Memory Core → AI Model (extracts memories) → Stored
↑ |
└──────────── Memories loaded next session ────────────┘
  1. You talk to Hermes.
  2. Hermes sends the conversation to TencentDB.
  3. TencentDB uses an AI model to extract important facts.
  4. Those facts are stored permanently.
  5. Next time you talk to Hermes, it loads those memories automatically.

Step 1

Install Hermes Agent

Open your terminal and run the installer:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

This installs Hermes and all its dependencies. After installation, verify it works:

hermes --version

You should see a version number.

Step 2

Configure Hermes with an AI Model

Hermes needs an AI model to think. Run the setup wizard:

hermes setup

This walks you through:

  • Choosing an AI provider (OpenAI, Anthropic, Google, etc.)
  • Entering your API key
  • Selecting a model (e.g., gpt-4o, claude-sonnet-4-20250514)

You can also do this manually:

hermes model
💡 Tip
Hermes stores your API key in ~/.hermes/.env — a secure file on your computer. It never sends your key anywhere except to the AI provider you choose.

Step 3

Install the TencentDB Memory Plugin

Hermes uses "plugins" to add new capabilities. The TencentDB memory plugin tells Hermes how to talk to your memory system.

First, locate the plugin files. If you followed the TencentDB setup guide, they're in your project folder:

# Copy the plugin into Hermes
cp -r ~/tencent-agent-memory/hermes-plugin/memory_tencentdb ~/.hermes/plugins/memory_tencentdb

Then enable it:

hermes plugins enable memory_tencentdb

Step 4

Tell Hermes Where TencentDB Lives

Hermes needs to know where to find your memory system. Add these settings to your Hermes configuration:

# Set the memory provider
hermes config set memory.provider memory_tencentdb

# Enable memory
hermes config set memory.memory_enabled true

Now Hermes knows to use TencentDB for memory, but it still needs to know where TencentDB is running.

Step 5

Connect Hermes to Your TencentDB Instance

This is the crucial step. Hermes needs three pieces of information to connect:

  1. Where TencentDB is running (the network address)
  2. Which team the memories belong to
  3. Which agent is doing the talking

5a. Find Your TencentDB Address

If TencentDB is running on the same computer as Hermes (the most common setup), the address is:

tdai-memory-core:8420

If TencentDB is on a different computer, use that computer's IP address instead (e.g., 192.168.1.100:8420).

5b. Create a Team and Agent in the Dashboard

Open your TencentDB dashboard at http://localhost:8125 and:

  1. Go to Organization → Teams and click Create Team. Name it something like "My Projects".
  2. Go to Agents and click Create Agent. Name it "Hermes Assistant".
  3. Note down the IDs that appear — they look like team-abc123 and agt-xyz789.

5c. Configure Hermes

Add the connection details to your Hermes environment. Open ~/.hermes/.env and add:

MEMORY_TENCENTDB_GATEWAY_HOST=tdai-memory-core
MEMORY_TENCENTDB_GATEWAY_PORT=8420
MEMORY_TENCENTDB_TEAM_ID=team-abc123
MEMORY_TENCENTDB_AGENT_ID=agt-xyz789
MEMORY_TENCENTDB_USER_ID=usr-def456

Replace the IDs with the ones you noted from the dashboard.

🔒 Security Note
These IDs are not secrets — they're like room numbers in a building. Your actual data is protected by the API key you set up in the TencentDB article.

Step 6

Restart and Test

Restart Hermes to apply the changes:

# If running as a Docker container
docker compose restart

# If running directly
# Just start a new session

Now start a conversation with Hermes and tell it something about yourself:

💬 You
"Hi! My name is Alex and I'm working on a mobile app project called 'GreenTracker' that helps people track their carbon footprint. I prefer short, direct answers."

Hermes will respond normally. But behind the scenes, it's also sending this conversation to TencentDB.

Step 7

Verify Memories Are Being Stored

After your conversation, open the TencentDB dashboard at http://localhost:8125:

  1. Go to Chat Memory in the sidebar.
  2. You should see a new entry called "Memory of Hermes Assistant".
  3. Click on it — you'll see extracted facts from your conversation.
⚠️ Important
The first time, the memory entry might be marked as "Private". Click the visibility toggle to make it "Shared" so you can see it in the dashboard.

What Happens Next

From now on, every conversation with Hermes will:

  1. At the start: Hermes loads your existing memories (preferences, past projects, learned skills).
  2. During the conversation: Hermes uses those memories to give you more personalized, context-aware responses.
  3. At the end: The conversation is sent to TencentDB, which extracts new facts and updates your memory.

Over time, Hermes builds a rich understanding of:

Who you are
Your role, preferences, communication style.
What you're working on
Active projects, tools you use.
How you work
Your conventions, preferred approaches.
What you've learned
Skills and procedures worth reusing.

Advanced: Sharing Memories Across Agents

One of TencentDB's most powerful features is team memory sharing. If you have multiple AI agents (or multiple people on your team), they can all share the same memory pool.

To set this up:

  1. In the TencentDB dashboard, create a Team that multiple agents belong to.
  2. When creating memories or skills, set their visibility to Team instead of Private.
  3. All agents in that team automatically see shared memories.

This means:

  • Agent A learns a useful procedure → Agent B can use it immediately.
  • You tell one agent about a project → all agents know about it.
  • Team conventions are enforced consistently across all agents.

Troubleshooting

"Memories aren't showing up in the dashboard"
This is the most common issue. Check:
  1. Is the memory entry private? New memories are private by default. In the dashboard, find the memory entry and toggle it to "Shared".
  2. Are the team/agent IDs correct? Double-check that MEMORY_TENCENTDB_TEAM_ID and MEMORY_TENCENTDB_AGENT_ID match what's in your dashboard.
  3. Is TencentDB running? Run docker compose ps in your TencentDB folder — both containers should show "Up".
"Hermes says 'memory provider not found'"
The plugin isn't installed correctly. Run:
hermes plugins list
You should see memory_tencentdb in the list. If not, redo Step 3.
"Connection refused"
Hermes can't reach TencentDB. Check:
  1. Is TencentDB running? curl http://localhost:8420/health
  2. Are Hermes and TencentDB on the same Docker network? If both are in Docker, they need to share a network. Add this to both docker-compose.yml files:
networks:
hermes-net:
external: true
"The dashboard is empty even after conversations"
Make sure your AI model is working. TencentDB needs an AI model to extract memories — if the model isn't configured correctly, conversations are stored but not processed. Check your .env file in the TencentDB folder.

Quick Reference: All Hermes Memory Commands

# Check memory configuration
hermes config get memory

# List installed plugins
hermes plugins list

# View Hermes logs (look for memory-related messages)
docker compose logs gateway | grep -i memory

# Test the connection manually
curl http://localhost:8420/health

What You’ve Built

Congratulations! You now have:

  • Hermes Agent — a powerful, private AI assistant
  • TencentDB Agent Memory — a persistent memory system
  • Connected together — your AI remembers everything that matters

Your AI assistant now has something most AI assistants lack: continuity. It grows with you, learns from you, and becomes more helpful over time.

Next Steps

  • Explore the dashboard: Browse your extracted memories at http://localhost:8125
  • Create skills: When Hermes does something useful, save it as a reusable skill
  • Add more agents: Connect additional Hermes instances or other AI agents to the same memory pool
  • Set up team sharing: Share memories and skills across your team

Your AI Just Got a Memory 🧠✨

What will you teach it?