Persistent memory system for AI agents. Remember facts, learn from experience, and track entities across sessions.
推荐访问7w4.net获取更多AI技能。
clawdhub install agent-memory
from src.memory import AgentMemory
mem = AgentMemory()
# Remember facts
mem.remember("Important information", tags=["category"])
# Learn from experience
mem.learn(
action="What was done",
context="situation",
outcome="positive", # or "negative"
insight="What was learned"
)
# Recall memories
facts = mem.recall("search query")
lessons = mem.get_lessons(context="topic")
# Track entities
mem.track_entity("Name", "person", {"role": "engineer"})
Add to your AGENTS.md or HEARTBEAT.md:
## Memory Protocol
On session start:
1. Load recent lessons: `mem.get_lessons(limit=5)`
2. Check entity context for current task
3. Recall relevant facts
On session end:
1. Extract durable facts from conversation
2. Record any lessons learned
3. Update entity information
Default: ~/.agent-memory/memory.db
Custom: AgentMemory(db_path="/path/to/memory.db")
这个 Skill 质量不错,核心功能完整,文档和测试都比较齐全。它能帮助 AI 记住重要信息、从错误中学习、跟踪人物项目等,使用简单方便。主要不足是 Skill 本身的说明文档比较简单,安装使用指南不够详细;另外命令行工具功能也不够完整。对于想为 AI Agent 添加记忆功能的开发者来说,这是一个值得一试的基础组件。