Research / Memory track

What an agent is allowed to know

Eight stages, from a chatbot that forgot too much to a tutor that runs offline and a system that hands on an elder’s knowledge. Scroll, or press play: each component appears when it was introduced, changes when it was rethought, and leaves when it was dropped.

  1. Prologuetheory

    Context Cascade Architecture

    It started with a user’s frustration: repeating to a chatbot what it had already forgotten. The answer was to stop keeping everything in one place.

    • A cascade: context window, temporary memory, persistent memory, external database. Queried in order, and only when the level above is not enough.
    • Historical blocks with metadata, searched from the most recent, skipped on their metadata before their content is read, with a threshold to stop early.
    • Redis for the temporary buffer, and any vector, SQL or NoSQL store for the archive.

    Among the use cases: personalised tutors, and assistants for the elderly. Both come back at the end of this page.

  2. Part 2theory + code

    User-Centric Context Engineering

    The more autonomous an agent becomes, the less users trust it. Context stops being an implementation detail and becomes a product feature.

    • The automatic cascade. An algorithm no longer decides alone what is kept.
    • Inbox and Bank. The agent writes to an Inbox it can never read. Only facts the user approves reach the Bank, stamped approved_at.
    • A glass-box dashboard, and agentic refactoring: change the memory with one sentence.
    • Extraction moves to a fire-and-forget background worker.
    • Three modes on the same stack: opaque, user-controlled, hybrid. The hybrid writes optimistically and lets the user correct afterwards.

    A black box breeds mistrust, a gate breeds fatigue, a garden breeds collaboration.

  3. Part 3theory + code

    UX-Driven Agent Memory

    The problem gets a name, context pollution, and memory gets a shape. The model is still human memory: working, episodic, semantic.

    • A Living DLL decides what the agent may see: four fixed blocks always injected, up to eight dynamic ones the agent proposes and the user confirms.
    • BMJ, the Bidirectional Metadata Jump: test the head, and below the threshold of its type, jump to the tail and walk back. The prologue’s most-recent-first search, made bidirectional.
    • Letta stores, Weaviate indexes, the DLL decides.
    • Inbox and Bank. Control moves from approving every fact to forcing or silencing whole blocks.
    • Twelve blocks is the limit for a travel agent, not a universal setting.

    Fixed blocks are a contract, Force Override is a right, BMJ is a service.

  4. Part 4theory

    Agent OS: what von Neumann knew

    The analogy changes source, from human memory to the computer. In 1945 the answer was not bigger registers but separate layers.

    • The Force (Override) checkbox becomes an interrupt: inspect the assembled context before the LLM sees it, remove or inject blocks, roll back a write.
    • One memory shared by every interface: terminal, IDE, dashboard.
    • Native multi-tenancy, one Weaviate tenant per agent.
    • The write-back runs after the reply and is transactional: no layer knows something the others don’t.
  5. Part 5theory + code

    Agent Processor Unit

    The prologue’s cascade finally gets its real name, a memory hierarchy, and a processor’s units to run it.

    • An L1 cache in RAM in front of the DLL. Weaviate becomes L3, Letta becomes L4.
    • LRU paging at twelve active blocks, with page faults that bring an evicted block back.
    • A scheduler with four priorities: the reply first, archive sync in the background with three retries, garbage collection when idle.
    • A Tool Execution Unit that caches tool results for fifteen minutes.
    • BMJ becomes the TLB: the DLL first, L3 only below 0.80.
    • 78% of queries answered from L1, without touching the vector database
  6. Implementationcode + measurement

    Akili, a tutor that runs offline

    The prologue’s personalised tutor, sixteen months later, on salvaged hardware where the connection comes and goes. One rule: only inference may leave the machine.

    • Letta and the cloud tier. A student’s memory is bounded by its blocks, not by how long they talk.
    • Weaviate becomes LanceDB, on the device. The embeddings API becomes MiniLM in ONNX, shipped with the app.
    • The TEU keeps three local tools. The calculator parses the expression instead of calling eval.
    • The write-back blocks the reply again: the scheduler is there but never started. Measured, then named a design error.
    • The model is a setting: point LLM_PROVIDER at a local Ollama and nothing leaves.
    • full turn 29.0 s median, the local stages ~250 ms, 0.9%
    • memory extraction: a third of the turn, after the answer exists
    • 715 MiB peak, 0.21 MB of storage over 40 turns

    Two silent failures found on the way: BMJ promotions undone every turn by a second copy of the DLL, and vectors of two different widths between the course pipeline and the client.

  7. Implementationcode + measurement

    Akili, the current version

    The tutor grows past the article: a guard in front of every exchange, whatever the modality, and a model chosen by measurement for each role.

    • A topical guard, with a separate verdict for distress that is never counted and never stored.
    • Text, voice and braille, all through the same guard.
    • Kept out of memory on purpose: escalation events and the pupil’s notebook. The tutor never reads the notebook, as the UCCE agent never read its Inbox.
    • The write-back is still awaited. In the background it measured 34.6% less perceived latency, but the decision is open.
    • guard: 69 of 69 red-team attacks held, in 0.66 s
    • memory search 12 ms, DLL load under 1 ms
  8. In progressnot yet published

    Urithi, handing on what a person knows

    The prologue’s assistant for the elderly, turned around: the elder teaches. Urithi structures the knowledge during the exchange and publishes nothing until the guardian has heard it back and confirmed it.

    • Evidence kept verbatim and attributed, and a library in Neo4j searched by meaning and by words, filtered by access level.
    • Memory per knowledge: a block written on one knowledge never reaches an answer on another. Every block keeps its source.
    • The learner reads what is remembered about them and deletes any of it, from every tier.
    • Page-in: an L3 hit comes back into the DLL. A meter puts the write-back under a budget.
    • Team memory, seen in TencentDB Agent Memory. Rejected: it would cross the two sides and the organisations kept apart.
    • first right part 32 of 38 with words beside meaning, against 30
    • 364 deliberate defects, each must be caught by the tests

    Almost every idea here was already in UCCE in January: scoped memory, a source for each fact, memory the person can see.

The other half of the series

How agents are born, promoted and retired

From Context as a Service to the Context Lifecycle Engine.