← 返回
未分类 中文

MAMP

Mark AI Memory Protocol — persistent, searchable session memory for AI agents. SQLite-only, zero external dependencies.
Mark AI Memory Protocol — AI 代理的持久化、可搜索会话记忆,纯 SQLite,零外部依赖。
rokkiezeng rokkiezeng 来源
未分类 clawhub v1.2.1 1 版本 100000 Key: 无需
★ 1
Stars
📥 351
下载
💾 0
安装
1
版本
#latest

概述

MAMP — Mark AI Memory Protocol

Gives AI agents persistent, searchable memory using SQLite.

When to Use

  • User says "remember what I told you last time"
  • Agent needs to recall facts across conversations
  • User asks about past topics, preferences, or decisions
  • Context window is filling up and older info needs to be summarized

Core Concepts

  • Session — a conversation, has an ID, survives restarts
  • Turn — one message in a session (role: user/assistant)
  • Tag — labels for a turn, e.g. ["finance", "important"]
  • Priority — importance level: critical, normal, trivial

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_record

# Heartbeat (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:

  • DB file written to ./mark_memory.db in the current working directory
  • No system directories are touched
  • No log files, audit files, or hidden state files are written
  • No network access, no external services

Pass 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:

  • The DB file contains your conversation history in plaintext
  • Ensure the directory has appropriate access controls
  • If multiple agents run on the same host with the same path, they share memory — use different paths per agent to isolate

No credentials stored:

MAMP uses no API keys, tokens, or secrets. It is a pure local SQLite store.

版本历史

共 1 个版本

  • v1.2.1 当前
    2026-05-07 07:48 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,447 📥 329,342
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,524 📥 581,186
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 871 📥 349,661