KB-Memory: Knowledge Base & Memory System
Unified skill for agent knowledge persistence and recall. Covers four approaches to maintaining context across sessions.
When to Use
Trigger phrases:
- "save this to memory" / "remember this for later"
- "what do we know about…" / "search the knowledge base"
- "restore context from last session" / "where did we leave off?"
- "update the company KB" / "sync knowledge to brain"
Use when:
- A fact, decision, or preference should survive the current session
- You need to recall prior context, decisions, or project state
- Session continuity matters (compaction, resume, handoff)
Don't use for:
- One-off lookups that live entirely in the current context window
- General file storage — this is for structured knowledge, not arbitrary files
Anti-Rationalization Table
| Excuse | Reality | Rule |
|---|---|---|
| "I'll remember it" | Human memory is unreliable; agent context windows overflow | Persist everything; retrieval > recall |
| "Vector search is enough" | Vectors miss exact matches, relationships, temporal ordering | Combine vector + graph + keyword; no single index suffices |
| "One big context window" | Large contexts dilute attention and increase cost | Chunk, summarize, and retrieve precisely |
Trigger phrases:
- "save this to memory" / "remember this for later"
- "what do we know about…" / "search the knowledge base"
- "restore context from last session" / "where did we leave off?"
- "update the company KB" / "sync knowledge to brain"
Use when:
- A fact, decision, or preference should survive the current session
- You need to recall prior context, decisions, or project state
- Session continuity matters (compaction, resume, handoff)
Don't use for:
- One-off lookups that live entirely in the current context window
- General file storage — this is for structured knowledge, not arbitrary files
How to Use
- Pick the approach — Match the need to one of the four approaches below (KB, Company KB, Memory System, Session Brain)
- Follow the approach doc — Each row links a reference file with the exact commands and storage format
- Store with structure — Include entities/relations and timestamps so recall is precise
- Recall before acting — Query memory before duplicating effort or re-deriving decisions
- Consolidate — Promote durable facts from session brain to persistent memory at session end
Approaches
| Approach | Purpose | Reference |
|---|---|---|
| KB — Static knowledge base | Reference docs, policies, permanent facts | reference/approach/kb.md |
| Company KB — Organization wiki | Team docs, product info, internal guides | reference/approach/company-kb.md |
| Memory System — Persistent agent memory | Cross-session recall, user preferences | reference/approach/memory.md |
| Session Brain — Session context | Current conversation state, working memory | reference/approach/session-brain.md |
How They Fit Together
Permanent ←──────────────────────────────────→ Ephemeral
│ │
Company KB Memory System Session Brain
(team wiki) (cross-session facts) (current conv)
│ │
└── Both backed by KB (base reference docs) ───┘
- KB — Foundation. Static reference material that doesn't change.
- Company KB — Organization-specific information.
- Memory System — Learned facts about user, projects, and preferences.
- Session Brain — Working memory for the current task.