CTX in Brief: One Memory for a Person and Their Agents
Work with an AI agent for a few weeks and three things go wrong. Each session starts from nothing. Each tool keeps notes of its own, which the next tool cannot see. And a note that was true last week is still in the record after it has stopped being true, with nothing to mark it. The CTX specification calls them session amnesia, memory split by tool, and silent rot (Section 1).
CTX is an answer to all three: one local memory that a person and every agent they work with read and write through one tool. This page says what it is, who it is for and what it leaves out. The specification is the authority, and every claim here cites the section it rests on.
What it is
CTX is a specification, not a program. It describes "one local memory of short, attributed entries, kept on three shelves", with two pages built from it: "a one-screen brief that every agent session starts from" and "a one-page session summary that hands each session over to the next" (Section 1).
The person who owns the memory is its operator. The three shelves keep three kinds of entry apart (Section 2.2):
| Shelf | What it holds |
|---|---|
operator | The operator's standing instructions, preferences and constraints |
shared | Everything else worth keeping: what was decided, found and built, and what is still open |
agent | An agent's working notes that are of little use to the operator |
Each shelf is a plain file, and "The shelves are readable without the tool" (Section 1.1). A conforming CTX "can be written in any language and serve any harness that can run a shell command" (Section 1).
An old kind of book
Readers once kept commonplace books: notebooks of short passages, each filed under a head so that it could be found again. John Locke kept them for some twenty-five years, and his way of indexing one, by a head's first letter and the vowel that follows it, was printed in English in 1706, two years after his death.
CTX is a commonplace book with more than one writer, and some of its writers are machines. Most of what the specification adds follows from that.
Four habits it writes down
Say who wrote it, and how you know. An entry records whose knowledge it is and who typed it in, as two separate fields (Section 1.1). It also states its basis: verified, reported or inferred. A confidence number was left out on purpose: "0.8" invites "a false precision and says nothing about what to do next" (Section 12).
Mark, don't rewrite. An entry that turned out wrong is marked as amended, superseded or resolved, and stays where it was, "so what was believed, and when, stays visible" (Section 1.1).
Start small. A session starts from the brief, one bounded screen whose length "MUST NOT grow with the size of the shelves" (Section 5.2). The rest of the memory is a search away.
Hand over in writing. A session ends with a one-page summary, and the next session starts from it, whichever agent or tool runs it.
A fifth part is optional. A check is "A test attached to an entry, which anyone can run later to find out whether the entry still holds" (Section 1.3). The brief runs the checks at every start, so a fact that has stopped holding is put in front of the next session without anyone having to suspect it (Section 12).
Who it is for
The specification names its readers: "Developers who want to build a persistent memory that they and the AI agents they work with share, in any language, for any agent harness; and the AI agents they ask to build it."
The second half of that is meant literally. Section 13 is a procedure written for an agent. An operator can point an agent at the document and ask it to set up a context. In the words of the note the document opens with, the section "says what to ask your operator, what to build, how to wire it into your harness, and how to test it".
What it is not
"CTX is not a vector database, a chat log or a harness plugin" (Section 1). It holds entries short enough to read, not transcripts and not embeddings.
LangSyn publishes no implementation of it. The specification is a start: enough for a developer, or an agent, to build a context that fits its owner.
It is also not a lock. CTX runs as one user of one machine and trusts that user (Section 11), and "source is an assertion, not authentication" (Section 2.3). "Everything in the context reaches the model provider" (Section 11), so credentials, keys and tokens do not belong in it.
Stable, and free to use
CTX is at Version 2.2.2 and Stable. "An implementation that conforms to 2.0.0, and the files of a context it wrote (§8), stay conforming under every 2.x revision" (Section 1.4). Every version stays at an address of its own.
The text is licensed under CC BY 4.0: anyone may copy it, adapt it and build on it, with credit to LangSyn.
Sources
- CTX: Shared Memory for an Operator and Their Agents, Version 2.2.2, cited by section
- The Public Domain Review, John Locke's Method for Common-Place Books