tiered-memory
Skill1 starsChanged 3 months agoMITView on GitHub
Use when designing or managing AI Agent persistent memory architectures to prevent context overflow while preserving durable facts.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- weininghui/skillstheir own version, first seen Aug 23, 2026
- microsoft/fsi-banking-payments-dispute-resolution-acceleratortheir own version, first seen Aug 14, 2026
- github/gh-awtheir own version, first seen May 27, 2026
- microsoft/Generative-AI-for-beginners-dotnettheir own version, first seen Mar 16, 2026
- Azure/fleettheir own version, first seen Feb 7, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- github/gh-aw★ 5.3ksame name
- microsoft/Generative-AI-for-beginners-dotnet★ 3.1ksame name
- Azure/fleet★ 226same name
- weininghui/skills★ 1same name
- microsoft/fsi-banking-payments-dispute-resolution-accelerator★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Saving transient task progress to L1 Core Memory: Never record PR numbers, bug fixes, or step counts to MEMORY.md.
- Very specific: line 42
Imperative phrasing in memory: Write memories as declarative facts ("User prefers concise tables" ✓), not directives ("Always output …
- Distinctive: line 43
Memory Sprawl: When L1 exceeds 70% capacity, trigger automatic consolidation: merge duplicates, prune obsolete entries, and offload …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tiered Memory Architecture for Autonomous Agents
Overview
A deterministic, layered memory engineering framework that replaces naive full-context injection. It organizes agent memory into 4 distinct tiers (Core Injected, Topic Notes, Searchable Session History, and Ephemeral Working Memory), ensuring high signal-to-noise ratio and zero context bloating.
When to Use & When NOT to Use
When to Use
- Agent system design where memory exceeds 5,000 characters and causes context degradation.
- Multi-session persistence: preserving stable user preferences and environmental facts across restarts.
- Preventing memory drift and hallucinatory rule overrides.
When NOT to Use
- Short, one-shot CLI tasks with no cross-session continuity requirements.
- Raw logging or storing multi-megabyte datasets (store in database / file assets instead).
The 4-Tier Memory Hierarchy
| Tier | Name | Storage Location | Injected Every Turn? | Capacity Budget | Contents & Purpose |
| L1 | Core Memory | MEMORY.md & USER.md | ✅ Yes | ≤ 10,000 chars (15%) | Durable user preferences, hard security redlines, production anchors |
| L2 | Topic Notes | notes/*.md | ❌ On-demand | Uncapped (file-based) | Detailed architecture specs, server inventory, API docs read as needed |
| L3 | Session History | SQLite state.db (FTS5) | ❌ Via search | Millions of messages | FTS5/Vector searchable past conversations and exact debug logs |
| L4 | Ephemeral Scratchpad | Session context / /tmp | 🔄 Current turn | Cleared on exit | Intermediate tool results, active plan steps, disposable data |
Common Pitfalls
- Saving transient task progress to L1 Core Memory: Never record PR numbers, bug fixes, or step counts to
MEMORY.md; they become stale in 7 days. Use session search instead. - Imperative phrasing in memory: Write memories as declarative facts (
"User prefers concise tables" ✓), not directives ("Always output tables" ✗), to avoid overriding runtime instructions. - Memory Sprawl: When L1 exceeds 70% capacity, trigger automatic consolidation: merge duplicates, prune obsolete entries, and offload detailed guides to L2 notes.
Verification Checklist
- L1 Core Memory is ≤ 70% of configured char budget.
- No temporary TODO state or session logs exist in
MEMORY.md. - Topic notes in
notes/contain structured YAML frontmatter. - Database FTS5 index is synchronized with message store.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

