SBCJuly 31Flashbots

Private Agent Memory_

Every time an agent searches an unencrypted database, it exposes more than a query: preferences, decisions, institutional context, and the trajectory stored as memory. My operating rule is that you should own the context and rent the intelligence, which makes private memory an ownership boundary for the agent.

speaker Felix Mengruntime 11 minformat talk + Q&Areading time ~6 min

Watch on Youtube

tl;dr

›
Private memory is an ownership problem over time.

An unencrypted store exposes queries, preferences, decisions, institutional context, and trajectories; if you want to own the context while renting intelligence, the server cannot read that durable record.

›
Search can operate on ciphertext end to end.

The design turns embeddings into binary vectors and uses an additive homomorphic operation for distance, while the client encrypts the query and decrypts the returned data locally.

›
Procedural memory must arrive before action.

XTrace anchors tool calls as trigger conditions, then injects distilled lessons and guardrails before a risky call instead of waiting for a generic semantic query.

If you're new to any of this

AI agents become more useful when they can remember past conversations, documents, and successful procedures. That memory can also expose a user's private data whenever the agent searches it. This talk combines vector search with homomorphic encryption, which permits selected computation on protected data. Binary embeddings and Hamming distance turn relevance into a count of differing bits. XTrace's documentation describes encrypting documents, vectors, and queries client-side so the service does not receive them in ordinary plaintext.[3][4][5]

›A bit more background

Ordinary encryption protects data while it is stored or sent, but a service normally decrypts that data before computing on it. Homomorphic encryption changes the boundary. NIST describes fully homomorphic encryption as allowing arbitrary functions over encrypted data without the secret key. This talk narrows the operation to additive homomorphism; it does not claim that every encrypted workload is cheap.[4]

Semantic search usually represents text as numeric embeddings and compares how close those representations are. A binary embedding restricts every position to a bit. NIST defines Hamming distance as the number of positions at which equal-length strings differ. Once similarity is expressed as differing bits, distance becomes a count, letting the representation and the available encrypted operation fit each other.[5]

TIPTOE is relevant prior work on private web search, using semantic embeddings and a private nearest-neighbor protocol. It shows that protected retrieval over an embedding index is an active systems problem; it does not establish that XTrace uses the same construction. Here TIPTOE is inspiration and a comparison point, while XTrace's encryption choices, performance sketch, and memory workflow remain claims attributed to Felix Meng's talk.[6]

Show slides
01

Memory is a privacy boundary

Private context matters because an unencrypted database exposes far more than one search term. It can reveal the query, stored memory, preferences, decisions, and all the institutional context you have. Agent trajectories add a record of how work was attempted. Together, they show what the agent has learned and how its user works. My philosophy is that durable context belongs to the user. The durable context should remain under the user's control even when the model is remote. Renting a model or service can make sense; handing it readable memory gives away the durable part of the relationship.

“You should own the context and rent the intelligence.”

— Felix Meng

Context persists across calls and becomes more valuable as it accumulates. Making it private is really the only way to efficiently own the context in this design. Memory privacy is therefore an ownership boundary, not a setting added after the database already sees every retrieval. The decision compounds with each new trajectory retained.

Diagram contrasting private context ownership with server-visible agent memories and queries.
slide 02The server sees ciphertext while the user keeps context private.

From a server view, other vector databases can see your queries, trajectories, memory, and any thoughts stored inside. XTrace's proposed distinction is that its view is all ciphertext. We began by looking at private-retrieval research such as TIPTOE and at systems based on fully homomorphic encryption. The practical question was how to compute semantic distance between two embeddings without revealing either one. Retrieval itself would otherwise expose both sides of the comparison. For a 1,024-entry vector, I described the naive path as requiring 1,024 FHE operations per vector, which is really expensive.

That operation count motivated a narrower representation rather than a universal cryptographic benchmark. The goal is stronger than encryption at rest or in transit: the query, stored memory, and distance calculation should remain protected from the service performing the search. The threat model includes that operator, not only a network observer.

Two server views compare readable vector-database data with ciphertext-only storage.
slide 03Private vector search replaces readable memory with encrypted search inputs.
03

Agents need two kinds of memory

Encryption solves only half the problem. When you think about memory, it divides into two useful categories: semantic and procedural. Earlier systems emphasized semantic memory because the limited context window made facts and conversation retrieval the main challenge. Benchmarks such as LocoMo, LongMem, and EVON consequently evaluate user-and-agent chat rather than the complete trajectories produced by agents that act through tools. The distinction follows the move from conversational assistants to acting systems. Agents are doing a lot of tool calls, launching other agents, retrying failures, and producing long trajectories and rollouts.

