AgentMemory External-Backend Fork
Persistent memory for coding agents, built on the iii engine. It captures agent activity, stores durable observations and decisions, and returns relevant context through MCP, REST, hooks, and the local viewer.
This repository is a maintained fork of rohitg00/agentmemory, currently based on upstream v0.9.29. It keeps the upstream agent integrations and memory model, but deliberately changes the storage and deployment model for persistent multi-service operation.
What It Does
- Captures prompts, tool use, file work, session milestones, and explicit memory saves.
- Plans task-aware retrieval across lexical, vector, graph, temporal, experiment, artifact, evidence, and negative-memory sources.
- Serves 74 MCP tools. Its full MCP surface is 74 tools, 6 resources, 3 prompts, and 17 skills.
- Exposes 156 endpoints on port
3111, with the viewer on 127.0.0.1:3113.
- Supports Claude Code, Codex, OpenCode, Cursor, Copilot CLI, pi, Devin, Droid, Antigravity, and MCP-capable clients.
- Keeps session history, lessons, relations, audit records, graph data, exports, and backups separate from the agent's working repository.
Latest Benchmark And Verification
The following results were measured against the live deployment after commit
18f8520, the controlled Tantivy/Qdrant rebuild, and the PM2 reload on
2026-08-20.
| Check | Result |
|---|
First post-reload smart-search request for React | 1,604.8 ms cache miss |
20 subsequent smart-search requests, limit 5, lessons disabled | p50 60.7 ms, p95 211.6 ms, mean 73.9 ms, 20/20 successful |
Project-scoped live search for agentmemory | 10/10 results belonged to agentmemory; impossible project returned 0 |
| Controlled index rebuild | 19,775 Tantivy entries and 19,775 Qdrant vectors |
| Build | npm run build passed |
Full npm test status | 172 files passed, 1 skipped; 1,836 tests passed, 1 skipped |
| Filesystem watcher suite | 16 tests passed; event assertions use condition-based polling |
The full verification used:
TMPDIR="/home/meow/.cache/agentmemory-test-tmp" \
PATH="/home/meow/.local/bin:/home/meow/.nvm/versions/node/v26.3.0/bin:$PATH" \
npm test
The pre-rebuild baseline and provider-latency breakdown are documented in the
detailed benchmark notes below.
Planned Retrieval And Evidence
Use memory_retrieval_plan or POST /agentmemory/retrieval/plan when context needs more than a keyword search. The deterministic planner identifies intent, named entities, temporal constraints, evidence needs, and excluded terms; then combines the available lexical/vector/graph/memory paths with first-class experiments, artifacts, typed evidence, temporal memory, and reusable negative knowledge.
- Every plan accepts
project and agentId scope and reports source coverage, temporal filtering, conflict warnings, negative-memory warnings, and a token ledger.
- Returned context is partitioned into direct, supporting, historical, and provenance tiers. Omitted records get opaque, short-lived expansion handles from
memory_retrieval_expand or /agentmemory/retrieval/expand.
- Evidence records retain provenance, precise locator, linked artifacts/experiments, and verification method, verifier, result, and timestamp. Use
memory_evidence_verify to persist verification rather than relying on an untracked assertion.
- Experiments connect objective, hypothesis, environment, revision, toolchain, commands, inputs, actions, sessions, artifacts, observations, evidence, result, conclusion, and follow-up links.
- Negative-memory records prevent blind retries of tested-invalid approaches and can be scoped by project, agent, environment, source revision, and validity interval.
- Contradictions are durable conflict records. Resolve them explicitly with evidence and epistemic states; the system retains the conflicting evidence and historical records instead of silently deleting one side.
Durable write idempotency is available for structured evidence, artifact, experiment, and negative-memory creates via idempotencyKey, requestId, or fingerprint. It requires this fork's mandatory PostgreSQL metadata backend; unsupported backends fail rather than emulating an unsafe read-then-write claim.
Fork Versus Upstream
The upstream project is the source of the feature set and integration model. This fork is intended for users who want those capabilities backed by explicit production-style services rather than a local-only storage path.