Memory System
Persistent project memory for AI agents with working, project, and global layers
2 min read
Memory System
Knowns v0.17 adds a 3-layer memory system so agents can retain patterns, decisions, and conventions across sessions instead of relearning them every time.
The 3 Layers
| Layer | Scope | Best for |
|---|---|---|
| Working | Current session only | Temporary notes, active investigation context |
| Project | Current repository | Team conventions, architecture decisions, reusable patterns |
| Global | Across projects | Personal defaults and broadly reusable practices |
Why It Matters
- Agents can load project memory at session start
- Reusable learnings stop disappearing between sessions
- Important patterns can be promoted instead of copied into every prompt
- Search and graph views can connect memories to tasks and docs
CLI Commands
Persistent memory is managed with the knowns memory command group:
# List memory entries
knowns memory list --plain
# Filter by layer or category
knowns memory list --layer project --category pattern --plain
# View a memory entry
knowns memory view <id> --plain
# Add a new memory entry
knowns memory add \
--title "Auth token rotation pattern" \
--category pattern \
--tags auth,security \
--content "Rotate access tokens every 15 minutes"
# Promote reusable knowledge
knowns memory promote <id>
knowns memory demote <id>MCP Tools
MCP has full memory coverage for both persistent and session-scoped memory:
- Persistent:
add_memory,get_memory,list_memories,update_memory,delete_memory,promote_memory,demote_memory - Working memory:
add_working_memory,get_working_memory,list_working_memories,delete_working_memory,clear_working_memory - Search: unified
searchcan include memory entries
See MCP Integration for the full tool list.
Typical Workflow
Research something once
→ save the distilled lesson to project memory
→ load it automatically in later sessions
→ promote it to global if it applies everywhereGood Memory Candidates
- Architecture decisions that should not be re-debated every session
- Team conventions that are easy for agents to miss
- Reusable debugging lessons
- Patterns extracted from completed tasks
Related
- Skills System -
kn-init,kn-research, andkn-extractnow use memory-aware workflows - Web UI - Browse memory entries and graph relationships visually
- CLI Reference - Full command syntax