Vector databases return stale facts alongside current ones, and LLM memory wrappers hallucinate on every write. Memoria 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.
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.
When an AI agent manages production code, customer accounts, or financial state, "top-k cosine similarity" is not memory — it is a coin flip. Memoria 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.
GET /v1/trace/recent) showing why each memory was selected.
Once installed, Memoria 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, Memoria 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 — Memoria 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, Memoria 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://memoria.kolivri.com/v1/memories/context:
<memory_context> ## Established Facts - Architecture (src/server.js): Express portal + /v1/* Cloud MCP & REST router backed by Cloud SQL. [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 |
|---|---|---|
/memoria-doctor |
Right after installing or anytime to check status | Verifies your ~/.memoria/config.env API key, tests /v1/health & MCP connectivity, shows your namespace memory count & 30-day quota usage, and runs a live recall check. |
/memoria-sync-code |
Once per repo (or after major refactors) | Indexes your repository's functions, classes, types, call graph, and directory containment hierarchy into Memoria Cloud so search_code, explain_code, find_references, and navigate work in milliseconds. |
/memoria-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. |
/memoria-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 Memoria on this project — what was the last bug we fixed and what is left in the design log?"
"Encode a semantic rule in Memoria with salience 0.95: never mock Cloud SQL in integration tests; always run against the test schema."
"Use Memoria explain_code and find_references on verifyToken before we change its return shape."
"Run /memoria-wrap-up so all decisions and remaining tasks from today's session are consolidated in Memoria."
# Python / TypeScript / cURL — Direct HTTP Cloud API (https://memoria.kolivri.com)
# 1. Encode a memory or permanent team rule (POST /v1/memories)
curl -fsSL -X POST https://memoria.kolivri.com/v1/memories \
-H "Authorization: Bearer $MEMORIA_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://memoria.kolivri.com/v1/memories/context \
-H "Authorization: Bearer $MEMORIA_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 | Memoria | 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 Memoria's deterministic memory engine.
| Capability | Memoria | 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 (/memoria-sync, /memoria-sync-code, /memoria-wrap-up, /memoria-doctor), 30 MCP tools, and 3 MCP resources (@memory://rules).
curl -fsSL https://memoria.kolivri.com/downloads/install.sh | MEMORIA_KEY=mem_dev_your_key_here bash
~/.cursor/mcp.json · auto-configured by installer, 1-click button above, or paste JSON)
{
"mcpServers": {
"memoria": {
"type": "http",
"url": "https://memoria.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": {
"memoria": {
"type": "http",
"url": "https://memoria.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.codex/mcp.json + ~/.codex/AGENTS.md)
curl -fsSL https://memoria.kolivri.com/downloads/install.sh | MEMORIA_KEY=mem_dev_your_key_here bash
~/.config/opencode/plugins/memoria-hooks.js + opencode.json)
curl -fsSL https://memoria.kolivri.com/downloads/install.sh | MEMORIA_KEY=mem_dev_your_key_here bash
claude_desktop_config.json · auto-configured by installer)
{
"mcpServers": {
"memoria": {
"type": "http",
"url": "https://memoria.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.vscode/mcp.json · auto-configured by installer or 1-click button)
{
"mcpServers": {
"memoria": {
"type": "http",
"url": "https://memoria.kolivri.com/v1/mcp",
"headers": { "Authorization": "Bearer mem_dev_your_key_here" }
}
}
}
~/.config/zed/settings.json · auto-configured by installer)
{
"context_servers": {
"memoria": {
"url": "https://memoria.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": {
"memoria": {
"type": "http",
"url": "https://memoria.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://memoria.kolivri.com/downloads/install.sh | MEMORIA_KEY=mem_dev_your_key_here bash
$env:MEMORIA_KEY="mem_dev_your_key_here"; irm https://memoria.kolivri.com/downloads/install.ps1 | iex
https://memoria.kolivri.com/v1/memories/context)
curl -fsSL --proto '=https' --tlsv1.2 -X POST https://memoria.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}'
f4842aad57fe07ecb9e881b48b2b648504f4a462abcbb16eb5e111bd24704229 · (.zip): 20a2f5af3e31a8cf32a41f5056f6f2e9771a7ae98379bdade5d261f1df9132f0
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.
/memoria-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 Cloud SQL. The plugin stores your key in ~/.memoria/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.