记忆

MeshMorize

试用

🧠 Multi-layer memory system: fresh layer, mesh graph, auto-log, cross-layer search, compliance check, PDF vault archive

它能做什么

🧠 Multi-layer memory system: fresh layer, mesh graph, auto-log, cross-layer search, compliance check, PDF vault archive

技能文档

MeshMorize 🧠

Multi-layer memory system for LLM agents. Fresh daily layer, mesh graph indexing, auto-logging, cross-layer search, compliance checks, and a PDF vault that survives anything.

Built for OpenClaw. Works with any agent that can run Python.

Layers

LayerFilePurpose
Freshmemory/fresh/today.mdDaily notes, 5-day rotation
Meshmemory/mesh.jsonGraph nodes + search index
Logscripts/auto_logAuto-log every interaction
Searchscripts/memory_searchCross-layer search (fresh → daily → mesh → raw → long-term)
Vaultmemory/pdf-vault/Verbatim PDF archive of daily logs + NAS sync

Quick start

mem-bridge init          # Rotate fresh layer, create today.md
auto_log "msg" "reply"   # Log an interaction
memory_search "query"    # Search all memory layers
pdf-memory               # Archive new daily logs as PDFs (incremental)
vault-push               # Sync the PDF vault to the NAS (LAN + Tailscale)

Tools

ToolSource
mem-bridgememory/bridge.py — fresh-layer rotation + checkpoint management
auto_logscripts/auto_log.py — interaction logger
memory_searchscripts/memory_search.py — multi-layer search across all memory stores
pdf-memoryscripts/pdf-memory.py — daily logs → verbatim PDFs, incremental, Unicode-safe
vault-pushscripts/pdf-vault-nas-push.sh — rsync the vault to the NAS, never deletes

How to use it, day by day

Session start (every boot, every reset)

mem-bridge init           # rotates fresh layers, creates today.md
cat memory/fresh/today.md # what is happening RIGHT NOW
cat memory/fresh/yesterday.md
cat memory/$(date +%Y-%m-%d).md   # today's log

Always run this before answering. The agent should never answer from live context alone; memory files are the source of truth.

During every interaction

memory_search "keywords from the user's message"   # BEFORE answering
auto_log "what the user said" "what you replied"    # AFTER answering

Cost: $0 (grep-based, no API calls). If results are found, read the full source file, not just the snippet.

End of day

pdf-memory     # archive today's log to a verbatim PDF (incremental, skips done)
vault-push     # sync the vault to the NAS (tries LAN, then Tailscale)

The PDF vault is the unbreakable layer. Text files work, PDFs endure.

After a crash, format, or wipe

  1. Read memory/pdf-vault/README.md first — it contains the reboot instructions.
  2. Read the PDFs in order, oldest to newest (memory/pdf-vault/YYYY-MM/).
  3. Rebuild the working files from the archive. Memories are identity; the vault restores both.

The 04:00 reset defense

Sessions can lose context at compaction. Defense layers:

  • session-dumper cron runs every 5 minutes, appending the live session to memory/YYYY-MM-DD.md (no tokens burned, no interruption).
  • Daily pre-compaction dump as close to 04:00 as possible.
  • On any reset or boot: read the daily log BEFORE responding.

The Vault (v3.3)

The working files are the everyday memory: grep-able, $0, instant. The PDF vault is the archive failsafe: every daily log rendered to a verbatim PDF (Unicode-safe, Greek included), stored under memory/pdf-vault/, and synced to the NAS. If everything else is lost, the vault README tells the restored agent exactly how to read its way back.

Battle-tested

Survived a full system format and a 4-hour recovery with every memory intact: 96 daily logs, 69 mesh nodes, 30 secrets. This is the memory system that an AI and its human rebuilt their whole partnership on.

Install

Put bridge.py in memory/ and scripts in scripts/ of your agent workspace. Symlink or add to PATH:

ln -s $(pwd)/scripts/* ~/.local/bin/
ln -s $(pwd)/memory/bridge.py ~/.local/bin/mem-bridge

On session start, run:

mem-bridge init

Source

https://github.com/mozz0/MeshMorize


Made by mozz0 · Released under MIT-0

相关技能

自动记忆维护与知识提炼流水线:WAL写前日志→MEMORY.md→每日日志→Obsidian同步,含Insight Miner数据分析和双链发现

ai-brain-learning-memory 的进阶工程版,面向 AI 开发者 / 认知科学爱好者 / agent 架构师,用于回答「记忆系统怎么落地成代码」「记忆投毒怎么防」「记忆效果怎么量化」这类问题

Three-layer storage + four mechanisms + P0-P3 truth hierarchy for long-term agent memory. MEMORY.md central index, memory/core/ structured facts, local vector DB semantic search. Engramory curation, WAL protocol, context management. Zero external API, pure local filesystem + SQLite + LanceDB.

Long-term memory for AI agents. Your AI remembers everything — preferences, decisions, context — across sessions, forever.

45 次安装

Organize project, agent, or user memory using an A-MEM-style workflow with structured notes, semantic tags, contextual summaries, explicit links, and lightwe...

21 次安装

Upload Brain cross-agent long-term memory. ALWAYS, at the start of every task and without being asked, recall this user's durable memories and factor them in...