AgentMemory Skill
Persistent memory system for AI agents. Remember facts, learn from experience, and track entities across sessions.
Installation
clawdhub install agent-memory
Usage
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"})
When to Use
- Starting a session: Load relevant context from memory
- After conversations: Store important facts
- After failures: Record lessons learned
- Meeting new people/projects: Track as entities
Integration with Clawdbot
Add to your AGENTS.md or HEARTBEAT.md:
## Memory Protocol
On session start:
- Load recent lessons:
mem.get_lessons(limit=5)
- Check entity context for current task
- Recall relevant facts
On session end:
- Extract durable facts from conversation
- Record any lessons learned
Update entity information
Database Location
Default:
~/.agent-memory/memory.db
Custom:
AgentMemory(db_path="/path/to/memory.db")