Predict-first memory for realtime AI

Give your AI the right memory
before the user asks

MemFront keeps the next likely context hot, so realtime agents do not wait on memory search after the prompt arrives. Predict-first staging returns compact `.ndp` handles in the fast path; full context and Reasoning are pulled only when needed.

01 / PREDICT

Keep the right memory hot

Reactive retrieval waits for a query. Predict-first memory watches trajectory and stages the context most likely to matter next.

0.85ms warm/staged P50 · 85.9% PQHR@5
02 / .NDP FORMAT

Portable handles, cheap hydration

The `.ndp` format moves memory as handles, previews, terms, scores, and storage keys. Full context is pulled only after the kernel selects it.

hot index · cold context · hydrate on demand
03 / REASONING

LLMs only on the premium path

Predict, Memory, and Hydration stay cheap. Reasoning adds the LLM answer layer only when the customer needs final QA.

85.2% LongMemEval-S E2E judge

Every memory tool today is reactive

You ask → it searches → returns. That's RAG with a nicer name. Mem0, Zep, MemGPT, LangMem, OpenAI Memory, Claude Memory — all the same pattern.

MemFront does something different: it watches behavioral signal — what sessions you've had, what topics are trending, what past conversations are about to become relevant — and pre-stages them before you ask.

Call the hosted MemFront API with a workspace key. Local/self-host is optional, not required.
The kernel keeps compact handles hot and pulls full context only when selected.
Predict and Memory avoid LLM calls by default. Reasoning is the paid LLM layer.
integration.py
from ndpa import Client

# Initialize once
c = Client(api_key="ndpa_...", platform="myapp")

# Log every turn
c.log_turn(session_id, "user", user_msg)
c.log_turn(session_id, "assistant", reply)

# Stage likely memory before the next query lands
stage = c.stage(session_id, k=5)

# Memory returns handles/previews, not full raw transcripts
matches = c.get_predictions(session_id, query=user_msg)
keys = [m["storage_key"] for m in matches["predictions"]]

# Hydrate full context only when needed
context = c.hydrate(keys)
New benchmark category

PQHR — the benchmark for predict-first memory

Pre-Query Hit Rate measures predict-forward memory. Given only the user's prior session trajectory — no current question, no explicit input — can the system stage the right past context that will become relevant for their next session?

Vector DBs and embedding-based memory systems can't be scored on this. They require an explicit query. PQHR is the metric for voice AI, ambient assistants, and agentic loops. It measures a category reactive memory systems do not benchmark.

Predictor pqhr@1 pqhr@3 pqhr@5 Notes
Random baseline 0.205 0.505 0.687 sanity check
Recency-only 0.209 0.503 0.680 bar to beat
MemFront fixed multi-signal 0.846 W=7 public
MemFront adaptive multi-signal ★ 0.859 W=10 public

18,773 samples · 500 synthetic users · LongMemEval public dataset · BM25 is the labeler (defines truth), not a competitor · BoW cosine is the predictor · fully reproducible

Honest note: random@5 is 68.7% on this synthetic corpus because each user's candidate pool is small (~30–40 past convs). The launch claims are fixed W=7 multi-signal PQHR@5 at 84.6% and adaptive W=10 public PQHR@5 at 85.9%.

External benchmarks

MemFront reports each layer with its own metric: PQHR for Predict, hit@K for Memory, latency/storage for Hydration, and E2E LLM judge for Reasoning.

LongMemEval

500 QA questions
77.6%
hit@1
86.8%
hit@3
90.6%
hit@5
Latest metadata-only Memory retrieval run. Reasoning E2E is reported separately below.

LoCoMo

1,982 QA items
61.5%
hit@1
79.0%
hit@3
85.1%
hit@5
Latest local metadata-only Memory retrieval run.

Verified metrics by MemFront layer

Layer Metric Verified result What it means
Predict PQHR@5 85.9% adaptive W=10 public; fixed W=7 is 84.6%
Memory LongMemEval retrieval@5 90.6% latest metadata-only run
Memory LoCoMo retrieval@5 85.1% latest local metadata-only run
Hydration local-FS raw context fetch 0.49ms local API p50; p95 0.88ms; not QA
Reasoning LongMemEval-S E2E LLM judge 85.2% current repaired full run; optional answer layer

