Install
openclaw skills install tdai-memory-suiteComplete local memory system for OpenClaw: 4-layer memory pipeline (L0→L1→L2→L3) + local vector search (nomic-embed-text) + ontology knowledge graph + Nomic Atlas interactive visualization. Everything runs locally — no external API dependencies for memory extraction.
openclaw skills install tdai-memory-suiteA complete, fully-local memory system for OpenClaw agents. Four components work together to give your AI agent persistent memory, semantic search, structured knowledge, and visual introspection.
Path: components/tdai-core/
The heart of the system. Automatically captures conversations and extracts structured memories through a 4-layer pipeline:
| Layer | Name | Description |
|---|---|---|
| L0 | Conversation Recording | Raw message capture → SQLite + JSONL |
| L1 | Memory Extraction | LLM extracts structured memories (persona/episodic/instruction) with vector dedup |
| L2 | Scene Induction | LLM归纳场景块 (Scene Blocks) from conversation clusters |
| L3 | User Persona | LLM generates/updates user personality profile → persona.md |
Key features:
Memory types:
Configuration: memorySearch.provider: "local"
Uses nomic-embed-text-v1.5.Q4_K_M.gguf (quantized, ~270MB) for fully-local embeddings. No external embedding API needed.
Setup:
memorySearch.provider: "local" in openclaw.jsonPath: components/tdai-ontology/
Typed knowledge graph for structured agent memory. Stores entities and relationships as JSONL with schema validation.
Supported entity types:
Person, OrganizationProject, Task, GoalEvent, LocationDocument, Note, MessageTechnology, Skill, Action, PolicyKey features:
ontology.py and ontology_sync.pyPath: components/tdai-atlas/nomic_atlas_visualizer.py
Interactive HTML visualization of your agent's memory using sentence-transformers + UMAP dimensionality reduction.
Features:
clawhub install tdai-memory-suite
# Core memory pipeline (required)
clawhub install tdai-core
# Ontology knowledge graph (optional)
clawhub install tdai-ontology
# Atlas visualization (optional)
clawhub install tdai-atlas
Add to your openclaw.json:
{
"plugins": {
"allow": ["mx", "memory-tencentdb"],
"load": {
"paths": ["<path-to-tdai-core>"]
},
"entries": {
"memory-tencentdb": {
"enabled": true,
"config": {
"pipeline": {
"everyNConversations": 3,
"enableWarmup": true,
"l1IdleTimeoutSeconds": 10
}
}
}
}
}
}
{
"plugins": {
"allow": ["mx", "memory-tencentdb"],
"load": {
"paths": ["<path-to-tdai-core>"]
},
"entries": {
"memory-tencentdb": {
"enabled": true,
"config": {
"pipeline": {
"everyNConversations": 3,
"enableWarmup": true,
"l1IdleTimeoutSeconds": 10
},
"store": {
"backend": "sqlite"
}
}
}
}
},
"memorySearch": {
"provider": "local",
"model": "nomic-embed-text-v1.5.Q4_K_M.gguf"
}
}
{
"name": "Ontology Daily Sync",
"schedule": { "kind": "cron", "expr": "0 22 * * *", "tz": "Asia/Shanghai" },
"payload": {
"kind": "agentTurn",
"message": "Run ontology sync: python scripts/ontology_sync.py --days 7"
},
"sessionTarget": "isolated"
}
Memories are automatically recalled and injected into context. You can also search manually:
"Search my memories for information about project X"
"What do you remember about my preferences?"
# Create an entity
python components/tdai-ontology/scripts/ontology.py create --type Project --props '{"name":"New Product","status":"active"}'
# Query entities
python components/tdai-ontology/scripts/ontology.py query --type Task --where '{"status":"open"}'
# Create relations
python components/tdai-ontology/scripts/ontology.py relate --from proj_001 --rel has_task --to task_001
# Auto-sync from memory files
python components/tdai-ontology/scripts/ontology_sync.py --days 7
# Generate interactive visualization
python components/tdai-atlas/nomic_atlas_visualizer.py
# Output: output/memory_visualization.html
┌─────────────────────────────────────────────────────────────┐
│ TDaí Memory Suite │
├─────────────┬──────────────┬──────────────┬────────────────┤
│ TDaí Core │ TDaí Vector │ TDaí Ontology│ TDaí Atlas │
│ (L0→L3 │ (nomic-embed │ (Knowledge │ (UMAP + │
│ Pipeline) │ -text local)│ Graph) │ HTML viz) │
├─────────────┼──────────────┼──────────────┼────────────────┤
│ SQLite+FTS │ GGUF Model │ JSONL+Schema │ sentence- │
│ JSONL Store │ BM25+Vector │ Entity/Rel │ transformers │
└─────────────┴──────────────┴──────────────┴────────────────┘
│ │ │ │
└──────────────┴──────┬───────┴──────────────┘
│
┌──────────┴──────────┐
│ OpenClaw Gateway │
│ (LLM Extraction) │
└─────────────────────┘
When searching for memories, the system follows this priority:
tdai_memory_search) — primary structured memoryplugins.allow includes "memory-tencentdb"plugins.load.paths points to the correct directorymodels.providers and agents.defaults.model)nomic-embed-text-v1.5.Q4_K_M.gguf in models directorymemorySearch.provider is set to "local"memory/ontology/ directory existspip install --user pyyaml--dry-run to preview changesMIT