tiered-memory
БесплатноБез исполняемых скриптовНе проверенThree-tier agent memory model (hot/cold/wiki) for context reduction per spawn
от microsoft★ 1 527 звёзд на GitHubОб этом скилле
Skill: Tiered Agent Memory
Status (v0.10.0): This skill describes a design proposal, not a shipped runtime. Skill files install via
squad init/upgrade, but the underlying tier scaffolding (.squad/memory/hot/,cold/,wiki/), Scribe promotion logic, and spawn-template tier-aware reads are tracked in bradygaster/squad#1264. Until those land, agents continue to load fullhistory.md+decisions.mdon every spawn.
Overview
Squad agents today load their full context history on every spawn, which grows unboundedly across sessions. The Tiered Agent Memory model proposes a three-tier separation so agents only load the bytes that are actually relevant to the current task, with older context kept available on demand.
Memory Tiers
🔥 Hot Tier — Current Session Context
- Size target: keep small (~2–4KB typical)
- Load policy: Always loaded. Every spawn includes hot memory by default.
- Contents: Current task description, active decisions made this session, immediate blockers, last 3–5 actions taken, who you are talking to right now.
- Lifetime: Current session only. Discarded after session ends (Scribe promotes relevant parts to Cold).
- Purpose: Provide immediate task context without any latency or load decision.
❄️ Cold Tier — Summarized Cross-Session History
- Size target: larger summary, not full transcript (~8–12KB typical)
- Load policy: Load on demand. Include only when the task explicitly needs history.
- Contents: Summarized past sessions (compressed by Scribe), cross-session decisions, recurring patterns, unresolved issues from prior work.
- Lifetime: Rolling window (default proposal: 30 days). Eligible entries are then promoted to Wiki.
- Purpose: Answer "what have we tried before?" and "what was decided?" without replaying full transcripts.
- How to include: Pass
--include-coldin spawn template or add## Cold Memorysection.
📚 Wiki Tier — Durable Structured Knowledge
- Size target: variable, structured reference docs
- Load policy: Async write, selective read. Load only when task requires domain knowledge.
- Contents: Architecture decisions (ADRs), agent charters, routing rules, stable conventions, external API contracts, known platform constraints.
- Lifetime: Permanent until explicitly deprecated.
- Purpose: Authoritative reference. Not history — structured facts.
- How to include: Pass
--include-wikior reference specific wiki doc paths in spawn template.
When to Load Each Tier
| Situation | Hot | Cold | Wiki |
|---|---|---|---|
| New task, no prior context needed | ✅ | ❌ | ❌ |
| Resuming interrupted work | ✅ | ✅ | ❌ |
| Debugging a recurring issue | ✅ | ✅ | ❌ |
| Implementing against a spec/ADR | ✅ | ❌ | ✅ |
| Onboarding to unfamiliar subsystem | ✅ | ❌ | ✅ |
| Post-incident review | ✅ | ✅ | ✅ |
Spawn Template Pattern
The default spawn prompt should include Hot tier only:
## Memory Context
### Hot (current session)
{hot_context}
Add --include-cold when the task needs history:
## Memory Context
### Hot (current session)
{hot_context}
### Cold (summarized history — load on demand)
See: .squad/memory/cold/{agent-name}.md
Add --include-wiki when the task needs domain knowledge:
## Memory Context
### Hot (current session)
{hot_context}
### Wiki (durable reference)
See: .squad/memory/wiki/{topic}.md
Integration with Scribe Agent (design — not yet implemented)
Scribe is the proposed memory coordinator for this system. Once the runtime lands, Scribe will:
- End of session: Compress Hot → Cold summary (target: ~10% of session verbosity)
- Aged cold entries: Promote Cold → Wiki for decisions/facts that aged into stable knowledge
- On-demand wiki writes: Any agent can request Scribe to write a wiki entry mid-session
Until then, see the Scribe charter for current behavior: .squad/agents/scribe/charter.md
Implementation Checklist (tracked in #1264)
- Scribe writes Hot context file at session start (
.squad/memory/hot/{agent}.md) - Scribe compresses and writes Cold summary at session end
- Spawn templates default to Hot-only
- Coordinators add
--include-cold/--include-wikiflags as needed - Wiki entries stored in
.squad/memory/wiki/ - Cold entries stored in
.squad/memory/cold/with rolling TTL
References
- Tracking issue: bradygaster/squad#1264 — installation gap + runtime status
- Original design spike: bradygaster/squad#686 — tiered memory implementation plan
- Related: bradygaster/squad#600 — context payload growth
Spawn Template
Spawn Template: Agent with Tiered Memory
Use this template when spawning any Squad agen
Установить tiered-memory в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tiered-memory?
Three-tier agent memory model (hot/cold/wiki) for context reduction per spawn
Как установить скилл tiered-memory?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tiered-memory запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic