A long-term memory layer for AI Agents: project facts and preferences survive every session, conflicts are judged on the spot, recall lands on the exact sentence.
mema bolts three layers onto any Agent — execution, memory, collaboration. Execution makes it work the way you work; memory makes it remember you; collaboration gives every Agent one shared, trusted memory. Plug in once, get stronger every day.
Any MCP client connects with an identity, sharing one library
Memory follows you, not the vendor’s Agent
Conflicts judged on the spot; governance keeps memory clean
How big is the lift: the compounding curve
Ordinary Agent + mema: accumulation carries over — starts above the top and keeps compounding Cold start (empty library): decomposition, retry, and verification discipline from day one Top-tier Agent without memory: climbs back to 95 from zero every session — a flat line in expectation
The amnesia problem · the four-layer stack · the compounding curve · honest limits
mini-clash · self-trained judging core
Write-time conflicts: the self-trained judge decides on the spot
judge consoleSince 0.17.1 · self-trained conflict judge on duty
Amax connections 500 in production
Bmax connections 200 in production
sentence prefilter neighbourhood screen cosine band rule evidence
mDeBERTa · self-trained
conflict P(conflict) 0.93
mechanism · numeric_value
The model sees two raw texts · all local CPU
per-write judging window ×50
previous 10 pairs
now 500 pairs
per-pair latency ≈7×
Qwen 0.68s per pair
mini-clash ≈0.1s
batching ×16
Qwen serial · 1 pair at a time
mini-clash parallel · 16 per batch
Write quality · recall precision
The write gate and sentence-level recall
write gate
remembernew fact being written
deterministic funnelself-trained judge
conflict · human decides similar · duplicate hint clean · stored
one write · three exits · fully auditable
sentence-level recall
›find: how do I configure db connections?
Connection pool notes: Max connections for the production DB is 500, lowered to 200 by the DBA in 2026Q3.Connect timeout is 30s, idle recycling 60s.matched sentence
start_offset → end_offsetread(span) returns it verbatimhits ≥50% → full text
exact source slices · never truncated · never pre-picked
Copy the task into Codex, Claude Code, Cursor, or any Agent with terminal access.
Recommended
Copy the task and paste it into your Agent
It will detect your OS, Python environment, and current MCP client, then choose the transport for your setup: stdio for one Agent or HTTP for multiple Agents. Existing config and databases stay intact, and installation ends with a doctor check.
01Copy the install task
02Paste it into your Agent
03Review the doctor result
Install task for your Agent
Read the latest instructions at https://github.com/billy12151/memory-arbiter-mcp#install-with-your-ai-agent. Install and configure the latest mema release for my operating system and current AI client.
Confirm how many Agents I need to connect and choose the appropriate MCP transport: prefer local stdio for a single Agent and an HTTP MCP server for multiple Agents.
Preserve any existing config and database; do not overwrite or delete existing data. Ask me before choosing between materially different install modes, changing existing config, or performing any destructive or privileged action.
When finished, run mema doctor and report the install method, config path, database path, client integration, and verification result.
The Agent uses the GitHub README as its source of truth and asks before changing existing config, choosing a material install mode, or performing a sensitive action.