🦀 ClawHub
MAMP
by @rokkiezeng
Mark AI Memory Protocol — persistent, searchable session memory for AI agents. SQLite-only, zero external dependencies.
TERMINAL
clawhub install mamp-memory📖 About This Skill
name: mamp-memory description: Mark AI Memory Protocol — persistent, searchable session memory for AI agents. SQLite-only, zero external dependencies. author: LeoTseng version: 1.2.1 license: MIT-0 security: credential_access: false # Local SQLite only, no external services or credentials data_persistence: true # Writes to a local .db file on disk
MAMP — Mark AI Memory Protocol
Gives AI agents persistent, searchable memory using SQLite.
When to Use
Core Concepts
Key Methods
from importlib.util import spec_from_file_location, module_from_spec
spec = spec_from_file_location("mamp", "ai_memory_protocol_v1.2.0.py")
mod = module_from_spec(spec)
spec.loader.exec_module(mod)Manual mode — explicit add_turn() calls
sm = mod.SessionManager()
sm.start_conversation()
sm.add_turn("user", "I prefer dark mode")
sm.add_turn("assistant", "Noted")Auto mode (v1.1.8+) — auto-captures turns without manual add_turn()
sm = mod.SessionManager(auto_record=True)
sm.start_conversation()
... conversations are recorded automatically ...
sm.stop() # flushes buffer and disables auto_recordHeartbeat (v1.1.9+) — called externally every ~5 min via Hermes cron
sm.heartbeat() # flushes buffer + closes idle sessions (>30 min)
Explicit db_path (recommended)
sm = mod.SessionManager(db_path="./memory.db", auto_record=True)Environment variable override:
export MARK_MEMORY_DB=/path/to/memory.db
What It Solves
AI forgets everything each conversation. MAMP makes memory persistent, searchable, and structured — without any external service, API key, or dependency beyond SQLite.
Security Notes
Default behavior — local directory only:
./mark_memory.db in the current working directoryPass an explicit path to isolate data:
sm = mod.SessionManager(db_path="/your/specific/path/memory.db")
Environment variable override:
export MARK_MEMORY_DB=/your/specific/path/memory.db
This takes precedence over both the default and any db_path argument.
Permissions awareness:
No credentials stored:
MAMP uses no API keys, tokens, or secrets. It is a pure local SQLite store.