“If you just directly use semantic search on procedural memory, it usually will not work.”

— Felix Meng

That's where procedural memory comes into play: it records how an agent accomplishes a task. A useful store needs both the facts an agent believes and the actions, triggers, corrections, and successful sequences through which it learned to operate. Failures and retries remain evidence about procedure even when the final answer is correct.

Split view labels semantic memory and procedural memory as distinct systems.
slide 08Memory separates durable semantic facts from reusable procedural experience.

The semantic memory we build is based on what XTrace calls a belief-revision system. A resolving mechanism updates stored beliefs so that semantic memories remain mostly up to date instead of preserving every earlier statement as equally authoritative. Procedural memory has a different object: it distills agent-based trajectories, including tool calls, retries, and lessons learned during a run. Different memory objects require different update and retrieval rules. If you directly use semantic search on procedural memory, it usually will not work.

A request such as help me debug this or help me deploy this may not resemble the stored moment that matters. The useful cue is often the action the agent is about to take. Procedural episodes therefore need retrieval rules tied to execution context, not only semantic similarity between two pieces of text.

Belief engine diagram shows new observations updating stored semantic memory.
slide 09Belief revision keeps semantic memory current as evidence changes.
04

Procedural memory acts before tools

XTrace anchors the tool calls of the agent as trigger conditions. Calling a particular tool, editing certain files, or crossing another operational boundary can cause the memory layer to inject context and steer the agent before the tool call. If an agent is about to remove a database, for example, the trigger can surface a company rule while the decision can still change. Timing is the mechanism: the remembered instruction arrives before execution.

At the tool boundary, the system can stop the action and then inject the context inside the run. That makes procedural memory a guardrail rather than an explanation retrieved after the event. It can also share or distill lessons learned from failed retry loops so later runs avoid the same sequence.

Procedural-memory flow injects context immediately before a matched tool call.
slide 10Tool-call triggers inject procedural guidance before an agent acts.

The encrypted vector database is available through an API, and the encryption scheme is open source so users can verify it locally. A broader memory hub allows teammates to share their agent brain and context for a holistic view. I drew a product boundary, however: the consumer-facing hub is not encrypted in the same way, while the underlying vector database is encrypted. The two products should not inherit each other's privacy claims.

05

What does encrypted indexing cost?

Audience

On the server side, do you still have to do a linear scan, or does it really scale linearly with the size of the database?

Felix Meng

Currently, you have to do the linear scan of the whole database. But because we're using binary embeddings, we can use an inverted file index. Essentially, we can have square-root-n search, so we don't have to search through everything. You can still have an encrypted index for it.

A

Appendix

The final deck frame points readers to XTrace; its official site describes shared, durable, searchable memory across agents, tools, sessions, and teammates.[2]

XTrace call-to-action slide lists the memory product and project links.
slide 11The closing frame directs readers to XTrace's memory infrastructure.

Glossary & further reading

homomorphic encryption — Homomorphic encryption permits specified computation on encrypted data without first revealing the plaintext. Fully homomorphic encryption supports arbitrary functions; the talk instead discusses an additive, partially homomorphic operation.[4]

Hamming distance — Hamming distance is the number of positions at which two equal-length binary strings differ. It can also be read as the number of bit changes required to turn one string into the other.[5]

vector search — Vector search maps material into numeric embeddings and retrieves items by a distance or similarity measure. Here, the proposed private database searches encrypted binary embeddings and returns results for local decryption.[3]

References

  1. [01]Flashbots at SBC 2026 — Flashbots CollectiveFlashbots’ event recap lists the Agentic MEV agenda, speakers, and recordings.
  2. [02]About XTrace Memory — XTraceXTrace provides shared long-term agent memory across tools, sessions, and teammates.
  3. [03]How to Set Up XTrace Private Vector DB — XTraceGuide to storing and searching client-encrypted documents and vectors with XTrace.
  4. [04]Privacy-Enhancing Cryptography: Fully Homomorphic Encryption — National Institute of Standards and TechnologyNIST explains fully homomorphic encryption over encrypted data.
  5. [05]Hamming distance — National Institute of Standards and TechnologyNIST defines Hamming distance as differing positions in two binary strings.
  6. [06]Private Web Search with Tiptoe — IACR Cryptology ePrint ArchiveTiptoe hides web-search queries using semantic embeddings and homomorphic encryption.