
Agent Memory
io.github.theprodsdePublished by GitHub account theprodsdev0.1.5Updated Oct 24, 2026
Persistent agent memory with a decision layer: replay, restore, verify, or none — explainable.
The publisher's own server: Memory.fit
Overview
A local persistent memory store for AI agents that returns an explicit replay, restore, verify or none decision for each query.
- What you can do
- Resolve a query against stored memories and get an explicit action (replay, restore, verify or none) with a confidence score and reasoning, plus a formatted context block for restore decisions. Store query/response pairs with tags, type, scope, confidence and TTL. List stored memories with pagination, scope and archive filters, and fetch a single entry by ID. Archive entries so they are excluded from retrieval, permanently delete entries, and merge near-duplicate memories into summary entries.
- When to use it
- Useful when an agent answers the same or similar questions across sessions and you want control over whether a stored answer is replayed verbatim, injected as context, verified first, or skipped. Also fits fact-sensitive answers that can go stale, shared knowledge across agents, and audit trails of which memory answered and why. Not intended for document RAG over file corpora or as an application's source-of-truth database.
- Requirements
- Runs as a local stdio process, launched with uvx from the agent-memory-sdk PyPI package, so Python and uv are needed. Storage is a local SQLite store by default; the directory is set by AGENT_MEMORY_DIR (default ~/.agent_memory) and the collection by AGENT_MEMORY_COLLECTION. No API keys are required; optional Redis or PostgreSQL backends need those services.
Installation
In SourceWeft
- Open Agent Memory in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Agent Memory
[CI] [Python 3.10+] [License: Apache-2.0] [PyPI version] [MCP Registry]
Persistent semantic memory for AI agents with intelligent decision-making.
🚀 Created by: TheProdSDE
The problem
Most AI memory systems retrieve and inject past context into every prompt. This leads to wasted tokens, inconsistent responses, and agents that blindly replay stale or wrong answers.
Agent Memory adds a decision layer:
Every resolve() returns an explicit action with a scored, explainable rationale —
not just a retrieved chunk.
Adversarial eval: 34/36 (94%) on trap queries — the 2 misses return VERIFY (cautious), never a wrong REPLAY — see benchmarks.
Context rot — what this solves (and what it can't)
Context rot is the measured degradation of LLM accuracy as the context window fills — long before the token limit. Stale chunks, irrelevant retrievals, and unbounded conversation history don't just waste tokens; they actively degrade answers ("lost in the middle", instruction drift, distractor sensitivity).
Context rot has two causes. Agent Memory addresses the first; nothing outside the model itself can address the second.
1. What goes into the context — controllable, and this SDK's job:
2. How the model attends over tokens already in its context — not controllable from outside. Attention degradation over long context is a property of the model. No memory layer changes that. What Agent Memory does is keep the context small and relevant enough that the model rarely enters the degraded regime in the first place.
The honest claim: Agent Memory prevents context pollution — the dominant
controllable cause of context rot in agentic systems. It doesn't change model attention
behavior, and it only helps if your agent routes context through resolve() /
PagedMemory instead of concatenating history by hand.
How it compares
Today you need three tools wired together to get what resolve() does in one call:
a semantic cache (GPTCache) for replay, a memory layer (Mem0 / Zep) for context, and
custom staleness logic for verification. No existing tool decides — at read time —
whether and how a memory should be used.
Cells about other projects are capability checks against their own source or
docs (mem0 checked on 2026-09-27), not measured behaviour; ❔ means we have not
tested it rather than that it is absent. Corrections welcome — see
docs/comparison.md for sourcing and the
benchmark RFC for the review process.
Because hosted or model-backed configurations can add an LLM or embedding API round-trip per memory operation, their latency includes provider, model, and network costs. Exact latency depends on each project's configuration; this repository does not publish a universal 100ms–2s floor. Agent Memory resolves in-process in SQLite-only mode; measured latency depends on corpus shape and cache state (see performance and stress-testing details).
On retrieval, we publish a cleaned-release retrieval-proxy measurement below. On end-to-end accuracy (LLM answering + judge, where Mem0 and Zep publish), we don't quote numbers we haven't measured yet — that stage is next on the roadmap. → Full feature matrix and trade-offs (including where they're better): docs/comparison.md
Benchmarked on LongMemEval (ICLR 2025)
LongMemEval is a benchmark for conversational-history retrieval. These results measure Agent Memory's RESTORE/retrieval tier, not REPLAY, VERIFY, TTL, or end-to-end answer correctness. Each question runs against a separate SQLite store containing that question's haystack; aggregate ingestion totals are not the size of one queried store. All ingestion uses zero LLM calls and $0 in API charges:
-
LongMemEval_S (500 independent ~48-session haystacks; 124K turn-pair entries across all runs): 98.1% session Recall@5 with local ONNX embeddings, 96.0% lexical-only, 10.04ms lexical / 19.56ms semantic p50 retrieval. The report includes p90/p95/p99 and run-resource measurements.
-
LongMemEval_M (500 independent ~500-session haystacks; ~2,500 turn-pair entries per queried store): 87.0% session Recall@5 with lexical retrieval, 12.05ms p50. This uses the official cleaned re-release and turn-pair indexing; it is not directly comparable with the paper's original-release session-index baselines.
[LongMemEval_S retrieval by question type]
[LongMemEval_M result and published baseline context]
Full methodology, per-type tables, scope notes (what this benchmark does and
doesn't test), and negative results are in the
benchmark report. Reproduce the semantic
_S result with uv run python benchmarks/longmemeval/run_retrieval.py --semantic.
Real software, not a prototype
Every claim below is reproducible from this repo:
- 34/36 (94%) on adversarial decision-quality eval, and the 2 misses fail safe (VERIFY, never wrong REPLAY) —
agent-memory eval(methodology) - LongMemEval retrieval proxy: 98.1% Recall@5 (_S, semantic) · 87.0% (_M, lexical) — 500 independent haystacks; not an end-to-end or paper-baseline head-to-head, full report
- Reproducible stress harness for synthetically seeded workloads up to 1,000,000 entries; archive the JSON output before publishing a performance claim (methodology)
- Stress-test benchmark charts: latency percentiles, seed throughput, resource use, action mix, and cache/decision rates for lexical FTS5 runs at 10K, 100K, and 1M entries, with workload and archived result JSON documented in stress-testing
- 412 collected tests across 25 test modules — decision quality, concurrency, all 4 backends, MCP server, adapters — run in CI on every push
- Published on PyPI and the official MCP Registry
- Ships with a REST API, Streamlit dashboard, CLI, LangChain/LlamaIndex adapters, and async counterparts for memory read/write and decision operations
When to use it — real use cases
Where Agent Memory saves real money
A GPT-4o call costs ~$0.005. A support agent handling 50,000 queries/day with 70% repeat rate:
- Without memory: 50,000 × $0.005 = $250/day
- With Agent Memory: 15,000 LLM calls + cache misses = $75/day
- Saving: ~ $175/day (~$64k/year)
- Savings depend on your repeat rate and how similar incoming queries are to previously stored ones — measure in your own pipeline.
REPLAY avoids an LLM call when policy permits it. The latency and cost difference depends on the local workload, provider, model, and network; measure both paths in your own pipeline.
Is it right for your use case?
Good fit:
- Agent answers the same or similar questions across sessions
- You have fact-sensitive answers that can go stale (prices, limits, policies)
- Multiple agents or services share a knowledge base
- You need audit trails — knowing which memory answered and why
Not the right tool:
- Document RAG over a corpus of files → use a vector database for that
- Replacing your application's source-of-truth database
- Agents that never repeat similar queries
Features at a glance
→ Full feature reference: docs/features.md
Performance
Latency, CPU, and memory use depend on the corpus, query distribution, cache state, embedding mode, machine, and operating system. The bundled harness uses a repeatable synthetic workload; it does not establish a production SLA.
The current lexical FTS5 benchmark results and charts are archived with their source JSON in the stress-test methodology. See that document for commands, workload scope, and guidance on interpreting results.
When to use it
Use Agent Memory when:
- You want an agent to remember past interactions without injecting all of them into every prompt
- You need explicit control over when memory is used (replay exact answers vs inject as context vs verify first)
- You have different memory trust levels (user preferences vs potentially-stale facts vs tool outputs)
- Multiple processes, services, or agents share the same memory store
- You need audit trails — every replay is traceable to a specific stored entry with a score breakdown
Don't use it for:
- Document RAG (search over a corpus of files) — use a vector database for that; Agent Memory stores query→answer experiences
- A replacement for your database — it stores transient agent knowledge, not your application's source-of-truth data
Quick Start
→ Full integration pattern and API reference: docs/usage.md
Local Setup
Option 1 — SQLite (zero dependencies, recommended to start)
Option 2 — Redis or Postgres backend
Option 3 — Streamlit dashboard (visual exploration)
Option 4 — Development / from source
Dashboard
An interactive Streamlit dashboard for exploring memories, testing the resolve sandbox, and monitoring stats.
[Agent Memory dashboard slideshow: stats, memory table, replay/verify/none resolve results]
MCP Server
Agent Memory is published on the MCP Registry — install it in any MCP-compatible client with zero manual setup.
Add to your MCP client
Cursor — add to .cursor/mcp.json in your project, or ~/.cursor/mcp.json globally:
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Claude Code — add to .claude/settings.json in your project:
uvx installs the package on first run — no pip install needed.
Custom storage location
Tools exposed
→ Full MCP setup guide and Docker config: docs/mcp.md
Integrations
agent-memory-sdk is the core — every integration delegates to Memory.
→ Setup instructions and code snippets for each: examples/README.md
Tech Stack
No API keys required — everything runs locally.
Documentation
Status & Roadmap
All planned features through v0.5.0 are shipped. Track what's next on the GitHub Project →
Release
Tag-triggered, fully CI-gated: git tag v0.x.y && git push origin v0.x.y
Contributing
See CONTRIBUTING.md for dev setup, test commands, and the PR checklist.
Citation
If you use Agent Memory SDK or its benchmark suite in your research, articles, or projects, please cite this repository using GitHub's Cite this repository button.
For reproducible benchmark comparisons, reference the exact SDK version, benchmark dataset version, configuration, and Git commit.
License
Apache-2.0 — see LICENSE.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
Agent Memory helps agents decide: Replay → Restore → Verify → Ignore
Built with ❤️ by TheProdSDE
mcp-name: io.github.theprodsde/agent-memory
Source: README.md at commit 62bab6e
Tools
0Version history
1- v0.1.5LatestSep 23, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.
Other Memory integrations

Memory.fit
fit.memoryOfficial publisher
Hosted Memory.fit server that lets an AI read your training, sleep, recovery and nutrition data and write back weekly plans, targets and meal plans.
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pgOfficial publisher
pg.ddx.io: the PostgreSQL community's memory's hosted MCP server, published by pg.ddx.io; no sign-in required; Streamable HTTP; 29 tools.
var.gg Naming Memory
gg.varOfficial publisher
Remote MCP server that suggests and searches code identifier names from domain concepts in Korean, Japanese, Chinese, Vietnamese and English, and exposes ERD…

Counterparts
ai.counterparts
Local-first long-term memory for Claude Code and Claude Desktop: the assistant writes notes about you and your projects and recalls them in later sessions.

LAHZE - Persian AI Memory Platform
Published by GitHub account pedramgholizadeh
LAHZE - Persian AI Memory Platform's hosted MCP server; no sign-in required; Streamable HTTP; 13 tools.