✨
Agent Memory Persistence
Agent Memory Persistence · v0.1.0
980 下载
0 安装
3k 收藏
5 浏览
简介
Agent Memory Persistence
原始描述
Provide long-term memory persistence for AI agents with SQLite-backed storage, structured metadata, vector embeddings, semantic retrieval, lifecycle manageme...
通过你的 Agent 添加
安装目录:agent-memory-persistence/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
Claude Code~/.claude/skills/agent-memory-persistence-53765/
Codex CLI~/.codex/skills/agent-memory-persistence-53765/
DeepSeek Harness~/.agents/skills/agent-memory-persistence-53765/
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: agent-memory-persistence
description: 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.
Agent 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 engine
src/VectorIndex.ts: vector similarity search over stored embeddings
src/MemoryManager.ts: high-level API used by agents
src/types.ts: shared TypeScript contracts
Usage pattern
- Create a
MemoryManager with a SQLite path.
- Write memories with
content, optional metadata, and optional embedding.
- 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
VectorIndex with an ANN index or SQLite vector extension while preserving the MemoryManager API.
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
MemoryManager with a SQLite path.
- Write memories with
content, optional metadata, and optional embedding.
- 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
VectorIndex with an ANN index or SQLite vector extension while preserving the MemoryManager API.
MemoryManager with a SQLite path.content, optional metadata, and optional embedding.searchByVector() for semantic lookup.cleanupExpired() to delete stale memories.- 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.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。
标签
同类 Skill
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
self-improving-agent
self-improving-agent
下载 416.7k
✨
Self-Improving + Proactive Agent
Self-Improving + Proactive Agent
下载 177.1k
✨
Gog
Gog
下载 165k