Agent Memory Control Plane

Agent Memory Control Plane

Enables governance of AI-agent memory through deterministic routing, explicit ownership, review before promotion, scope-aware retrieval, conflict handling, and auditable receipts via seven MCP tools.

Category
访问服务器

README

Agent Memory Control Plane

English · 🇷🇺 Полное описание на русском

A local-first governance layer for AI-agent memory: deterministic routing, explicit ownership, review before promotion, scope-aware retrieval, conflict handling, and auditable receipts.

По-русски: локальная система управления памятью AI-агентов с явными владельцами истины, проверкой перед записью, разграничением доступа, обработкой конфликтов и аудитом. Открыть полное русское описание →

This is not another vector-memory demo. It answers the harder operational questions:

  • What is worth remembering?
  • Which source owns the truth?
  • Where should a proposed change be written?
  • Who may read or promote it?
  • Why did a record appear in retrieval?
  • What happens when two sources disagree?

Why it exists

A single assistant can survive on chat history. A multi-agent team cannot. Runtime messages, stable user preferences, operating procedures, team policy, and public knowledge have different owners, retention rules, and visibility boundaries. Mixing them into one searchable bucket creates stale answers, privacy leaks, and silent overrides.

Agent Memory Control Plane makes that lifecycle explicit and testable.

Architecture

flowchart LR
  I[Observation or proposed fact] --> C[Deterministic classification]
  C -->|forbidden or ephemeral| X[Reject as non-memory]
  C -->|allowed| W[Writeback route]
  W --> K[Memory candidate]
  K --> R{Reviewer and policy gate}
  R -->|lower precedence| F[Conflict receipt]
  R -->|approved| S[Canonical source]
  S --> P[(SQLite canonical state)]
  P --> Q[(FTS5 read-only projection)]
  Q --> A[Scope-aware search]
  A --> E[Explainable retrieval receipt]
  S -->|newer accepted record| U[Supersession, never silent delete]

The CLI and the isolated MCP adapter both pass through the same ControlPlane mutation boundary. Policy is packaged as YAML; contracts are expressed as JSON Schemas; SQLite stores canonical state and an append-only audit ledger; FTS5 is a rebuildable read-only projection.

What is real and useful here

This repository is a runnable reference implementation, not a slide deck or scaffold. It demonstrates:

  1. Deterministic classification and writeback routing for stable facts, procedures, governance, and non-memory runtime evidence.
  2. Candidate-first writes: no model or agent writes directly into canonical memory.
  3. Capability and provenance gates: actor, source, owner, and scope must match policy both at proposal and promotion time.
  4. Source precedence: lower-priority memory cannot overwrite higher-priority truth, even with identical content.
  5. Conflict and supersession receipts instead of silent merge or deletion.
  6. Scope-aware retrieval for private, team, and public records.
  7. Explainable results with source, owner, scope, confidence, update time, retrieval reason, writeback target, and conflict/staleness signals.
  8. Local-only operation with SQLite/FTS5 and no mandatory cloud, graph database, or embedding service.
  9. Seven MCP tools that reuse the same policy boundary as the CLI.
  10. Synthetic runnable scenarios for a personal assistant, a multi-agent team, and a public/private boundary.

Guarantees and non-guarantees

What the baseline enforces

  • fail-closed actor, source, owner, and scope checks;
  • dry-run by default for proposals and promotions;
  • explicit --apply for mutation;
  • no automatic merge, delete, or lower-priority override;
  • no raw-session indexing;
  • no direct LLM write path;
  • local-only storage in the baseline;
  • auditable proposal and promotion events;
  • reproducible health and privacy checks.

What it does not promise

No memory system can honestly guarantee that an agent will never forget or that infrastructure will always work. This project reduces silent forgetting and drift by making ownership, promotion, retrieval, and health visible. Production operators still need backups, monitoring, policy review, and tested recovery.

It also does not provide semantic similarity in the baseline, cloud synchronization, automatic connector installation, or a production database migration framework.

Quick start

Requirements: Python 3.11+.

python3 -m venv .venv
.venv/bin/python -m pip install .
.venv/bin/amcp init
.venv/bin/amcp classify --dry-run "A procedure with step one"
.venv/bin/amcp propose greeting "Public onboarding guide" \
  --source public-knowledge --owner researcher --scope public \
  --actor researcher --apply
.venv/bin/amcp promote 1 --reviewer reviewer --apply
.venv/bin/amcp search onboarding --actor public_reader
.venv/bin/amcp explain 1 --actor public_reader
.venv/bin/amcp conflicts
.venv/bin/amcp audit
.venv/bin/amcp doctor
.venv/bin/amcp-mcp --list-tools
.venv/bin/python examples/run_scenarios.py

propose and its ingest alias are dry-run by default. promote is also dry-run unless --apply is present. The safe default route creates a private candidate owned by assistant in profile-memory; explicit source arguments must exactly match the source manifest and actor capability.

CLI surface

Command Purpose
init Create the local database and source registry
classify --dry-run Classify input and show its writeback route
propose / ingest Validate and optionally persist a candidate
promote Apply reviewer, precedence, and provenance gates
search Run FTS5 retrieval with scope filtering
explain Return the retrieval receipt for a record
conflicts List open conflicts
audit Show canonical and audit-ledger counts
doctor Run fail-closed health checks

MCP adapter

amcp-mcp is a dependency-free JSON-RPC stdio adapter. It exposes:

  • memory_search
  • memory_explain
  • memory_propose
  • memory_promote
  • memory_conflicts
  • memory_source_get
  • memory_health

The adapter does not expand privileges or install a connector. Every call is handled by the same policy-aware control plane.

Privacy and anonymization

The implementation, tests, policies, demo traces, roles, and examples are synthetic and generic. They do not contain private conversations, real agent rosters, local production paths, chat IDs, credentials, private repositories, or owner-context records.

The public resource links below are intentional public attribution, not runtime data. Release checks scan both the working tree and reachable Git history for private paths, credential patterns, email addresses, high-risk identifiers, and non-generic commit identities.

Run the gate locally:

python scripts/public_scan.py --history

Documentation

English

Русский

Additional artifacts: contributor guide and synthetic demo traces.

Public resources

License

MIT. Use the code as a reference implementation, keep the safety boundaries explicit, and do not present it as a guarantee of perfect memory or uninterrupted operation.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选