zzhang82/Agent-Memory-Bridge

插件Plugin ⭐ 6 MIT codingdeveloper-toolsmemory

Agent Memory Bridge (AMB) is a local-first shared project memory layer for AI coding agents. Code tells AMB what the project is; conversations teach AMB why it is that way. Repository-derived WHAT and governed durable project WHY remain distinct and are available across tools and sessions through a small local MCP surface.

catalog 简介 / catalog descriptioncatalog description:Persistent engineering memory for coding agents over MCP.

项目介绍Project Overview

Agent Memory Bridge (AMB) 是本地优先的 AI 编码代理共享项目记忆层,通过 MCP stdio 暴露 17 个工具。核心能力是将代码衍生的项目事实(WHAT)与治理后的持久工程记忆(WHY)分离,经生命周期感知检索后由上下文编译器生成有界临时视图。适用于多客户端、多会话的长期编码协作。注意:当前源版本为 0.30.0,仍处早期阶段,不自动写入经验或改变排序。

Agent Memory Bridge (AMB) is a local-first shared project memory layer for AI coding agents, exposing 17 MCP stdio tools. It separates repository-derived project facts (WHAT) from governed durable engineering memory (WHY), then assembles a bounded transient context via lifecycle-aware retrieval and a deterministic compiler. Use it to preserve engineering decisions and procedures across sessions, tools, and client handoffs. Note: current source is v0.30.0 (schema v12, 17-tool surface); it does not auto-write lessons back, adjust ranking from feedback, or autonomously acquire skills.

安装Install

dsh plugin --profile web add github:zzhang82/Agent-Memory-Bridge

zzhang82/Agent-Memory-Bridge 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

Agent Memory Bridge

简体中文

MCP CI GitHub Release License: MIT Python 3.11+

Agent Memory Bridge (AMB) is a local-first shared project memory layer for AI coding agents. Code tells AMB what the project is; conversations teach AMB why it is that way. Repository-derived WHAT and governed durable project WHY remain distinct and are available across tools and sessions through a small local MCP surface.

Current source version: 0.30.0

Latest published release: v0.30.0

AMB complements AGENTS.md, CLAUDE.md, and client-native preference memory; it does not replace them. It is not a hosted agent runtime, scheduler, queue, or general-purpose memory platform.

Why AMB

Coding agents often lose useful engineering knowledge between sessions, clients, and handoffs. A plain summary can become stale; opaque retrieval can hide why an item was selected; and mutable operational state should not be mistaken for durable knowledge.

AMB keeps those concerns separate. It stores inspectable engineering memory, applies lifecycle-aware governance before task context is assembled, maintains exact-key mutable state through a distinct authority boundary, and keeps prompt-facing context transient.

What AMB Provides

Capability What it means
Durable engineering memory Local records for decisions, gotchas, procedures, concepts, beliefs, supporting evidence, and coordination signals.
Lifecycle-aware retrieval Eligibility, revision, supersession, validity, relation, and governance boundaries are applied before guidance is used.
Dynamic State authority An internal exact-key release-state lane with version and database-epoch preconditions; it is not semantic memory.
Governed task-memory assembly Task-time selection is derived from the existing governed memory path rather than a second retrieval system.
Transient Context Compiler A bounded, deterministic derived view over repository-derived WHAT, governed task memory, Dynamic State snapshots, and explicit session-local items.
Episode and verification evidence Explicit runs, artifacts, outcomes, and receipts support reviewable evidence without asserting causality or automatic learning.
Cross-client MCP access A stable local stdio interface for supported and documented MCP clients.
Repository Knowledge / WHAT Derived, bounded, rebuildable, namespace-bound repository facts. They are commit-bound only when a clean worktree is proven; stale or unavailable states fail closed, and normal MCP recall exposes only bounded selected WHAT.
Durable Project Memory / WHY Governed durable memory remains in normal recall items, retaining memory IDs, receipts, and lifecycle authority; repository facts never become durable memory rows.

AMB does not automatically write lessons back to memory, change ranking from feedback, promote self-generated reflection, or acquire skills autonomously.

How It Works

flowchart LR
    A[Durable Memory / WHY] --> C[Lifecycle-aware Recall]
    B[Repository Knowledge / WHAT] --> D[Context Compiler]
    S[Dynamic State Authority] --> D
    C --> E[Governed Task Memory]
    E --> D
    D --> F[Transient Bounded Context]
    F --> G[Metadata-only Context Attestation]
    G --> H[Episode and Run Authority]
    H --> I[Verification Receipt]
    I --> J[Current Verified Outcome]

