| name | memory-manager |
| description | Comprehensive memory management for agents. Use when working with memory files (MEMORY.md, memory/*.md), searching historical context, managing daily logs, or organizing long-term knowledge. Includes memory_search and memory_get tools,file management utilities, and best practices for curating agent memory. |
Memory Manager
Complete memory management system for agents, including semantic search, file management, and memory curation workflows.
When to Use This Skill
- Searching for past decisions, preferences, or context
- Reading or writing to memory files
- Managing daily logs and long-term memory
- Organizing and archiving old memory files
- Before answering questions about prior work or conversations
Core Memory Tools
์์ด์ ํธ์ ๋ด์ฅ๋ ๋ ๊ฐ์ ๋ฉ๋ชจ๋ฆฌ ๋๊ตฌ (langgraph_agent.py์ @tool๋ก ๊ตฌํ):
memory_search(query, max_results?, min_score?)
MEMORY.md + memory/*.md ํ์ผ์ ๋ํ ํค์๋ ๊ธฐ๋ฐ ๊ฒ์.
Use when:
- User asks about past events, decisions, or preferences
- Looking for related information even with different wording
- Need to recall context from previous sessions
Parameters:
query (required): Search query string
max_results (optional, default: 5): Max results to return
min_score (optional, default: 0.0): Minimum relevance threshold (0.0-1.0)
Returns:
JSON array of snippets with text, path, from (line), lines, score.
์ด ๋๊ตฌ๋ ์์ด์ ํธ๊ฐ ์ง์ ํธ์ถํฉ๋๋ค (execute_code ๋ถํ์).
memory_get(path, from_line?, lines?)
ํน์ ๋ฉ๋ชจ๋ฆฌ Markdown ํ์ผ์ ์ง์ ์ฝ๊ธฐ.
Use after:
- memory_search to get full context
- When you know the exact file path
Parameters:
path (required): Workspace-relative path (e.g., "MEMORY.md", "memory/2026-02-27.md")
from_line (optional, default: 0): Starting line number, 1-indexed (0 = read from beginning)
lines (optional, default: 0): Number of lines to read (0 = read entire file)
Returns:
JSON with text (file content) and path.
Graceful degradation:
If file doesn't exist, returns { "text": "", "path": "..." } (no error).
Memory File Structure
MEMORY.md (Long-term memory)
- Curated, important information
- Decisions, preferences, durable facts
- Security: Only loaded in main, private session (not group chats)
memory/YYYY-MM-DD.md (Daily logs)
- Day-to-day notes, running context
- Append-only during the day
- Today + yesterday loaded at session start
Workflow Examples
์์ด์ ํธ๋ ์ด ๋๊ตฌ๋ค์ ์ง์ ํธ์ถํฉ๋๋ค (execute_code ๋ถํ์):
1. Search then read detailed context
memory_search(query="Tavily API setup") ํธ์ถ
- ๊ฒฐ๊ณผ์์ ๊ฐ์ฅ ๊ด๋ จ์ฑ ๋์ ํญ๋ชฉ์ path, from, lines ํ์ธ
memory_get(path=๊ฒฐ๊ณผ.path, from_line=๊ฒฐ๊ณผ.from, lines=๊ฒฐ๊ณผ.lines) ํธ์ถ
2. Check today's notes
memory_get(path="memory/2026-03-02.md") ํธ์ถ
- text๊ฐ ๋น์ด์์ผ๋ฉด ์์ง ์ค๋์ ๋ก๊ทธ๊ฐ ์์
3. Search across time
memory_search(query="Gmail configuration", max_results=5) ํธ์ถ
- ๊ฒฐ๊ณผ์ path์์ ๋ ์ง ํ์ธ (e.g., "memory/2026-02-27.md")
memory_get(path="memory/2026-02-27.md") ๋ก ์ ์ฒด ๋ด์ฉ ํ์ธ
File Management Utilities
Use scripts/manage_memory.py for file operations:
Create daily log
python scripts/manage_memory.py create-daily
python scripts/manage_memory.py create-daily --date 2026-03-01
Append content
python scripts/manage_memory.py append MEMORY.md "New important fact"
python scripts/manage_memory.py append memory/2026-03-01.md \
"Meeting notes here" --section "Meetings"
List recent logs
python scripts/manage_memory.py list
python scripts/manage_memory.py list --days 30 --json
Archive old logs
python scripts/manage_memory.py archive --days 90
Best Practices
When to Write Memory
-
MEMORY.md - Durable, important facts:
- User preferences and settings
- Important decisions and their reasoning
- API keys and credentials (redacted if sensitive)
- System configurations
- Long-term project information
-
memory/YYYY-MM-DD.md - Daily context:
- What happened today
- Tasks completed
- Meetings and conversations
- Temporary notes and observations
- Links to resources used
-
When someone says "remember this" - Write it down immediately!
- Don't keep "mental notes" - they vanish on session restart
- Memory files are the ONLY persistence
Search Before Answering
MANDATORY: Before answering questions about:
- Prior work or decisions
- Past conversations
- User preferences
- Dates and timelines
- People and relationships
- TODOs and tasks
Always run memory_search first, even if you think you remember. The current session context may not include relevant past information.
Curation Workflow
Periodically (during heartbeats or when memory is full):
- Read recent
memory/YYYY-MM-DD.md files
- Identify important facts worth keeping long-term
- Update
MEMORY.md with distilled learnings
- Remove outdated info from MEMORY.md
- Archive old daily logs
Think: Daily files = raw notes, MEMORY.md = curated wisdom.
Security Considerations
- MEMORY.md only loads in main session (direct chat with user)
- Never load in group chats to prevent information leakage
- Redact sensitive information (passwords, tokens) before writing
- User can always read the files directly - treat them as shared knowledge
Advanced: Memory Search Configuration
Memory search uses vector embeddings for semantic search. Common configurations:
Hybrid Search (BM25 + Vector)
Best for:
- Finding exact IDs or code symbols
- Semantic queries with different wording
MMR Re-ranking
Enable when you see redundant results:
- Balances relevance with diversity
- Prevents multiple similar snippets
Temporal Decay
Enable for long-running agents:
- Recent memories rank higher
- Old information naturally fades
For detailed configuration, see references/memory-system.md.
Common Patterns
Daily standup / summary
const yesterday = new Date(Date.now() - 86400000).toISOString().split('T')[0];
const yesterdayLog = await memory_get(`memory/${yesterday}.md`);
Project context recall
const projectInfo = await memory_search("project X status", 3);
const context = await memory_get(projectInfo[0].path);
Preference lookup
const prefs = await memory_search("preferred email client", 2);
if (prefs.length === 0 || prefs[0].score < 0.7) {
}
Troubleshooting
No search results
- Check if memory files exist (
memory_get the file directly)
- Verify embedding provider is configured
- Try different query wording
Search too slow
- Enable hybrid search
- Use remote embeddings instead of local
- Reduce
candidateMultiplier in config
Redundant results
- Enable MMR re-ranking (
mmr.enabled = true)
- Increase diversity (lower
lambda)
Stale information ranking high
- Enable temporal decay (
temporalDecay.enabled = true)
- Adjust
halfLifeDays (lower = faster decay)
Reference Documentation
For complete technical details, see references/memory-system.md:
- Full tool specifications
- Configuration options
- Vector search backends
- QMD experimental backend
- Session memory indexing
- Troubleshooting guide
Example: Full Memory Workflow
const results = await memory_search("Gmail setup decision", 3);
let context = "";
for (const result of results) {
const detail = await memory_get(result.path, result.from, result.lines);
context += `\n--- ${result.path} ---\n${detail.text}\n`;
}
const today = new Date().toISOString().split('T')[0];
await memory_get(`memory/${today}.md`);
Notes
- Memory files are plain Markdown - you can read/write them directly
- Changes to memory files trigger reindexing (debounced)
memory_search and memory_get๋ langgraph_agent.py์ @tool๋ก ๊ตฌํ๋์ด ์์
- ์์ด์ ํธ๊ฐ ์ง์ ๋๊ตฌ๋ก ํธ์ถ ๊ฐ๋ฅ (execute_code๋ฅผ ํตํ ํธ์ถ ๋ถํ์)
- This skill provides management utilities and usage patterns
- Memory is per-agent - each agent has its own workspace and memory index