agent-memory-persistence
Provide long-term memory persistence for AI agents with SQLite-backed storage, structured metadata, vector embeddings, semantic retrieval, lifecycle management, and queries by user, session, and time.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/imgolye/agent-memory-persistenceAgent Memory Persistence
Use this skill when an agent needs durable memory storage across sessions.
What it provides
- SQLite-backed persistence for text, metadata, and embedding vectors
- CRUD operations for memory items
- Semantic retrieval with cosine-similarity vector search
- Memory lifecycle operations including expiration cleanup
- Filters by user, session, type, and time window
Project structure
src/MemoryStore.ts: low-level SQLite storage enginesrc/VectorIndex.ts: vector similarity search over stored embeddingssrc/MemoryManager.ts: high-level API used by agentssrc/types.ts: shared TypeScript contracts
Usage pattern
- Create a
MemoryManagerwith a SQLite path. - Write memories with
content, optionalmetadata, and optionalembedding. - Query memories by session/user or use
searchByVector()for semantic lookup. - Periodically call
cleanupExpired()to delete stale memories.
Notes
- Embeddings are stored as JSON arrays in SQLite.
- Vector search is implemented in TypeScript using cosine similarity, which keeps deployment simple and avoids SQLite extensions.
- If memory volume grows substantially, replace
VectorIndexwith an ANN index or SQLite vector extension while preserving theMemoryManagerAPI.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-imgolye-agent-memory-persistence": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
xiaohongshu-viral-content
小红书爆款文案生成器。基于热门模板和数据驱动,生成高转化率的小红书内容。
daily-hot-push
每日推送中国热榜TOP10到飞书。从微博、知乎、百度、36氪筛选最重要的新闻,智能排除明星八卦和主观评论。
agent-task-queue
Build and operate a multi-agent task queue in OpenClaw with priority queues, delayed/dead-letter queues, scheduling, retry/timeout control, dependency management, parallel execution, and execution tracking using the bundled TypeScript runtime.
Doc Genius
Skill by imgolye
Crypto Scope
Skill by imgolye