Context bodies are rendered in process and are not durably persisted by the compiler. An attestation stores bounded metadata and digests, not the prompt-facing body. A selected context does not prove memory application, and memory application does not prove causality.

Read the complete authority and data-flow story in Architecture.

Quick Start

AMB runs locally with Python 3.11+, SQLite with FTS5, and an MCP-compatible client that can launch a local stdio server.

python -m venv .amb-venv
<venv-python> -m pip install -e .
<venv-python> -m agent_mem_bridge setup --client generic
<venv-python> -m agent_mem_bridge bootstrap-repo . --namespace project:my-app
<venv-python> -m agent_mem_bridge first-run --namespace project:my-app --query "What should I check before submitting changes?"

Then use the rendered client configuration, reload the client, and run:

<venv-python> -m agent_mem_bridge doctor
<venv-python> -m agent_mem_bridge verify

setup owns connection/configuration planning and safe apply; doctor/verify checks runtime health; first-run guides the first useful memory loop; and inspect is the daily explanation surface. The current source/package version is 0.30.0; use a source checkout with <venv-python> -m pip install -e . to evaluate this exact checkout. The latest published GitHub release is v0.30.0; its pinned source archive is https://github.com/zzhang82/Agent-Memory-Bridge/archive/refs/tags/v0.30.0.zip. For the detailed workflow, use Install for Agents, Installation Notes, Integrations, and Configuration.

Inspect a recall decision

After AMB surfaces task memory, inspect the governed result for a daily, read-only explanation:

agent-memory-bridge inspect \\
  --namespace project:my-app \\
  --query "What should I check before submitting changes?"

The report shows what surfaced, evidence-backed reasons, relevant governed exclusions, and review-required items. It does not list every database record, change durable memory/state/configuration, or prove a surfaced memory was applied or caused an outcome.

Integrations

AMB is a local stdio MCP server. Generic stdio MCP is supported; Codex is the reference workflow; Claude Code, Claude Desktop, Cursor, and Cline are documented; and Antigravity, OpenCode, and Hermes have locally tested configuration paths. Integration status labels are intentionally narrow and do not imply host certification.

See Integrations for client-specific configuration and boundaries.

Trust and Privacy

SQLite/WAL is the durable local authority. FTS5 and optional local embeddings are derived indexes, not memory authority. Dynamic State is separate from semantic memory. Run artifacts retain bounded metadata only, and AMB rejects raw transcript, hidden-reasoning, and inline artifact-body fields from the durable episode path.

Detailed boundaries are in the Authority Contract, Trust Boundary, and Closed-Loop Episode Authority.

MCP Tools

AMB exposes 17 public MCP tools:

  • store, recall, browse, and stats
  • forget, feedback, promote, annotate, revise, and export
  • begin_run, record_run_event, get_run, and complete_run
  • claim_signal, extend_signal_lease, and ack_signal

The public surface is intentionally small. Context assembly, review reports, and other derived views evolve behind these tools rather than adding separate task-packet or context-compiler tools. The local protocol cache contract is 300000/public for discovery and 0/private for the tool list; see MCP Compatibility for detail.

Documentation

Start here Use it for
Architecture Current high-level system and authority flow.
Production Status Current source facts, implemented capability summary, validation evidence, and known boundaries.
Capability History Durable historical capability milestones and retained proof/evidence references.
Install for Agents Detailed install-to-first-success workflow.
Integrations Client-specific local stdio MCP setup.
Configuration Complete configuration reference.
Authority Contract Durable authority, derived views, review, and correction rules.
Trust Boundary Local trust, provenance, privacy, and non-goals.
Examples Sanitized examples and demos.

Current Maturity

The current source is 0.30.0, uses schema v12, and retains the frozen 17-tool MCP surface. Checked-in source facts, validation evidence, and non-claims are maintained in Production Status. For live CI, use GitHub Actions or the CI badge above; for published versions, use GitHub Releases or the release badge above.

Roadmap

Future direction is capability-based and deliberately conservative. See the Roadmap; historical announcements remain evidence, not required reading for the current product story.

Contributing and Security

Read CONTRIBUTING.md for development and public-surface expectations, and SECURITY.md for the local-first security model and vulnerability reporting process.

Licensed under MIT.

上一个 Prev DSH-Telegram-Relay 下一个 Next dsh-api-balance