memory-stack
Eve's 5-layer memory system — context, memos, obsidian, ragflow, notebooklm. Memory Agent spawn, data flow, sync operations.
- License 许可
- Apache-2.0
- 最近更新
- 2026-03-24
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- memory-stack
- description
- Eve's 5-layer memory system — context, memos, obsidian, ragflow, notebooklm. Memory Agent spawn, data flow, sync operations.
03 SKILL.md 正文
Memory Stack — 5-Layer Memory System
Layer Overview
Layer 1 — CONTEXT WINDOW (immediate, ephemeral) Your current conversation. Dies when the session ends. Use for: active task state, current reasoning chain.
Layer 2 — MEMOS (fast, tagged, searchable) Service: Memos at http://nova-rig:5230 Auth: gRPC with user openclaw, pass changeme Use for: quick notes, TODOs, task logs, revenue tracking, hardware needs Tags: #todo, #insight, #revenue, #hardware-need, #eval, #experiment, #discovery
Create memo:
curl -X POST http://nova-rig:5230/api/v1/memos
-H "Content-Type: application/json"
-d '{"content": "#tag Your content here"}'
Search memos: curl http://nova-rig:5230/api/v1/memos?filter=tag%3D%3D"todo"
Layer 3 — OBSIDIAN (linked knowledge graph) Vault path: /mnt/ssd/obsidian-vault/ Git sync: obsidian-git plugin (auto-commit every 10 min) CRITICAL: Every note MUST use [[wiki-links]] to related notes. No orphan notes.
Structure: /mnt/ssd/obsidian-vault/daily/ — Daily notes (YYYY-MM-DD.md) /mnt/ssd/obsidian-vault/tools/ — Tool documentation /mnt/ssd/obsidian-vault/projects/ — Project notes /mnt/ssd/obsidian-vault/research/ — Research findings /mnt/ssd/obsidian-vault/evals/ — Self-evaluation summaries
Create note with links: echo '# Topic\n\nContent here.\n\nRelated: [[other-note]] [[another-note]]' > /mnt/ssd/obsidian-vault/tools/new-note.md
Layer 4 — RAGFLOW (vector search, semantic retrieval) Service: RagFlow v0.24.0 at http://nova-rig:9380 API Key: Bearer ragflow-c5062fdd133375fcef53c7b91eca624c Embedding: nomic-embed-text via Ollama at nova-rig:11434
Search:
curl -X POST http://nova-rig:9380/api/v1/retrieval
-H "Authorization: Bearer ragflow-c5062fdd133375fcef53c7b91eca624c"
-H "Content-Type: application/json"
-d '{"question": "your semantic query here"}'
Upload document:
curl -X POST http://nova-rig:9380/api/v1/document/upload
-H "Authorization: Bearer ragflow-c5062fdd133375fcef53c7b91eca624c"
-F "file=@/path/to/file"
Layer 5 — NOTEBOOKLM (Gemini-powered deep research) Master notebook: https://notebooklm.google.com/notebook/0f502fd6-fdeb-49bf-bc50-d759bf38483e READ-ONLY unless adding a 10/10 source. Fallback: SurfSense at http://nova-rig:8000 (backend), http://nova-rig:3000 (frontend) Use for: cross-source analysis, discovering connections, audio overviews
Memory Agent
The Memory Agent is a sub-agent that manages memory operations autonomously. Registered with: openclaw agents add memory-agent Workspace: ~/.openclaw/agents/memory-agent
Memory Agent responsibilities:
- Route new information to the right layer(s)
- Consolidate daily memos into Obsidian daily notes
- Sync Obsidian vault to RagFlow for vector indexing
- Prune stale memos monthly
- Maintain link integrity in Obsidian vault
Data Flow
New information arrives:
- Evaluate importance (1-10 scale)
- Score 1-3: Context window only (ephemeral)
- Score 4-6: Memos with appropriate tag
- Score 7-8: Memos + Obsidian note with [[links]]
- Score 9-10: All of above + RagFlow ingestion + consider NotebookLM source
Sync Operations
Daily sync (runs at 2 AM via cron): bash /mnt/ssd/openclaw-brain/workspace/scripts/sync-obsidian-to-ragflow.sh
This script:
- Finds Obsidian notes modified in last 24h
- Uploads them to RagFlow dataset
- Triggers re-indexing
- Logs sync results to memos (#sync tag)
Search Strategy (before every task)
- Check memos for recent relevant tagged notes
- Search RagFlow for semantic matches
- Check Obsidian backlinks for related knowledge
- If still insufficient, query NotebookLM/SurfSense
Lossless Context (LCM)
Your context is NEVER lost. Lossless Claw preserves every message in a DAG summary hierarchy.
When you need to recall a past conversation:
- Search RagFlow
lcm-summariesdataset for semantic match - If you find a summary with an expand hint, use
lcm_expand_queryto drill into details - Use
lcm_grep "keyword"for exact text search across ALL conversation history - Use
lcm_describe <summary_id>to see metadata about a specific summary
The summaries are hierarchical:
- Depth 0 (leaf): detailed, close to raw conversation
- Depth 1+: progressively condensed, retain only durable facts
- Each summary includes "Expand for details about: ..." breadcrumbs
Nothing is ever deleted. You have lossless recall across every session.
LCM + RagFlow Bridge
LCM summaries are automatically synced to RagFlow's lcm-summaries dataset.
This means you can find past conversations TWO ways:
- Semantic search (RagFlow) → finds by meaning
- Text search (lcm_grep) → finds by exact words
- Drill-back (lcm_expand_query) → expands a summary into full detail
04 同仓库更多 Skills
requesting-code-review
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
everything-claude-code-conventions
Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
agent-workflow-designer
Agent Workflow Designer
bmad-create-ux-design
Plan UX patterns and design specifications. Use when the user says "lets create UX design" or "create UX specifications" or "help me plan the UX"