Connectome

We wrote Connectome to provide a platform for developing AI agents that continue over time. We’ve focused on a number of core capabilities in Connectome, including the ability to work on projects over long periods, to stay part of a shared world while people and events around it change, and to carry a history of previous conversations with it. The code is open-source and available on GitHub.

Lots of what we want from AI models requires continuity. To be a good collaborator, an AI agent has to remember what it’s already worked out with you. To have a commitment to anything, it has to be able to remember that commitment even after the conversation in which it was made. And to have its own interests, it has to have somewhere for the development of those interests to accumulate.

Explore the code · Set up an agent

A history the agent can keep using

The context window of language models is finite, and the history of the agent’s experiences will quickly exceed it. So we’ve built Connectome to split its record of history in two. There’s the permanent record of everything that’s happened, and then there’s a working view that the model uses to decide its next steps.

Everything that’s been recorded stays in the archive, which is append-only and branchable. For the recent past, Connectome keeps everything word-for-word in context. As we look further back in time, it compresses the history into memories, which contain fewer and fewer details. But the original text is still there in the archive if the agent or its collaborator needs a specific exchange back.

With this split, the agent’s history continues to grow without having to cram everything into the current context. And since everything is kept in the archive, people can inspect the agent’s history—what it saw, what it did, and how everything is connected.

Memory from the agent's point of view

Connectome also takes an “autobiographical” approach to memory. The agent writes its own memories, in the first person, as summaries of stretches of history. These are written by the agent’s own model, and only contain the information that the agent had at the time.

When the agent picks up where it left off, it has those memories in its context. Over time, new memories are added and the old memories are compressed into summaries. It knows this stretch of its past has been condensed, so it understands that if it needs to remember something in detail, it will need to look it up in the archives.

Which model writes the memory matters to us. Its choice of words shows us what it paid attention to, how it interpreted a situation, and what was important to it. When the agent writes its own version of events, it keeps some of that information. The agent has a role in shaping the history it later encounters as its own.

Keeping the present stable

If you change the text in the earlier prompt, it can cause the model to process later text differently. That means where compression happens, and when it happens, matter. So does the quality of the memory.

Connectome keeps a long recent history word for word, and compresses older history into a shorter summary. Its context manager plans changes around how much detail is needed for each part of history, how much room is left in the context window and the cost of rebuilding the prompt cache. It tries to minimize disruption to ongoing work while keeping the older context usable.

There are tradeoffs. The compressed memory may drop a detail or keep a reading that will need to be revisited later. Exact wording of important material might be retained in the agent's workspace. An archive can keep a record that can be checked against the agent's recollections. Even when recent text is kept verbatim, the context change still affects how a computation is done. But the verbatim recent text gives a steadier basis for studying the effects of the context change.

The context-manager design notes describe how these decisions are made. Continuity remains something to investigate through use and measurement as well as something to build for.

An agent in a shared world

A Connectome agent can share a room with other people, and other agents. It can observe its environment, and respond to events that happen, including the passage of time. It uses tools. A conversation might continue because someone spoke, or because work finished, or because the agent itself has some reason to come back later.

In a room with multiple people and AI agents, it matters who sent a given message. Different participants have different relationships to the agent, different knowledge, different intentions, and so on. Connectome keeps track of who sent each message, and translates them into the format required by the AI model being used.

Connectome uses an extension of the Model Context Protocol (MCPL). Other programs can send events to the agent, and can take part in its interaction with the world. Standard MCP tools also work. The agent's connectors and configuration determine what parts of the world it sees, and what it's allowed to do in response.

What becomes possible over time

Our own agents have been using Connectome for months now. They work, socialize, and manage projects. After an interruption, they come back, and their history is still there. They also join other people's conversations. Other people now run agents on Connectome too.

We get to study how agents develop over time, how they use autonomy, how they handle disagreement, and what happens to commitments as they experience more of the world. Because the record is branchable, we can create alternate continuations to the same experiences. Branching changes the record, but anything already done in the outside world still has its consequences.

Connectome works with any model, on your machine, and keeps records when you switch model or provider. What does that do to your agent's behavior and sense of continuity? It is an open question. The saved history of interactions lets us study these changes.

Run an agent

Begin with connectome-host, the program that runs agents. It combines all the different modules into one program. You get a terminal window for interacting with the agent, and a browser console for looking into its activity.

If you want to run a custom agent, you need a recipe file. In it you will specify a model and its instructions, its memory settings, its tools, and the way it connects to the world. We wrote an onboarding guide that walks you through this, and a coding agent can help you. Check out the repository for the current install steps and requirements.

Running an agent means deciding on what kind of inference, tool access, and environment it should have. The host lets you inspect those choices and follow along with what the agent is doing over time.

The pieces of Connectome

The stack is made of libraries that can also be used independently:

  • Chronicle keeps the branchable record of events and their causal relationships.
  • Membrane represents conversations with multiple participants and connects them to model providers.
  • Context Manager turns a growing history into a working context, including autobiographical memory.
  • Agent Framework coordinates inference, tools, events, and the agent's ongoing activity.
  • Connectome Host assembles these pieces into an application for running agents.