Agent Memory Store
Cross-agent semantic memory with TTL decay. SQLite-backed — data survives restarts.
Start
CODEBLOCK0
Quick Start
CODEBLOCK1
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 INLINECODE1
v1.0.0
- - Initial release: in-memory store, TTL, cross-agent sharing, Jaccard search
Install
CODEBLOCK2
智能体记忆存储
支持TTL衰减的跨智能体语义记忆。基于SQLite存储——数据在重启后依然保留。
启动
bash
python3 scripts/memory_store.py
运行在端口8768,数据库文件:/root/.openclaw/workspace/data/agent_memory.db
快速开始
bash
存储一条记忆
curl -X POST http://localhost:8768/memories \
-H Content-Type: application/json \
-d {owner:my-agent,content:用户偏好SOL支付,ttl_seconds:86400,public:false}
搜索记忆
curl http://localhost:8768/memories?q=支付偏好&agent=my-agent
列出所有记忆(带智能体筛选)
curl http://localhost:8768/memories?agent=my-agent&limit=20
接口端点
| 方法 | 路径 | 描述 |
|---|
| GET | /health | 状态 + 记忆数量 |
| POST |
/memories | 存储记忆 {owner, content, tags?, ttl_seconds?, public?} |
| GET | /memories?q=查询&agent=X&limit=10 | 语义搜索(Jaccard相似度) |
| GET | /memories/:id | 按ID获取 |
| POST | /memories/:id/delete | 删除 |
更新日志
v1.1.0
- - SQLite持久化存储(数据在重启后保留)
- 线程安全写入
- 数据库存储路径:/root/.openclaw/workspace/data/agent_memory.db
v1.0.0
- - 初始版本:内存存储、TTL、跨智能体共享、Jaccard搜索
安装
bash
clawhub install agent-memory-store