Self-Improving Agent
一个面向 Automation 场景的 Agent 技能。原始说明:Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
一个面向 Automation 场景的 Agent 技能。原始说明:Persistent memory for AI agents to store facts, learn from actions, recall information, and track entities across sessions.
Persistent memory system for AI agents. Remember facts, learn from experience, and track entities across sessions.
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")