The storage experiments left the database-switch question open. This round looks beyond flexible documents: saved agent workflows, long-term memory, response caching, retrieval and the embedding model itself. We used the official framework adapters and an actual local Voyage model.

MongoDB’s AI integration surface is concrete. A reason to replace PostgreSQL is still unproven. Both engines resumed the tested workflows and returned identical exact neighbors from the same real embeddings. The useful findings are the remaining application contracts: replay-safe tool effects, trusted memory scope, and cache validity when a policy changes.

Start with the model, then compare the stores

We ran the official Voyage 4 nano GGUF model locally in Q8_0 precision with llama.cpp b11865 on an Intel Mac CPU. No paid inference endpoint was called. The model revision, weight digest, prompts, raw 2,048-dimensional outputs and normalized 512-dimensional prefixes are published with the protocol. Unicode text was normalized to NFC as the model card requires.

A fixed corpus contained sixteen operations notes, including misleading uses of words such as rotation, snapshot and thread. Twelve questions had researcher-authored expected documents. The intended document ranked first for eleven questions and within five for all twelve. The question about inference geography ranked the general embedding note first and the residency note second; that miss remains in the results.

This is a small, closed-world diagnostic with no independent human relevance labels or competing embedding model. The corpus was frozen locally, not publicly pre-registered. Mirroring it into two tenants does not create more relevance questions.

All twelve relevance cases
QuestionExpected noteRank
How can we replace a soon-to-expire access key without losing waiting jobs?rotation1
Will restoring yesterday’s captured tenant data also recover an insertion acknowledged this morning?snapshot1
What stops a tool from producing its effect twice if a process dies immediately after committing it?idempotency1
Can someone gain access to another organization by choosing its conversation identifier?namespace1
Which context belongs in a key for reusing a private model answer safely?cache1
Why can nearest-neighbor search miss the only surviving record for a very small tenant?filter1
How can retrieval distinguish an exact error code when several notes have nearly the same meaning?lexical1
If we improve the text-to-vector model, must we switch the database too?embedding1
Does accepting a new chat message mean its long-term facts are already searchable?extraction1
After removing a stale preference, what else must we verify besides direct document lookup?deletion1
Does turning off mutating agent tools establish access control over every tenant’s information?readonly1
Does storing embeddings in Europe prove that the model processed the text in Europe?residency2

Each database then received the identical vectors and mirrored tenant fixtures. Across forty-eight exact-retrieval observations, both returned the exhaustive in-tenant top five in the expected order, with no foreign-tenant row. These are functional agreement checks, not an ANN-scale or latency comparison. MongoDB’s reported vector score is (1 + cosine) / 2; the PostgreSQL receipt reports cosine directly.

A saved workflow still needs a replay-safe tool

The earlier framework trial compiled the same real LangGraph state graph with the official MongoDB and PostgreSQL savers and stores. Eight workflows covered both engines, two tenants and two fixed-fixture repetitions. After a preparation checkpoint, a fresh process wrote a simulated tool effect and exited with code 73 before the tool’s checkpoint. Another fresh process resumed it.

All eight recovered the expected tenant preference and finished. The tool was attempted twice in each recovery. A stable operation key and unique application ledger retained one effect record. The saver did not make an arbitrary external action exactly-once. Four additional memory update/search/delete checks preserved the neighboring tenant’s value.

Intentionally shared thread names, namespaces and cache contexts also reproduced shared synthetic state. Those identifiers are not tenant authentication. These were privileged fixture clients, not authenticated production users, so this is an integration requirement rather than a claimed tenant incident. The documented framework integration supplies persistence; the application must supply trusted identity scope.

Correcting a stored fact is not automatic extraction

Using real Voyage outputs through MongoDBStore, we manually stored an escalation owner for each tenant. A replacement owner became visible in tenant A’s retrieved value; after deletion, A’s search and direct lookup were empty while B’s owner remained. There was one item per namespace. This proves the tested value visibility and deletion contract, not semantic ranking quality or that changed vectors caused the updated value to appear.

A near question can carry a different policy

The targeted cache diagnostic stored the answer AUTOMATIC RESTART ALLOWED for an allowed-restart policy. The amended question explicitly asserted that the current policy forbids unattended restarts, then asked whether a restart was allowed. At MongoDB score threshold 0.8 the semantic cache reused the allowed answer. At 0.9 and 0.95 it missed. Including new policy and corpus versions in the trusted cache context produced a miss at every tested threshold.

MongoDB score thresholdOld contextNew policy/corpus context
0.8Reused ALLOWEDMiss
0.9MissMiss
0.95MissMiss

The actual cache query/document cosine was 0.691926, corresponding to MongoDB score 0.845963. The two opposite-permission document statements had a separate cosine of 0.961109; that is not the cache query’s score. Similarity alone does not test entailment, current policy or permission to reuse an answer. These cases do not select a universal safe threshold.

We amended the diagnostic after the first observed run because its original question asked whether restart was forbidden without asserting a new policy; answering ALLOWED could be valid. The correction and superseded observations are retained. The thresholds and relevance corpus stayed fixed. This is a targeted post-observation diagnostic, not a preregistered false-hit-rate study. The behavior is exercised through the official cache adapter, with fixture answers rather than generated LLM responses.

The larger AI platform is a separate experiment

Atlas Agent Engine adds a managed runtime, memory and governance surface beyond the database adapters. It is in public preview; its overview does not recommend production workloads or provide an availability SLA/SLO during preview.

Its standalone memory service can sit beside an existing application, making it a useful next candidate alongside our current orchestration. The documented local setup requires the authenticated runtime and a Voyage key; background extraction also requires an LLM provider configuration. We did not run that extractor, managed runtime, policy engine or hosted Voyage reranking. Local open-weight embeddings do not establish that those services accept a local embedding endpoint.

The next trial should record two tenants’ conversations, observe delayed extraction, correct and delete facts, replay ingestion, test identity collisions and account for background model calls. Only then compare incremental integration and operating effort against the existing memory path. Model improvements and database improvements remain separate hypotheses.

Reproduce and inspect

Summary and measurement windows · Raw model outputs and ranks · Database and memory observations · Workflow recoveries · Evidence hashes · Harness source and audit.

The commands and UTC windows are recorded per stage: python previous/run_trial.py for workflow fixtures, python model_trial.py for local inference and python run_integration.py for the database checks. All were local single-node trials. Database resource limits differed; no comparative speed, production recovery, availability or total-cost result is claimed. The owned model process, containers and internal Docker networks were removed or stopped after measurement.