The problem
Agents without memory repeat every mistake.
Payment service goes down. OOM kills. The agent investigates from scratch. 45 minutes to diagnose a connection pool leak.
Same service. Same symptoms. The agent doesn't remember Monday. Same 45 minutes. Same fix.
Different service, same root cause. The agent has no idea this is a pattern. Third investigation from scratch.
With memledger
The same week — with persistent, scored, evolving memory.
The agent resolves the incident and stores the fix as an episodic memory — a specific event with context, outcome, and timestamp.
Same symptoms. The agent searches memory first. Finds Monday's fix with a score breakdown showing it's relevant and proven.
Third success. The episodic memory auto-promotes to a procedural record — a proven runbook. Nobody wrote it. Evidence created it.
What makes memledger different
Framework-Agnostic
Pure Python library. Integrate with LangGraph, LangChain, CrewAI, AutoGen, or raw async Python. Ships LangGraph tools and an MCP server out of the box.
Composable Backends
pgvector, OpenSearch, DynamoDB, SQLite — or compose them. The Composition Router splits storage by access pattern. Switch with one YAML line. Extend with register_backend().
Kubernetes-Native
Helm chart for production K8s deployment. Persistent long-term memory layer for any agentic workflow running on Kubernetes.
Pluggable Strategies
Importance, write gating, conflict resolution, reranking — each is a pluggable strategy. Deterministic for speed. LLM-driven for judgment. Mix per decision. One YAML line.
Lineage and Audit
Supersession chains, derived records, accessor history. Append-only audit log. CLI renders lineage as interactive Mermaid diagrams.
Cognitive Memory Types
Semantic (facts), episodic (events), procedural (how-to). Lifecycle states. Scoring blends similarity with success rate, recency, and importance.
Architecture
Intelligence lives in the core. Storage is pluggable underneath.
Lifecycle states
Memories evolve. Old knowledge is deprecated, not deleted.
Scoring and reranking
Retrieval ranked by relevance AND reliability. Two memories can match a query equally, but one has failed three times and the other is a proven fix.
Auto-promotion
Incidents become runbooks — automatically. A fix that works once is an anecdote. A fix that works three times is a procedure.
Conflict detection
Contradictions are caught and surfaced. When a new memory conflicts with an existing one, memledger warns — but does not block.
Lineage and provenance
Every piece of knowledge is traceable. Supersession chains, derived records, accessor history, confidence scores.
Audit trail
Every operation recorded. Append-only log of adds, searches, outcomes, promotions, conflicts, and lifecycle changes.
Pluggable strategies
Deterministic by default. LLM-driven when you need it. One YAML change per decision.
| Decision | Default | LLM opt-in |
|---|---|---|
| Importance | Fixed 0.5 | LLM rates 1-10 |
| Write policy | Always store | LLM gates |
| Conflict resolution | Fire hook | LLM resolves |
| Reranking | Policy blend | LLM reranks |