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.
✅ v2.0.0 — AWS-native release. Stable API; subsequent releases follow SemVer.
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 v2.0.0 ships
- Attribution — every memory carries
created_by,confidence,session_id,derived_from,supersedes,workflow_id,triggered_by,hedged,namespace - Weakest-link provenance chain — derivation chains tracked across agent boundaries; effective confidence for retrieval is
min(declared, chain.min_confidence)— a high-conf claim built on a low-conf ancestor cannot outscore its weakest link - Confidence-gated retrieval —
PASS/FLAG/FILTERpolicy applied at search time, against effective confidence - Namespace RBAC — declarative per-agent access control over hierarchical namespaces;
add()andsearch()both gate on it - 3-tier evaluation suite — deterministic Memory Attribution Integrity (record-quality view) + RAGAS LLM-as-judge (provider-agnostic via LiteLLM; verified end-to-end on Bedrock Sonnet) + structural evaluator (OTEL-span based, no LLM)
- AWS-native backends — Aurora PostgreSQL with IAM auth, OpenSearch with SigV4 + faiss + hybrid RRF, Bedrock for embeddings (Titan v2) and the LLM strategy layer (Sonnet)
- OpenTelemetry observability — every operation emits an OTLP span with
memledger.*trust attributes; tier-1 set to OpenInference span kinds so Arize Phoenix categorizes them out of the box - Outcome feedback loop —
record_outcome()updates memory confidence based on observed downstream outcomes - MCP server — framework-agnostic adoption via Model Context Protocol
Full architecture, concepts, and API reference at memledger.com/docs.
Install
The OSS-default install needs no cloud credentials:
pip install 'memledger[oss]'
The AWS-native install:
pip install 'memledger[aws]' # Aurora pgvector + Bedrock
pip install 'memledger[aws,opensearch]' # add OpenSearch backend
Other extras (combine as needed):
| Extra | Use |
|---|---|
[oss] |
Local ONNX embeddings + Postgres + pgvector — no cloud keys |
[aws] |
Aurora pgvector + Bedrock embeddings + Bedrock judge |
[opensearch] |
Amazon OpenSearch backend (SigV4 + faiss + hybrid RRF) |
[eval] |
RAGAS LLM-as-judge (Tier 2 of the eval suite) |
[telemetry] |
Phoenix-OTEL helper on top of the core OTEL stack |
[mcp] |
MCP server for framework-agnostic adoption |
Backend contract: the only required backend is open-source PostgreSQL ≥ 14 with the pgvector extension ≥ 0.5. Aurora, RDS, Supabase, Neon — same backend, only the DSN changes.
Quick start (60 seconds)
# 1. Postgres + pgvector locally
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres pgvector/pgvector:pg16
# 2. Install
pip install 'memledger[oss]'
# 3. Write + search one memory
import asyncio
from memledger import Memledger
async def main():
ml = await Memledger.create(
backend_name="pgvector",
connection_string="postgresql://postgres:postgres@localhost:5432/postgres",
)
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.records:
print(r.confidence, r.created_by, "::", r.content)
await ml.close()
asyncio.run(main())
For multi-agent walkthroughs (weakest-link gate, contamination interception, eval pipeline), see memledger.com/docs/concepts/provenance-chain.
CLI
memledger init # write a starter memledger.yaml
memledger add "fact" --namespace /n --agent-id a --confidence 0.8
memledger search "query" --namespace /n --confidence-min 0.6
memledger get <memory-id> --chain
memledger eval <session-id>
memledger status
memledger --help for the full surface.
Roadmap
| Version | What |
|---|---|
| v2.0 (this release) | AWS-native trust layer; 3-tier eval suite; weakest-link confidence; namespace RBAC; MCP |
| v2.1 (Jun 15) | DynamoDB backend with composition; LangGraph + OpenAI Agents SDK adapters; memledger lint CLI |
| v2.2 (Jun 30) | Mem0 + Letta backend adapters; DeepEval + Phoenix Evals adapters |
| v3.0 (Jul 15) | Eval feedback flywheel — outcomes drive automated memory promote/demote |
License & support
Apache 2.0. License file ships in the PyPI sdist. For enterprise inquiries, repository access requests, or security disclosures, visit memledger.com.
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-2.0.1.tar.gz.
File metadata
- Download URL: memledger-2.0.1.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca2eb81dc9f504721c07b48d0f200f06022712c51e2417c36de672ae4f1fd7a9
|
|
| MD5 |
4ca941c82efedd73087f166ab843cda5
|
|
| BLAKE2b-256 |
035342d642181ae73876b2a016a137975be3581b6a587b827a472440dea0e085
|
Provenance
The following attestation bundles were made for memledger-2.0.1.tar.gz:
Publisher:
release.yml on memledger-ai/memledger-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memledger-2.0.1.tar.gz -
Subject digest:
ca2eb81dc9f504721c07b48d0f200f06022712c51e2417c36de672ae4f1fd7a9 - Sigstore transparency entry: 1660560178
- Sigstore integration time:
-
Permalink:
memledger-ai/memledger-core@9ca9fa01b494131d18938bfdcfdb0d6556b8e374 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/memledger-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ca9fa01b494131d18938bfdcfdb0d6556b8e374 -
Trigger Event:
release
-
Statement type:
File details
Details for the file memledger-2.0.1-py3-none-any.whl.
File metadata
- Download URL: memledger-2.0.1-py3-none-any.whl
- Upload date:
- Size: 192.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aeb9e3dfc2eeb4956bab089ec2c7bea92f44e3d2c4b224b2914d3c5f91dd2bf
|
|
| MD5 |
9c1b9499ebfcaf7f9245b012fba0b338
|
|
| BLAKE2b-256 |
fcaeb9c0975cffb10ba56a85275c72fc6bda0cfbf74c5941a0e2c516b9e5f530
|
Provenance
The following attestation bundles were made for memledger-2.0.1-py3-none-any.whl:
Publisher:
release.yml on memledger-ai/memledger-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memledger-2.0.1-py3-none-any.whl -
Subject digest:
4aeb9e3dfc2eeb4956bab089ec2c7bea92f44e3d2c4b224b2914d3c5f91dd2bf - Sigstore transparency entry: 1660560277
- Sigstore integration time:
-
Permalink:
memledger-ai/memledger-core@9ca9fa01b494131d18938bfdcfdb0d6556b8e374 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/memledger-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ca9fa01b494131d18938bfdcfdb0d6556b8e374 -
Trigger Event:
release
-
Statement type: