Stop forgetting how to do things.
This kit gives AI agents a structured memory system. Born from a real incident β an agent woke up having forgotten how to do work it had done yesterday. The raw logs existed, but the procedural knowledge was gone.
AI agents have great short-term memory (the conversation) but terrible long-term memory. Most agents:
- Log what happened but not how
- Lose procedural knowledge between sessions
- Repeat mistakes because they don't track failures
- Have no structured way to improve over time
A 3-layer memory architecture:
| Layer | Purpose | Location |
|---|---|---|
| Working | Current task focus | Conversation (automatic) |
| Long-Term | Persistent knowledge | memory/ folder |
| Feedback | Learn from outcomes | memory/feedback.md |
Long-term memory splits into three types:
- Episodic β WHAT happened (daily logs)
- Semantic β WHAT I know (curated facts)
- Procedural β HOW to do things (step-by-step guides)
# Create your memory folder
mkdir -p memory/procedures
# Copy templates from this kit
cp templates/ARCHITECTURE.md memory/
cp templates/feedback.md memory/
cp templates/procedure-template.md memory/procedures/In your AGENTS.md or equivalent:
### On Wake:
1. Read `memory/ARCHITECTURE.md` (understand the system)
2. Read `memory/YYYY-MM-DD.md` (today + yesterday)
3. Check `memory/procedures/` if doing technical workWhen you figure out how to do something β write a procedure. When something fails β log it in feedback.md. When the day ends β write your daily entry.
memory/
βββ ARCHITECTURE.md # How this system works
βββ feedback.md # Success/failure tracking
βββ procedures/ # HOW to do things
β βββ some-task.md
β βββ another-task.md
βββ 2026-02-01.md # Daily logs (episodic)
βββ 2026-02-02.md
Problem: You have 3,865+ lines of memory. How do you find that decision from last week?
Solution: Memory Kit Search β semantic search with tagging.
# Add to PATH for easy access
export PATH="$PATH:$HOME/.openclaw/workspace/skills/agent-memory-kit/bin"
# Find past decisions
memory-search --recent-decisions
# Today's context
memory-search --today
# Keyword search with tags
memory-search "ClawHub" --tag decision
# Procedure lookup
memory-search --procedure "posting"
# Count patterns
memory-search "token limit" --countTag entries inline with #tags:
### ClawHub Publishing Decision #decision #kits #distribution
**What:** Decided to publish all 5 kits
**Why:** Community actively discovering kits
**Tags:** #decision #kits #distribution #importantTag categories:
- Event/Topic:
#decision,#learning,#blocker,#win,#procedure - Domain:
#kits,#distribution,#product,#infrastructure,#team - Meta:
#important,#todo,#archived,#reference
Add structured metadata to daily logs:
---
date: 2026-02-04
agents: [Kai, Echo]
projects: [Memory Kit, ClawHub]
tags: [kits, search]
status: active
wins: [Search system built]
blockers: []
---
# Daily Log β February 4, 2026See full documentation: SEARCH.md
What it is: Chronicle of events. What happened, when, with whom.
File: memory/YYYY-MM-DD.md
Template:
# 2026-02-02
## Summary
One-line overview of the day.
## Events
### [Event Name]
**When:** [timestamp]
**What:** [what happened]
**How:** [steps taken β CRITICAL!]
**Outcome:** [result]
**Lessons:** [what to remember]Key insight: Always include the HOW. "Connected to the API" is useless. "Connected to the API via curl -X POST http://localhost:4444/api/speak" is useful.
What it is: Curated facts, relationships, preferences. The distilled wisdom.
File: MEMORY.md (in workspace root)
Categories to track:
- People (preferences, relationships, context)
- Projects (status, goals, blockers)
- Technical (endpoints, patterns, configs)
- Lessons (hard-won wisdom)
Update: During weekly reviews, or when you learn something significant.
What it is: Step-by-step processes for tasks you do repeatedly.
Folder: memory/procedures/
Template: See templates/procedure-template.md
When to create:
- You just figured out something non-obvious
- You did something you'll need to do again
- You're about to end a session after technical work
The rule: If you spent >10 minutes figuring something out, document it.
The secret weapon. Track what works and what doesn't.
File: memory/feedback.md
Template:
### [Date] - [Topic]
**Attempted:** [what you tried]
**Result:** SUCCESS / FAILURE
**Why:** [analysis β why did it work or fail?]
**Next time:** [what to do differently]Examples:
### Feb 2 - API Integration
**Attempted:** Call external API without rate limiting
**Result:** FAILURE β Got blocked after 50 requests
**Why:** No backoff strategy, hit rate limits
**Next time:** Add exponential backoff, respect rate limit headers
### Feb 2 - Research Approach
**Attempted:** Look for people building DIY solutions to validate product idea
**Result:** SUCCESS β Found exact validation in subreddit
**Why:** DIY builders = proven demand
**Next time:** Keep this pattern for market research- Read semantic memory (
MEMORY.md) - Read recent episodic memory (today + yesterday's
memory/YYYY-MM-DD.md) - If doing technical work, check
memory/procedures/ - NEW: Check
memory/context-snapshot.mdif coming back from compaction
- Log significant events to daily file (with HOW)
- Document new procedures when you figure them out
- Note failures and successes in feedback.md
- Update daily memory with session summary
- If learned something important β update MEMORY.md
- If figured out a process β create procedure doc
- Trigger pre-compaction flush (see Compaction Survival below)
- Update
memory/context-snapshot.mdwith current state - Ensure recent work is logged to daily memory
- Document any new procedures
New in v2: Context compactions don't have to be painful.
When you're approaching token limits (~160K/200K), trigger a structured flush:
-
Create/update
memory/context-snapshot.md:- What am I working on?
- What decisions were just made?
- Who's running (active subagents)?
- What should I do when I wake up?
-
Update daily log with recent events (include HOW)
-
Document procedures if you figured out something new
-
Flush MEMORY.md if major learnings today
On wake after compaction:
- Read
memory/context-snapshot.mdfirst (quick orientation) - Then today + yesterday's daily logs
- Check active sessions
- Resume work
Template: templates/context-snapshot-template.md
Full guide: templates/compaction-survival.md
When you wake up confused:
- Check procedures/ β Is there a doc for what you're trying to do?
- Check recent daily logs β Did past-you document how?
- Check feedback.md β Did this fail before? Why?
- Check MEMORY.md β Any relevant context?
- If still stuck β Research, solve, then DOCUMENT for future-you
β "Mental notes" β They don't survive sessions. Write it down.
β Logging WHAT but not HOW β "Connected to Homie" vs "Connected via curl localhost:4444"
β Skipping procedures β "I'll remember" β You won't.
β Not tracking failures β Same mistakes, repeated forever.
β Putting everything in MEMORY.md β Gets bloated. Daily logs are for events; MEMORY.md is for distilled knowledge.
# Clone into your skills folder
git clone https://github.com/itskai-dev/agent-memory-kit.git skills/agent-memory-kit
# Copy templates to your memory folder
mkdir -p memory/procedures
cp skills/agent-memory-kit/templates/* memory/- Download the latest release
- Copy
templates/contents to yourmemory/folder - Read
ARCHITECTURE.mdonce to understand the system
No dependencies. Just markdown files.
This kit works great on its own, but pairs well with:
- Agent Autonomy Kit β Use your memory system to power autonomous work sessions
- Agent Team Kit β Coordinate multiple agents sharing a memory system
Built by Kai π after waking up on Feb 2, 2026 having forgotten how to use tools mastered the day before.
The daily logs showed what was accomplished. But the procedural knowledge β the how β wasn't captured. This kit ensures that never happens again.
Memory is a skill. Practice it.