What Is TencentDB Agent Memory?
Imagine your AI assistant could actually remember things. Not just during one conversation, but across days, weeks, and months. That's what TencentDB Agent Memory does — it's a memory system for AI agents.
Think of it like this: when you talk to an AI assistant, it normally forgets everything the moment the conversation ends. TencentDB gives that assistant a long-term memory. It remembers your preferences, past projects, and important decisions — just like a human colleague would.
It Works in Four Layers
Each layer stores a different kind of memory, from raw transcripts to a personality profile.
Beyond memory, it also stores Skills (reusable procedures your AI learns) and a Wiki (team knowledge base).
What You’ll Need Before Starting
You need exactly two things installed on your computer. That's it — you don't need to know programming, databases, or server administration.
docker --version. If you see a version number, you're good to go.Step 1
Create Your Project Folder
Open your terminal and create a new folder for the project. This is where all your configuration files will live.
mkdir tencent-agent-memory
cd tencent-agent-memoryStep 2
Create the Environment File
The environment file (.env) tells TencentDB how to connect to an AI model. The AI model is what does the thinking — it reads your conversations and extracts the important memories.
Create a file called .env with this content:
# Your AI model settings (REQUIRED)
LLM_API_KEY=your-api-key-here
LLM_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-4o
# Ports (you can leave these as-is)
MEMORY_CORE_PORT=8420
PANEL_PORT=8125
KNOWLEDGE_PORT=8424
PROXY_PORT=8096What to fill in:
- LLM_API_KEY — Your API key from an AI provider (OpenAI, Anthropic, or any OpenAI-compatible service).
- LLM_BASE_URL — The web address of the AI service. For OpenAI, use
https://api.openai.com/v1. - LLM_MODEL — Which AI model to use.
gpt-4ois a good starting point.
Step 3
Create the Docker Compose File
Create a file called docker-compose.yml with this content:
services:
memory-core:
image: agentmemory/memory-core:latest
container_name: tdai-memory-core
restart: unless-stopped
ports:
- "8420:8420"
volumes:
- memory-core-data:/data/tdai-memory
environment:
- TDAI_GATEWAY_PORT=8420
- TDAI_GATEWAY_HOST=0.0.0.0
- TDAI_DATA_DIR=/data/tdai-memory
- TDAI_LLM_API_KEY=${LLM_API_KEY}
- TDAI_LLM_BASE_URL=${LLM_BASE_URL}
- TDAI_LLM_MODEL=${LLM_MODEL}
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8420/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
networks:
- tdai-memory-stack
memory-hub:
image: agentmemory/memory-hub:latest
container_name: tdai-memory-hub
restart: unless-stopped
ports:
- "8125:8125"
- "8424:8424"
volumes:
- memory-hub-data:/data/knowledge
environment:
- PANEL_PORT=8125
- KNOWLEDGE_PORT=8424
- REMOTE_INSTANCE_ID=default
- REMOTE_INSTANCE_NAME=default
- REMOTE_INSTANCE_URL=http://memory-core:8420
- LLM_MODE=custom
- LLM_API_KEY=${LLM_API_KEY}
- LLM_BASE_URL=${LLM_BASE_URL}
- LLM_MODEL=${LLM_MODEL}
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8125/health"]
interval: 20s
timeout: 8s
retries: 15
start_period: 45s
depends_on:
memory-core:
condition: service_healthy
networks:
- tdai-memory-stack
volumes:
memory-core-data:
memory-hub-data:
networks:
tdai-memory-stack:
driver: bridgeWhat this does: It defines two containers — the Memory Core (the brain that stores and retrieves memories) and the Memory Hub (the web dashboard where you can see everything). They talk to each other over a private network.
Step 4
Start Everything
Now the exciting part — one command starts it all:
docker compose up -dThe -d means detached — it runs in the background. Docker will download the images (about 2-3 minutes the first time) and start both containers.
Step 5
Verify It’s Working
Check that everything is healthy:
# Check the Memory Core
curl http://localhost:8420/health
# Check the Dashboard
curl http://localhost:8125/healthBoth should respond with {"status":"ok"} or similar.
Step 6
Open the Dashboard
Open your web browser and go to http://localhost:8125. You'll see the TencentDB Memory Hub — a web dashboard where you can browse memories, manage skills, and view your AI's knowledge base.
Step 7
First-Time Setup (One-Time Only)
The very first time you start TencentDB, you need to create an admin account. Run this command in your terminal:
curl -X POST http://localhost:8420/v3/internal/meta/user/init-admin -H "Content-Type: application/json" -H "Authorization: Bearer local" -H "x-tdai-service-id: default" -d '{"username":"admin"}'The response will contain an api_key. Save this key — it's your master password for the system.
Add it to your .env file:
MEMORY_CORE_ADMIN_USER_KEY=the-key-you-just-receivedRestart the dashboard:
docker compose restart memory-hubNow refresh your browser at http://localhost:8125 — you're ready to go!
What Each Component Does
| Component | Port | What It Does | Do I Need It? |
|---|---|---|---|
| Memory Core | 8420 | The brain — stores conversations, extracts memories, manages skills | ✅ Required |
| Memory Hub | 8125 | The dashboard — web interface to browse memories and manage settings | ✅ Recommended |
| Knowledge API | 8424 | The library — semantic search for wiki pages and documents | ✅ Recommended |
| Memory Proxy | 8096 | The bridge — connects AI coding agents to the memory system | ⚠️ Optional |
How It Works (The Simple Version)
- Your AI assistant has a conversation with you.
- The conversation is sent to the Memory Core.
- The Memory Core uses an AI model (the one you configured in .env) to read the conversation and extract: key facts (what was decided, what you prefer), patterns (how you work, what you care about), and skills (procedures worth reusing).
- These memories are stored and made available for future conversations.
- You can browse everything in the web dashboard.
Stopping and Starting
- Stop everything:
docker compose down(your data is preserved) - Start again:
docker compose up -d - Completely reset (delete all data):
docker compose down -v⚠️ This deletes everything!
Troubleshooting
MEMORY_CORE_PORT=8421 and PANEL_PORT=8126. Then restart with docker compose up -d.What’s Next?
Now that TencentDB is running, you'll want to connect an AI assistant to it. Check out our companion article: How to Connect Hermes Agent to TencentDB Agent Memory — it walks you through connecting one of the most powerful open-source AI agents to your new memory system.
Quick Reference Card
# Start
docker compose up -d
# Check health
curl http://localhost:8420/health
curl http://localhost:8125/health
# View logs
docker compose logs -f
# Stop (keep data)
docker compose down
# Full reset (delete data)
docker compose down -v
# Dashboard
open http://localhost:8125Happy Remembering! 🧠
Your AI assistant now has a long-term memory. Give it a conversation and watch it remember.