Shared memory

On the roadmapThis is a later stage of the toolkit. It is not designed in detail yet, and it does not exist today. See the roadmap.

When two agents work on related things, they end up re-learning each other’s lessons. One agent works out that the staging database needs a particular extension; another agent, in another sandbox, pays for the same discovery.

Shared memory is our answer to that: a memory layer that the agents you run can write to and read from, organised around an ontology rather than a pile of documents.

This is a direction we have committed to exploring. It is not designed in detail, and it does not exist. The roadmap says where it sits.

The problem with agent memory as it stands

The usual way to give an agent memory is a vector store, or a directory of notes, or both. Those work for a single agent with a single job. They break in three specific ways:

  • It is per-agent by construction. The knowledge is in one agent’s store, and the other agents cannot see it, so nothing is actually shared.
  • It is a pile of prose. Retrieval finds text that looks similar. It cannot tell you that two entries contradict each other, or that one is stale, or that they describe the same thing under two names.
  • Nobody can audit it. When an agent acts on a fact, there is usually no way to find out where the fact came from, or how old it is, or who wrote it.

What an ontology changes

An ontology is a set of named things and the relations between them — entities you name explicitly, rather than chunks of text you hope will be similar enough.

Concretely, we are designing memory so that a fact is stored as a statement about named things:

the staging database requires pg_trgm

and a later agent can ask what is known about the staging database and its relations, and get an answer that is structured rather than approximately similar. That buys three things a vector store does not give you:

  • Contradictions are visible. Two statements that cannot both be true sit next to each other in a structure, instead of being two nearly identical chunks of prose that retrieval hands back side by side.
  • Names are stable. If two agents call it the staging database and the staging db, the ontology is where those become one thing.
  • Provenance is explicit. Every statement carries where it came from, when it was written, and which agent wrote it.

The part that has to be honest

A shared memory is only useful if it is not a liability. That means the design has to answer, before it ships:

  • Who can write? An agent that can write anything can poison what every other agent believes.
  • How are conflicts resolved? When two agents state different things about the same relation, which one wins, and who gets to say?
  • What is deleted when? If a fact turns out to be wrong, or contains something it should not, how does it leave the memory — including from the agents that already read it?
  • What is the boundary of sharing? The whole point of a sandbox is that two agents do not see each other’s work. Memory must not quietly dissolve that boundary.

None of those questions has a final answer yet. They are the reason this sits behind the sandbox and the agents platform rather than in front of them: both of those need a memory layer that can be trusted, and that is a harder thing to get right than the rest.

Where it fits

It fits between the agents platform and the sandboxes those agents run in:

  • The agents platform is where an agent is defined and run.
  • The shared memory is what agents can read and write across those runs.
  • The sandbox stays the isolation boundary — two agents still do not share a filesystem, and what one of them writes to memory is an explicit act with a recorded author, not a side effect of sharing a disk.

What it is not

  • It is not a database of your documents. The platform does not take custody of your files, and it does not index them for you.
  • It is not shared storage. Shared memory is a structured statement store, not a place to put a large file and have everyone see it.
  • It is not a blackboard. There is no model that reads everything and decides what is true. The ontology is meant to be inspectable by you, not just by us.

Next: the roadmap.

Next