跳到正文
DEV Community· lanbass869-cell·· 3 小時前AI 評分53

AI Agent 記憶由誰審核?MemTether 提供可追溯治理

Your AI Agent Remembers Things. Who Audits What It Remembers?

AI 導讀

作者打造 MemTether,一個 local-first 記憶中心,透過 SHA-256 雜湊鏈、來源歸因及修訂鏈,追蹤 AI Agent 記憶的寫入、變更與篡改。

正文

lanbass869-cell

The problem nobody talks about

AI agents are getting persistent memory. mem0, Zep, Letta, Cognee — they all store what your agent "learned." But none of them answer three questions:

  1. Who wrote this fact? (which agent, which session)
  2. What did it replace? (when the agent changed its mind)
  3. Can someone tamper with it silently? (malicious or accidental)

If your agent makes decisions based on remembered facts, these are governance questions. And governance without evidence is just hope.

What I built

MemTether is a local-first memory hub where:

  • Every write joins a SHA-256 hash chain with periodic anchors. Tamper with the database and verification turns red — reproducible in 60 seconds with python examples/audit_chain_demo.py
  • Corrections supersede instead of overwrite. The old truth stays queryable — memtether court <uid> shows the full chain
  • Source attribution is mandatory. A write without a registered source is rejected
  • Contradictions between agents queue for human adjudication — agents propose, humans decide
  • Bi-temporal timestamps separate "when it was true" from "when the system learned it"

Why not just markdown files?

| | Plain markdown | MemTether |
|---|---|---|
| Who wrote this? | ❌ | ✅ source + timestamp |
| What did it replace? | ❌ overwritten | ✅ supersession chain |
| Tamper detection | ❌ | ✅ hash chain |
| Concurrent write safety | ❌ last-write-wins | ✅ file lock + WAL |
| Query past states | ❌ | ✅ as_of("2026-10-15") |

Export to markdown anytime — but keep the governed database as the source of truth.

Honest numbers

All results from our own harness with per-question records committed to the repo. We documented a 27× score inflation from mixed denominators in memory benchmarks — which is why we report each metric under the exact scoring rule that produced it.

Try it in 30 seconds

pip install memtether
memtether demo
memtether search "投影" --list

Works with Claude Code, Codex, Cursor, and 20 other agents via file-level pointers or MCP.

GitHub | PyPI | npm

來源:DEV Community · dev.to