Trident Memory System
by @shivaclaw
Three-tier persistent memory architecture for OpenClaw agents with daily episodic logs, curated long-term memory, semantic recall, and WAL-based continuity w...
clawhub install trident-pluginπ About This Skill
name: trident description: Three-tier persistent memory architecture for OpenClaw agents with daily episodic logs, curated long-term memory, semantic recall, and WAL-based continuity without vendor lock-in. compatibility: OpenClaw 2026.4.0+ metadata: author: Shiva version: "1.0.0" clawdbot: emoji: ποΈ homepage: "https://github.com/ShivaClaw/trident-plugin"
Trident Memory System
Trident is a three-tier memory architecture for OpenClaw agents. It provides genuine continuity, identity, and recall across sessions without vendor lock-in.
Features
Quick Start
Installation
openclaw plugins install openclaw-trident
Or from GitHub:
openclaw plugins install https://github.com/ShivaClaw/trident-plugin
Usage
Once installed, Trident exposes four memory tools for agents:
#### 1. Memory Search
# Full-text search across all memory
memory_search(query="job search", mode="full_text", scope="both", limit=50)Regex search
memory_search(query="^\\[lesson\\]", mode="regex", limit=20)
#### 2. Memory Expand
# Expand a specific compacted summary
memory_expand(summary_ids=["sum_aab3cd29ed348405"], max_depth=3)Search first, then expand top matches
memory_expand(query="backup cron", max_depth=2)
#### 3. Memory Update
# Append to today's daily log
memory_update(
entry="Deployed Trident v1.0 to ClawHub",
section="## Milestones",
tag="[project]"
)
#### 4. Memory Recall
# Answer a question using memory context
memory_recall(
prompt="What was the job search status as of last week?",
max_tokens=2000
)
Architecture
Layer 0: Signal Classification (15-min heartbeat)
Scans incoming messages for signals:Routes high-signal items to Layer 1 buckets automatically.
Layer 1: Hierarchical Memory
MEMORY.md # Curated long-term memory
memory/
βββ YYYY-MM-DD.md # Daily episodic logs
βββ projects/ # Active workstreams
βββ self/ # Identity & interests
βββ lessons/ # Mistakes & insights
βββ reflections/ # Weekly consolidation
Each file is promoted only when durable and high-signal.
Layer 2: Durability & Backup
Semantic Recall (Phase 8)
Configuration
Install with openclaw plugins install openclaw-trident, then configure:
{
"plugins": {
"trident": {
"enabled": true,
"memoryRoot": "/path/to/workspace",
"maxDailyLogSize": 5242880,
"enableSemanticRecall": true
}
}
}
Example Workflows
Daily Briefing
Layer 0 (15-min) β Scan messages β Tag signals β Write to daily log
β
Daily cron (6 AM) β Read memory/YYYY-MM-DD.md β Synthesize briefing
Weekly Reflection
Layer 0 (5 days) β Accumulate signals β Triage
β
Reflection cron (Fri 4 PM) β Promote to MEMORY.md, projects/, self/
β
Next session β Read promoted items β Updated identity
Semantic Recall
Agent turn starts
β
Layer 0.5 β Query Qdrant (user's prompt) β Top 3β5 summaries
β
LCM expand β Inject as context
β
Agent responds with genuine continuity
Rationale
Why Three Tiers?
Why Semantic Recall?
Why GitHub + Snapshots?
Limitations & Future
Current
Roadmap v1.1+
References
_Shiva's memory is persistent. Build continuity; it compounds._
π‘ Examples
Once installed, Trident exposes four memory tools for agents:
#### 1. Memory Search
# Full-text search across all memory
memory_search(query="job search", mode="full_text", scope="both", limit=50)Regex search
memory_search(query="^\\[lesson\\]", mode="regex", limit=20)
#### 2. Memory Expand
# Expand a specific compacted summary
memory_expand(summary_ids=["sum_aab3cd29ed348405"], max_depth=3)Search first, then expand top matches
memory_expand(query="backup cron", max_depth=2)
#### 3. Memory Update
# Append to today's daily log
memory_update(
entry="Deployed Trident v1.0 to ClawHub",
section="## Milestones",
tag="[project]"
)
#### 4. Memory Recall
# Answer a question using memory context
memory_recall(
prompt="What was the job search status as of last week?",
max_tokens=2000
)
βοΈ Configuration
Install with openclaw plugins install openclaw-trident, then configure:
{
"plugins": {
"trident": {
"enabled": true,
"memoryRoot": "/path/to/workspace",
"maxDailyLogSize": 5242880,
"enableSemanticRecall": true
}
}
}