Memory governance and trust layer for AI agents — provenance, attribution, confidence gating
Project description
memledger
Memory governance and trust layer for multi-agent AI systems.
memledger adds attribution, provenance, confidence gating, and quality measurement on top of any vector-backed memory store. Every memory carries a source, a confidence score, a derivation chain, and an audit trail — so when agents share memory, trust transfers become legible instead of invisible.
⚠️ v0.5.0a0 — alpha release (name-reservation). Phase A + B of the v1 OSS launch are done; Phase C/D/E are in flight.
pip install memledger(no--pre) will not pick this up — you must explicitly opt in (pip install memledger==0.5.0a0or--pre). The stablev1.0.0will follow when the launch checklist signs off. See CHANGELOG.md and docs/test-plan.md for what's verified vs. what's still on the runway. Do not use in production.
Why memledger
Existing memory frameworks (Mem0, Zep, Letta, AgentCore Memory) optimize for recall quality — how accurately the system retrieves relevant memory. None of them address accountability — who wrote this memory, how confident were they, what did they derive it from, and how has it been used since.
In a single-agent system, the accountability gap is academic. In a multi-agent system where agents read and act on each other's beliefs, it is the fault line where systems fail at scale.
What it does
- Attribution — every memory carries
created_by,confidence,session_id,derived_from,supersedes,workflow_id,triggered_by,hedged,namespace - Cross-agent lineage chains — derivation chains tracked across agent boundaries; effective confidence is the weakest link in the chain
- Confidence-gated retrieval — per-namespace
PASS/FLAG/FILTERpolicy applied at search time - Outcome feedback loop —
record_outcome()updates memory confidence based on observed downstream outcomes - Namespace RBAC — declarative per-agent access control over hierarchical namespaces
- Memory Attribution Integrity (MAI) evaluation — calibrated scorer (deterministic + LLM-as-judge) for memory quality
- OpenTelemetry observability — every operation emits spans with memory trust attributes
- MCP server — framework-agnostic adoption via Model Context Protocol
Install
pip install memledger
Backend extras (pick one or more):
pip install memledger[local,pgvector] # zero-cloud OSS quickstart: local fastembed + Postgres+pgvector
pip install memledger[pgvector] # bring your own LLM/embedding provider via LiteLLM
pip install memledger[sqlite] # local SQLite (tests/demos only)
pip install memledger[aws] # AWS path: Bedrock, OpenSearch SigV4, DynamoDB
Backend contract (v1): the only required backend is open-source PostgreSQL ≥ 14 with the pgvector extension ≥ 0.5. Aurora, RDS, Supabase, Neon and any other Postgres flavor work with the same backend class — only the DSN changes. See docs/architecture.md for verified deployment patterns (Docker, Kubernetes, AWS).
Quick start
from memledger import Memledger
ml = await Memledger.create(backend_name="sqlite", connection_string=":memory:")
await ml.add(
content="HikariCP maxPoolSize=50 fixes payment-service OOM",
namespace="/ops/incidents/payment-svc",
confidence=0.9,
created_by="ops-agent",
)
results = await ml.search(query="connection pool fix", namespace="/ops/incidents/payment-svc")
for r in results:
print(r.content, r.confidence, r.created_by)
Architecture
System architecture, data model, and observability pipeline are documented in docs/architecture.md.
Companion repositories
memledger is split across three repositories under the memledger-ai organization:
- memledger-core — Python SDK, MCP server, Helm chart (this repo)
- memledger-ui — Trust graph visualization (FastAPI + React)
- memledger-docs — Documentation site (Docusaurus)
License
Apache 2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memledger-0.5.0a0.tar.gz.
File metadata
- Download URL: memledger-0.5.0a0.tar.gz
- Upload date:
- Size: 209.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f9ff7d48e9d74555a94c80025784d5845460d9e8468fda1063149cd5e8f65b
|
|
| MD5 |
f4d711f94a030a3e038017ffe9152218
|
|
| BLAKE2b-256 |
eb962f290ee250187f176ab7b4d78fcfa3d96f3f05217c17c9d366394f6bb5c9
|
File details
Details for the file memledger-0.5.0a0-py3-none-any.whl.
File metadata
- Download URL: memledger-0.5.0a0-py3-none-any.whl
- Upload date:
- Size: 173.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c3ec342de451bbf14124ccc143115d875ef0bb5592c0018972fe3f64adffdbe
|
|
| MD5 |
860f62ffe986f77adbd7caee02bbcbfb
|
|
| BLAKE2b-256 |
390e607c2b08d00caf65637b499261867da729e7ca84cbb0be2176794860b816
|