/install agent-memory-layer
Agent Memory Layer
Three-tier memory system for AI agents: short-term, long-term, and episodic.
Quick Start
from memory_layer import AgentMemory
mem = AgentMemory(agent_id="my-agent")
mem.short_term.add("User prefers dark mode", priority=0.8)
mem.long_term.store("Project uses React + TypeScript", tags=["tech", "project"])
mem.episodic.record("Debugged auth bug", outcome="success", duration_min=15)
# Recall
context = mem.short_term.recall(limit=10)
relevant = mem.long_term.search("frontend framework")
similar = mem.episodic.find_similar("debugging session")
Architecture
┌─────────────────────────────────────────┐
│ Agent Memory │
├───────────┬───────────┬─────────────────┤
│ Short-Term│ Long-Term │ Episodic │
│ (Redis) │ (Vectors) │ (Timeline) │
│ TTL: 1hr │ Permanent │ Decay: 30d │
│ Hot cache │ Semantic │ Consolidated │
└───────────┴───────────┴─────────────────┘
Memory Tiers
Short-Term (Working Memory)
- Recent context, active conversation, current task state
- TTL-based expiry (default 1 hour)
- Priority-weighted retention
- See
references/short-term.md
Long-Term (Knowledge)
- Persistent facts, preferences, learned patterns
- Vector similarity search for retrieval
- Tags and metadata for filtering
- See
references/long-term.md
Episodic (Experience)
- Timeline-ordered events with outcomes
- Decay function reduces old episode weight
- Consolidation moves recurring patterns to long-term
- See
references/episodic.md
Consolidation
Episodic memories that recur are automatically promoted to long-term:
- If the same outcome occurs 3+ times → store as learned pattern
- Failed approaches get negative weight in long-term
- See
scripts/consolidate.py
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-memory-layer - After installation, invoke the skill by name or use
/agent-memory-layer - Provide required inputs per the skill's parameter spec and get structured output
What is Agent Memory Layer?
Scalable memory system for AI agents with short-term, long-term, and episodic memory. Use when building agent memory persistence, conversation context manage... It is an AI Agent Skill for Claude Code / OpenClaw, with 95 downloads so far.
How do I install Agent Memory Layer?
Run "/install agent-memory-layer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agent Memory Layer free?
Yes, Agent Memory Layer is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Agent Memory Layer support?
Agent Memory Layer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agent Memory Layer?
It is built and maintained by Evez666 (@evezart); the current version is v1.0.0.