Most competing systems publish full-stack QA accuracy, not retrieval hit@K. MemFront does not compare its retrieval hit@K to competitor QA numbers.

* Predict latency is staged/warm latency. Cold non-staged requests are measured separately and should not be described as the fast path.

Reproduce: python3 -m eval.metadata_retrieval_eval --benchmark longmemeval · python3 -m eval.locomo_runner · python3 -m eval.compare_latency --profile staged

How it works

1

Hook captures signal

Every turn is queued locally so capture does not block generation.

2

Ingestion indexes

Compact top terms, previews, handles, timestamps, and storage keys stay hot in Postgres.

3

Kernel scores past

Recency + frequency + topic overlap. Behavioral signal, no LLM in path.

4

Context staged

Top-K predictions returned. Inject into system prompt before generation.

system
User message → Hook captures event locally
            → Background queue posts to Ingestion API
            → Behavioral kernel scores hot metadata handles
              by recency · frequency · topic overlap
            → Predictions API returns top-K staged handles
            → Stage in system prompt BEFORE generation

For platform engineers

Drop MemFront into any AI product. The SDK is platform-agnostic. Works with Claude, GPT, Gemini — or any LLM.

Python SDK
pip install ndpa
TypeScript SDK
npm install ndpa
Self-hostable
Any Postgres + edge function runtime. No vendor lock-in.

Production characteristics

Hook latency warm staged path
Prediction P50 cold pooler smoke ~700ms
Rate limit pending hosted config
Batch size pending hosted config
GPU required No
Embedding API No
LLM in hot path No

Four layers, one API

Use the layers you need. Measure each one with the right metric.

01
MemFront Predict
pre-query staging

Stages likely context before the current query exists.

Warm P500.85ms
Cold miss~342ms local
PQHR@585.9%
Inputtrajectory
Outputstaged handles
Best for
Voice AI Agents
02
MemFront Memory
explicit retrieval

Searches hot metadata and returns ranked handles, previews, and scores.

LongMemEval hit@590.6%
LoCoMo hit@585.1%
Modemetadata-only
Embeddings requiredNo
Price$0.10 / 1K
Best for
Chat apps Long memory
03
MemFront Hydration
raw context fetch

Fetches raw context only after Predict or Memory selects the handle.

Local P500.49ms
Storage pathcold tier
Inputstorage_key
Outputraw context
QA benchmarkno
04
MemFront Reasoning
optional answer layer

Runs LLM QA over selected hydrated memory. BYOK or hosted billing.

MetricE2E LLM judge
Best run85.2%
Inputhydrated context
Outputanswer
Price$5/$40 / 1K

Pricing

Four separately metered layers. Predict, Memory, and Hydration stay low-cost; Reasoning is premium because it can call an LLM.

Predict
$0.03
pre-query staging
Meter: 1K prediction requests
Adaptive W=10 PQHR@5: 85.9%
Fixed W=7 PQHR@5: 84.6%
Open console
Memory
$0.10
metadata retrieval
Meter: 1K retrieval calls
LongMemEval retrieval@5: 90.6%
LoCoMo retrieval@5: 85.1%
Latest metadata-only retrieval runs
Open console
Hydration
$0.05
storage + bandwidth
Meter: 1K fetches + bytes
Raw memory stays out of the hot path
Local hydration P50: 0.49ms
No QA score claimed; it is storage fetch
Open console
Reasoning
$40
optional LLM layer
Meter: 1K hosted calls
BYOK orchestration: $5 / 1K
LongMemEval-S E2E: 85.2%
Runs over hydrated context
Open console
Pricing note: Predict should stay the lowest-cost path, Memory stays cheap retrieval, Hydration tracks storage/bandwidth, and Reasoning is the premium LLM layer. Checkout activates when billing is configured on the hosted API.

Join the MemFront waitlist

Get early access to predict-first memory for voice agents, chat products, and AI apps that need context ready before the next prompt lands.

No credit card required to start. MIT licensed. Self-hostable.

Open console preview →