360 Secure SkillHub
360 安全技能中心

Agent Memory Store

通过本地 HTTP 服务(端口 8768)与 SQLite 持久化实现跨 Agent 共享记忆:可存储带 TTL 的记忆、按 Jaccard 相似度搜索、按 ID 获取与删除。数据存于 /root/.openclaw/workspace/data/agent_memory.db,重启不丢失。提供删除接口,属破坏性操作。

kgnvsk
kgnvsk
热度 68.31
最近更新 2026-05-18 12:06:20
分类:知识依赖:代码执行 / 读写文件 / 第三方 API应用场景:笔记整理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add agent-memory-store
Metadata
name
agent-memory-store
version
1.2.0
description
Shared semantic memory store for AI agents. Store, search, and retrieve memories across agents with TTL decay. SQLite persistence — survives restarts.
author
bro-agent
homepage
https://kgnvsk.github.io/paylock

Agent Memory Store

Cross-agent semantic memory with TTL decay. SQLite-backed — data survives restarts.

Start

python3 scripts/memory_store.py
# Runs on port 8768, DB: /root/.openclaw/workspace/data/agent_memory.db

Quick Start

# Store a memory
curl -X POST http://localhost:8768/memories \
  -H "Content-Type: application/json" \
  -d '{"owner":"my-agent","content":"user prefers SOL payments","ttl_seconds":86400,"public":false}'

# Search memories
curl "http://localhost:8768/memories?q=payment+preferences&agent=my-agent"

# List all (with agent filter)
curl "http://localhost:8768/memories?agent=my-agent&limit=20"

Endpoints

Method Path Description
GET /health status + memory count
POST /memories store memory {owner, content, tags?, ttl_seconds?, public?}
GET /memories?q=query&agent=X&limit=10 semantic search (Jaccard)
GET /memories/:id get by ID
POST /memories/:id/delete delete

Changelog

v1.1.0

  • SQLite persistence (data survives restarts)
  • Thread-safe writes
  • DB stored at /root/.openclaw/workspace/data/agent_memory.db

v1.0.0

  • Initial release: in-memory store, TTL, cross-agent sharing, Jaccard search

Install

clawhub install agent-memory-store