Open source, Apache 2.0Beta

Your AI's memory,
engineered from scratch

A Rust database that pre digests knowledge for single pass transformer consumption. Not a wrapper. A ground up storage engine that thinks.

The Problem

AI has a memory problem

Current AI systems consume context in a single pass with no ability to revisit, reflect, or recognize what they are missing.

One Shot Consumption

AI gets a single context window. No re-reading, no follow ups. Every token must count.

Zero Self Awareness

AI can't sense what it doesn't know. It can't feel uncertainty or detect its own knowledge gaps.

Flat Context, Associative Thinking

AI reads linearly but attends associatively. Raw text dumps waste compute on noise.

Why MenteDB

Your agent.md has limits

Static instruction files work for small projects. But as context grows, decisions accumulate, and you work across devices, you need something that actively manages knowledge for you.

Without MenteDB

  • You manually update agent.md every time something changes
  • Finding past decisions means grep-ing through a flat file
  • Contradictions go unnoticed until something breaks
  • Past mistakes are forgotten and repeated
  • Context lives on one machine only
  • File grows until it blows the context window

With MenteDB

  • AI extracts facts, preferences, and decisions automatically
  • Semantic search finds relevant memories across sessions
  • Contradictions are flagged the moment they appear
  • Pain warnings surface before you repeat a mistake
  • Cloud sync keeps every device on the same page
  • Thousands of memories, only the relevant ones retrieved

Automatic extraction

Your AI reads every conversation and decides what is worth remembering. Facts, preferences, decisions, and corrections are stored without you lifting a finger.

Semantic search across sessions

"What did we decide about auth?" works via embeddings, not string matching. MenteDB finds relevant memories even when you use different words.

Contradiction detection

If you said Postgres last month and MySQL this month, MenteDB flags the inconsistency. A static file cannot detect when your decisions change.

Pain warnings

Past mistakes surface automatically when you are about to repeat them. Anti-patterns you recorded are matched against your current context.

Cross-device sync

Your laptop and desktop share the same brain. Cloud mode means every device sees every memory instantly.

Scales beyond context windows

An agent.md works until it is too big for the context window. MenteDB stores thousands of memories and retrieves only the relevant ones via vector search.

Features

A cognitive engine, not just storage

Fifteen core systems that transform MenteDB from a database into an active participant in your AI's reasoning.

Sleeptime Enrichment

Background pipeline extracts semantic facts, links entities, detects communities, and builds user profiles from raw conversations. Like the brain consolidating memories during sleep.

Stream Processing

Continuous memory ingestion with real time belief updates as conversations unfold.

Write Inference

Automatically derives new knowledge from stored memories at write time, not query time.

Trajectory Tracking

Maps conversation paths through topic space to predict where dialogue is heading.

Phantom Memories

Detects knowledge gaps and creates placeholder memories so the AI knows what it does not know.

Interference Shielding

Prevents contradictory memories from polluting context by isolating conflicting beliefs.

Pain Signals

Records negative feedback and emotional triggers to prevent the AI from repeating mistakes.

Speculative Pre Assembly

Predicts upcoming queries and pre builds context windows, like branch prediction for knowledge.

Bi-Temporal Validity

Memories carry valid_from/valid_until timestamps. Temporal invalidation instead of deletion, with point-in-time queries.

LLM Cognitive Inference

LLM judges whether new memories invalidate, update, or are compatible with existing ones. 100% accuracy on 62 test cases.

Hybrid Search

BM25 + HNSW vector + RRF fusion for best-of-both-worlds retrieval. Keyword precision meets semantic understanding.

ChatGPT & Cursor Ready

Connect via Streamable HTTP MCP in seconds. Give ChatGPT, Cursor, or Copilot persistent memory with one URL.

Native SDKs

Rust, Python, and TypeScript bindings with native performance. pip install, npm install, or cargo add and start building.

API Key Management

Create, revoke, and monitor API keys from the dashboard. Scoped access control for teams and production deployments.

Webhooks & Delivery Logs

Get real-time notifications when memories change. HMAC-signed payloads with delivery logs, status tracking, and automatic retries.

Before & After

The difference memory makes

Same user. Same question. Completely different experience.

Without Memory

Deploy to production

Running deploy script...

✗ Deploy failed — wrong AWS region

I told you LAST WEEK it's us-west-2!

Sorry, I don't have context from previous sessions.

🤦 This is the THIRD time...

With MenteDB
[MenteDB context loaded]

Deploy to production

⚠️ Pain signal: "Wrong AWS region caused deploy failure"
📋 Stored: Deploy target is us-west-2, account 4821

Deploying to us-west-2 (your production account)...

✓ Deploy successful

Code

Simple by design

One call per conversation turn. MenteDB handles extraction, storage, retrieval, contradiction detection, and background enrichment automatically.

use mentedb::MenteDb;
use mentedb::process_turn::{ProcessTurnInput, DeltaTracker};
 
