Vector databases return stale facts alongside current ones, and LLM memory wrappers hallucinate on every write. Memoreal is a deterministic long-term memory engine for AI agents — same input, identical state, exact recall in 14 ms with zero LLM tokens. Start free with 1,000 memories & API calls.
npx -y @kolivri/memoreal-mcp setup
Connects Claude Code, Cursor, Windsurf & 15 IDEs
Stateful, temporal, and counting queries are solved deterministically in 12–17 ms with zero LLM calls.
Typed Supersedes, Causal, and DependsOn edges ensure updated facts deterministically suppress outdated state.
One key connects Claude Code, Cursor, Windsurf, OpenCode, or your production agent to a shared, isolated namespace.
Deterministic memory for engineers and teams who cannot afford stale RAG facts, hallucinated writes, or 1,000 ms memory lag.
Cut session token burn by 70%+ across Claude Code, Cursor, Windsurf, OpenCode, and all 15 supported clients. Core architecture and security rules stay intact across context compaction and git branch switches, covering 1-seat solo workflows ($0 Free / $19 Developer) and shared memory across up to 20 team seats.
Execute synchronous writes in <15 ms* with zero LLM extraction cost. Coordinate 5 specialist agent wings (architect, reviewer, qa, security, ops) with 500/500 (100.0%) LongMemEval state fidelity across long-running multi-agent workflows.
Top-tier support starts by remembering what the caller asked last time. Before the first ring finishes (12.9 ms* avg, not including network latency), your voice or chat agent already recalls the customer's last request, open ticket, promised callback, and updated preferences across 15 languages — turning repeat callers into VIPs with zero “please repeat your issue” friction and zero 1-second LLM dead air.
Zero model training on customer data. Pre-storage PII redaction and prompt-injection quarantine, strict org_id namespace isolation in europe-west1, and auditable /v1/trace/recent logs built for compliance-critical production stacks.
Deterministic long-term memory with 100.0% (102/102) on Hebrew LongMemEval in 14 ms* at $0 LLM translation fees.
Specs, Slack threads, and code reviews in Hebrew, German, French, Spanish, Japanese, or Chinese stay connected to English code and git commits inside one shared namespace.
Whether a customer called yesterday in Hebrew, followed up on WhatsApp in Arabic or Spanish, or opened a ticket in English, your support agent recalls their exact last request and open promise in 12.9–14 ms* — zero paid translation loops and zero dead air on live calls.
Pre-storage PII scrubbing and adversarial prompt-injection quarantine protect global customer and developer conversations before storage.
* Not including network latency.
When an AI agent manages production code, customer accounts, or financial state, "top-k cosine similarity" is not memory — it is a coin flip. Memoreal replaces probabilistic vector guesswork and LLM write-wrappers with a deterministic memory engine.
PostgreSQL 14.2 and PostgreSQL 16.1 because both match the query vector — leaving the agent to guess which is current.
Supersedes links and deterministically suppresses outdated facts — returning only 16.1.
+4 worker nodes, scale +2, drain -3, and vector rerankers grab 512 from a nearby RAM check instead of 3.
GET /v1/trace/recent) showing why each memory was selected.
Benchmark charts are nice; not shipping broken PRs is better. Click through 5 everyday engineering workflows where vector databases, rerankers, and LLM memory wrappers hallucinate — and see how Memoreal nails the exact answer in 12.9 ms for $0.
Top-1 Match (0.91 cosine): "Evaluated Kafka for billing webhooks..." Agent action: Scaffolds 400 lines of dead Kafka consumer boilerplate.
Cosine similarity and cross-encoder rerankers are blind to negation. They match "Kafka" + "billing webhooks", rank the canceled POC #1, and send Claude Code or Cursor down the wrong architecture for an hour.
Active State: PostgreSQL LISTEN/NOTIFY (Kafka POC marked rejected). Agent action: Wires retry handler directly into existing Postgres listener.
Negation-aware state tracking and Supersedes belief revision know the difference between "we run Kafka" and "we killed Kafka." Rejected RFCs stay buried — in 12.9 ms with 0 LLM tokens.
Retrieved context: DynamoDB us-east-1 + 4 unrelated vendor specs. Raising top_k (5 → 20): Dumps 4x more third-party noise into the prompt.
Detailed vendor docs pack denser technical keywords and outrank your own architecture notes. Worse, widening top_k from 5 to 20 drags in even more external threads — multiplying false attribution instead of fixing it.
First-Party Core API DB: PostgreSQL 16 (europe-west1). External vendor context (Stripe/DynamoDB) isolated from system ownership.
First-party ownership resolution, provenance trust chains, and strict namespace isolation separate your production stack from external vendor docs automatically — zero prompt bloat, zero wrong-database PRs.
LLM write summary ($): "Project auth uses passkeys." Agent action: Breaks working session middleware chasing nonexistent passkey routes.
LLM write-wrappers charge you for 1–2 external LLM calls on every turn just so a summarizer prompt can strip away "maybe in Q4" and overwrite verified production state with an unstarted brainstorm.
Core Fact: Express session auth (active). Quarantined Idea (Episodic): Q4 passkeys brainstorm — unconfirmed, never promoted.
Speculative-statement guardrails and 4-Tier memory promotion (Buffer → Episodic → Semantic → Core) keep unconfirmed ideas from overwriting verified production facts — in <15 ms at $0 write cost.
Core block full (2,000 chars) → LLM rewrites summary. Evicted: org_id tenant isolation rule. Kept: yesterday's button border radius.
Agents that iteratively rewrite a fixed-size scratchpad (Letta core blocks or auto-summarized MEMORY.md files) compress away early architectural invariants to make room for recent UI chatter.
<memory_context> (SessionStart & PreCompact · 12.9 ms): [Core 0.95] Never run git rebase; always scope tenant queries by org_id.
Core and high-salience Semantic rules persist permanently without summary-rewrite drift, injecting a deterministic 4,096-token <memory_context> on every SessionStart and PreCompact.
Retrieved chunks: "...worker health check port 8080 (512 MB RAM)..." (missing +4 deploy). Agent answer: Hallucinates 512 or guesses 2 from partial chunks.
Rerankers boost unrelated log lines ("512", "8080") because they sit next to server keywords, while top-k truncation drops your initial +4 provisioning event — guaranteeing a wrong count.
State transitions: +4 provisioned → +2 scaled → -3 drained = 3 active worker nodes. Unrelated port 8080 & 512 MB metrics filtered automatically.
Deterministic stateful math and category hierarchies track every +4, +2, and -3 delta across sessions while ignoring unrelated port and memory metrics — verified 500/500 (100.0%) on LongMemEval.
Once installed, Memoreal works automatically in the background of every coding session — and gives you slash commands, 30 MCP tools, and a REST API whenever you want explicit control.
Before your first prompt, Memoreal reads your working directory, git branch, and last 3 commits, queries POST /v1/memories/context, and injects your prior decisions and active tasks.
Say "No, don't do X, use Y instead" or save a design-log/*.md plan — Memoreal automatically encodes a high-salience rule (0.9) with a Supersedes edge so mistakes never repeat.
Your agent calls recall_memories, search_code, explain_code, find_references, impact, and navigate directly over MCP instead of grepping blind.
When your IDE compacts a full context window, Memoreal snapshots your working state beforehand and restores it right after — then consolidates your session summary when you quit.
SessionStart hook / build_context MCP tool from https://memoreal.kolivri.com/v1/memories/context:
<memory_context> ## Established Facts - Architecture (src/server.js): Express portal + /v1/* Cloud MCP & REST router backed by GCE europe-west1 encrypted MariaDB and PostgreSQL. [confidence: 0.94] - Rule (correction): Never use git rebase in this repo; always merge and run npm test before pushing. [confidence: 0.91] ## Recent Context - Completed PayPal v2 checkout integration and 1,000-call free quota enforcement (402 QUOTA_EXCEEDED). [confidence: 0.88] </memory_context>
Click any tab below to see the exact slash commands, MCP tools, natural-language prompts, and HTTP API calls you can use right away.
| Slash Command | When to Run It | What It Does |
|---|---|---|
/memoreal-doctor |
Right after installing or anytime to check status | Verifies your ~/.memoreal/config.env API key, tests /v1/health & MCP connectivity, shows your namespace memory count & 30-day quota usage, and runs a live recall check. |
/memoreal-sync-code |
Once per repo (or after major refactors) | Indexes your repository's functions, classes, types, call graph, and directory containment hierarchy into Memoreal Cloud so search_code, explain_code, find_references, and navigate work in milliseconds. |
/memoreal-wrap-up |
At the end of a coding session or feature | Summarizes what was accomplished, architectural decisions made, root causes fixed, and open next steps — encodes them with high salience and runs consolidate to merge duplicates. |
/memoreal-sync |
When importing existing plans or design logs | Scans .claude/plans/, .opencode/plans/, and design-log/ markdown files and syncs them into your organization's cloud namespace. |
build_context — Token-budgeted structured context for any topicencode_memory / batch_encode — Store episodic, semantic, or core memoriesrecall_memories — Scored graph + BM25 retrieval with salience filterconsolidate — Merge near-duplicates & reinforce edgesfeedback — Reward useful memories (+salience) or dampen noiseforget_memory / delete_by_context — Surgical memory deletionhealth & stats — Engine status, tier breakdown & quota usagesearch_code & find_file — Locate functions, types, and files without grepexplain_code — Symbol definition, callers, callees & test coveragefind_references & impact — Full blast radius before changing a signaturecall_tree & implementors — Upstream/downstream call graph & trait implsdiff_risk, dead_code & test_gaps — Pre-merge quality & risk analysisexplain_diff & explain_error — Diagnose stack traces using repo historynavigate & get_hierarchy — Walk the repo containment tree (ZoomIn/Out/Peek)"Recall our context from Memoreal on this project — what was the last bug we fixed and what is left in the design log?"
"Encode a semantic rule in Memoreal with salience 0.95: never mock encrypted MariaDB in integration tests; always run against the test schema."
"Use Memoreal explain_code and find_references on verifyToken before we change its return shape."
"Run /memoreal-wrap-up so all decisions and remaining tasks from today's session are consolidated in Memoreal."
# Python / TypeScript / cURL — Direct HTTP Cloud API (https://memoreal.kolivri.com)
# 1. Encode a memory or permanent team rule (POST /v1/memories)
curl -fsSL -X POST https://memoreal.kolivri.com/v1/memories \
-H "Authorization: Bearer $MEMOREAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"namespace": "my-saas-backend",
"type": "semantic",
"salience": 0.9,
"content": "Billing webhooks must verify PayPal signatures via verifyWebhookSignature before upgrading org plans.",
"context": [["file", "src/paypal.js"], ["category", "security"]]
}'
# 2. Build token-budgeted context for an agent prompt (POST /v1/memories/context)
curl -fsSL -X POST https://memoreal.kolivri.com/v1/memories/context \
-H "Authorization: Bearer $MEMOREAL_KEY" \
-H "Content-Type: application/json" \
-d '{"namespace": "my-saas-backend", "query": "billing webhook security rules", "token_budget": 4096}'
Deterministic state tracking and multi-session reasoning achieve 100% on LongMemEval with zero paid LLM API calls during encode or recall.
Multi-session recall across temporal updates, fact superseding, counting, and cross-session synthesis.
Standardized multi-session recall, multilingual reasoning, and code intelligence benchmarks.
| Benchmark | Memoreal | Baseline | Latency / Cost |
|---|---|---|---|
| LongMemEval (500 q) | 100.0% (500/500) | 89.8% BM25 · 89.2% Cosine · 93.4% Mem0 | 0.14s/q · $0 |
| Hebrew LongMemEval (102 q) | 100.0% (102/102) | 15-language multilingual reasoning suite | 14 ms · $0 |
| IntelBench (103 q) | 100.0% recall | MRR 0.63 · 9 reasoning categories | 12.9 ms avg |
| Synthetic Stress (5 suites) | 100.0% (5/5) | 20.0% (1/5) Cosine+ML | <15 ms · $0 |
| TanakhBench (21,438 docs) | 68.8% (11/16) | 56.2% (9/16) BM25 | Cross-ref recall |
Why engineering teams replace LLM-wrapper memory services and vector databases with Memoreal's deterministic memory engine.
| Capability | Memoreal | Hindsight | Mem0 | Zep / Graphiti | Cognee | Letta (MemGPT) |
|---|---|---|---|---|---|---|
| LongMemEval Accuracy | 100.0% (500 / 500) | 94.6% (LongMemEval-S) | 93.4% (claimed) | 90.2% (451 / 500) | Not published | 74.0% (LOCOMO) |
| Multilingual / Hebrew LongMemEval | 100.0% (102 / 102 · 15 langs) | English-centric | LLM prompt dependent | English-centric | LLM prompt dependent | LLM prompt dependent |
| LLM Tokens Spent per Write | 0 tokens ($0) | LLM extraction / reflect() | 1–2 LLM calls / write | Async LLM extraction | Python ECL LLM pipeline | Agent tool-call tokens |
| Recall Latency | 12.9 ms | 50–350 ms (Postgres) | 400–1,800 ms | 104 ms p50 / 162 ms p95 | 250–1,400 ms | 500–2,500 ms |
| Deterministic Belief Revision | Automatic Supersedes revision | Entity consolidation | Probabilistic LLM prompt | Temporal window (t_invalid) | Graph re-indexing | Agent file overwrite |
| Code Graph & MCP Tools | 30 MCP tools + 3 resources | Memory bank tools | 11 text memory tools | Graph search tools | 14 MCP tools (codify) | Agent harness only |
One installer automatically configures Claude Code, Cursor, Windsurf, OpenCode, Claude Desktop, OpenAI Codex CLI, Gemini CLI, VS Code Copilot, Zed, Cline, Roo Code, Kilo Code, Continue.dev, Goose, and Amp.
Includes 8 automatic lifecycle hooks (SessionStart, PreCompact, PostCompact, UserPromptSubmit, PostToolUse, Stop), 4 slash commands (/memoreal-sync, /memoreal-sync-code, /memoreal-wrap-up, /memoreal-doctor), 30 MCP tools, and 3 MCP resources (@memory://rules).
npx -y @kolivri/memoreal-mcp setup
curl -fsSL https://memoreal.kolivri.com/downloads/install.sh | MEMOREAL_KEY=mem_dev_your_key_here bash
@kolivri/memoreal-mcp · stdio MCP bridge for Claude Code, Cursor, OpenCode & Claude Desktop)
claude mcp add memoreal -e MEMOREAL_API_KEY="mem_dev_your_key_here" -e MEMOREAL_API_URL="https://memoreal.kolivri.com" -- npx -y @kolivri/memoreal-mcp
~/.cursor/mcp.json · auto-configured by installer, 1-click button above, or paste JSON)
{
"mcpServers": {
"memoreal": {
"type": "http",
"url": "https://memoreal.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.codeium/windsurf/mcp_config.json · auto-configured by installer or paste JSON)
{
"mcpServers": {
"memoreal": {
"type": "http",
"url": "https://memoreal.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.codex/mcp.json + ~/.codex/AGENTS.md)
curl -fsSL https://memoreal.kolivri.com/downloads/install.sh | MEMOREAL_KEY=mem_dev_your_key_here bash
~/.config/opencode/plugins/memoreal-hooks.js + opencode.json)
curl -fsSL https://memoreal.kolivri.com/downloads/install.sh | MEMOREAL_KEY=mem_dev_your_key_here bash
claude_desktop_config.json · auto-configured by installer)
{
"mcpServers": {
"memoreal": {
"type": "http",
"url": "https://memoreal.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.vscode/mcp.json · auto-configured by installer or 1-click button)
{
"mcpServers": {
"memoreal": {
"type": "http",
"url": "https://memoreal.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.config/zed/settings.json · auto-configured by installer)
{
"context_servers": {
"memoreal": {
"url": "https://memoreal.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.cline/mcp_settings.json), Roo Code (~/.roo/mcp.json) & Kilo Code (~/.kilocode/mcp.json)
{
"mcpServers": {
"memoreal": {
"type": "http",
"url": "https://memoreal.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.gemini/settings.json), Goose (~/.config/goose/mcp.json), Amp & Continue.dev
curl -fsSL https://memoreal.kolivri.com/downloads/install.sh | MEMOREAL_KEY=mem_dev_your_key_here bash
$env:MEMOREAL_KEY="mem_dev_your_key_here"; irm https://memoreal.kolivri.com/downloads/install.ps1 | iex
https://memoreal.kolivri.com/v1/memories/context)
curl -fsSL --proto '=https' --tlsv1.2 -X POST https://memoreal.kolivri.com/v1/memories/context \
-H "Authorization: Bearer mem_dev_your_key_here" \
-H "Content-Type: application/json" \
-d '{"namespace":"my-project","query":"architecture decisions and active tasks","token_budget":4096}'
104d1c52c7e5167255ae66d1732911ff0ff80310fe81f698675a3f5c117ae52f · (.zip): 8684c2e9fb4d20aae46a390fe94518a4abda191a26865d0705765d806658790f
SessionStart and restores working state after context compaction.
Every account includes all 30 MCP tools, the Claude Code / Cursor / Windsurf / OpenCode plugin, and isolated namespaces. Upgrade in one click when you scale.
/memoreal-sync-code)/v1/trace/:id)Every account starts with 1,000 free API calls & memories. Each REST call or MCP tools/call counts as 1 call (batch writes count 1 per memory in the batch), while MCP handshakes (initialize, ping, tools/list) and /v1/health are free (0 calls). At 1,000 calls, requests return 402 Payment Required until you upgrade on /account.
Yes. Running the 1-line installer configures all four IDEs automatically. Because namespaces are derived from your project directory and scoped to your organization, you can switch IDEs mid-task and share the exact same memory graph.
Raw API keys are shown once and stored only as SHA-256 hashes. Every memory is strictly isolated by your organization ID and namespace in GCE (europe-west1) encrypted MariaDB and PostgreSQL. The plugin stores your key in ~/.memoreal/config.env with 0600 permissions, verifies archive SHA-256 checksums before install, and pipes Bearer headers via curl -K - stdin so keys never appear in ps aux.
No. In Claude Code and OpenCode, the 8 lifecycle hooks automatically load context on SessionStart, save state before context compaction (PreCompact), and encode corrections and plan edits. In Cursor, Windsurf, and VS Code, the agent calls the 30 MCP tools automatically.
Create a free account (1,000 API calls & memories included) → copy your key → run the 1-line installer.