let db = MenteDb::open("./agent-memory")?;
let mut delta = DeltaTracker::default();
 
let result = db.process_turn(&ProcessTurnInput {
user_message: "I switched from Postgres to SQLite".into(),
assistant_response: Some("Got it!".into()),
turn_id: 0,
project_context: None,
agent_id: None,
}, &mut delta)?;
 
// result.context — memories ready for your prompt
// result.facts_extracted — what was learned
// result.contradiction_count — conflicts detected
 
// Sleeptime enrichment runs automatically in the background:
// → semantic facts extracted from conversations
// → entities linked and deduplicated
// → community summaries generated
// → user profile built and updated

Architecture

Six layers, one engine

A purpose built stack where every layer is designed for AI memory, from storage pages to cognitive processing.

API
MQLRESTWebSocket
Cognitive
StreamSpeculativePainPhantom
Intelligence
Belief PropagationWrite Inference
Index
HNSWBitmapsTemporal
Graph
CSR/CSCTraversal
Storage
Buffer PoolWALPages
MCP Integration

32 tools. One server. Zero config.

MenteDB ships a production MCP server with 32 tools across 6 categories. Connect Claude, Cursor, ChatGPT, or any MCP client in seconds — locally via stdio or remotely via Streamable HTTP.

Cloud endpoint: https://api.mentedb.com/mcp

Tool Categories

Memory
7 tools
process_turnstoresearchrecallgetforgetforget_all

process_turn also triggers sleeptime enrichment when an LLM provider is configured

Search
3 tools
search_textsearch_vectorsearch_by_tag
Graph
6 tools
relateget_relatedfind_pathget_subgraphfind_contradictionspropagate_belief
Consolidation
6 tools
consolidateapply_decaycompressevaluate_archivalextract_factsgdpr_forget
Cognitive
10 tools
record_paindetect_phantomsresolve_phantomrecord_trajectorypredict_topicsdetect_interferencecheck_streamwrite_inferenceregister_entityget_cognitive_state

Install & Setup

$ npx mentedb-mcp@latest setup copilot
  # also: claude, cursor, vscode

Login (enables cloud sync)

$ npx mentedb-mcp@latest login

Local mode: Works with any MCP-compatible client via stdio: Claude Desktop, Cursor, Copilot CLI, VS Code, Windsurf, custom agents.

Cloud mode: Connect via Streamable HTTP MCP at https://api.mentedb.com/mcp — works with ChatGPT, remote clients, and any environment that supports HTTP MCP.

Learn more about all 32 tools →

Pricing

Simple, transparent pricing

Start free. Upgrade when you need more.

Free

$0forever

Get started with persistent memory for your AI agents.

  • 100 memories
  • 200 turns per month
  • 1 project
  • Cloud sync across devices
  • All MCP tools
  • Semantic search
  • Contradiction detection
Get Started
Coming Soon

Pro

$19/month

For power users and teams who need more capacity.

  • Unlimited memories
  • 50,000 turns per month
  • Unlimited projects
  • Everything in Free
Coming Soon

0.29ms

Avg Insert

<1ms

Context Assembly at 10K

2.3x

Fewer Tokens (Compact)

~80%

Delta Savings (20 turns)

0%

Stale Beliefs Returned

Benchmarks

Measured, not promised

Every claim backed by reproducible tests. Quality validated on every commit, performance measured with Criterion.

Quality Benchmarks

7/7 passing

Stale Belief

Superseded memories correctly excluded via graph edges

Delta Savings

90.7% reduction in memory retrieval tokens over 20 turns

Sustained Conversation

100 turns, 3 projects, 0% stale returns, 0.29ms insert

Attention Budget

U-curve ordering maintains 100% LLM compliance

Noise Ratio

100% useful memories vs 80% naive (+20pp improvement)

Belief Tracking

100% correct on stale beliefs, 4.8x faster than brute-force scan

10K Scale

10,000 memories, 6/6 belief changes tracked, 0 stale returns

Performance (Criterion)

Measured across memory counts

Benchmark1001,00010,000
Insert13ms244ms2.65s
Context Assembly217us342us693us

Token Efficiency

Same 25 memories, different formats

FormatTokensvs Raw JSON
Raw JSON947
Structured5761.6x fewer
Compact4142.3x fewer

~80%

Delta savings over 20 turns

30%+

More memories per budget

Quickstart

One command. Persistent memory.

Works with Claude, Copilot, Cursor, VS Code, ChatGPT, and any MCP client.

Terminal
$ npx mentedb-mcp@latest setup copilot # or claude, cursor, vscode
✓ MCP config written
✓ Agent instructions installed
✓ Ready — your AI now has persistent memory.
 
# Optional: log in to sync memory across devices
$ npx mentedb-mcp@latest login
✓ Cloud sync enabled

Or connect via HTTP: https://api.mentedb.com/mcp