Agent memory laboratory

How AI agent memory should store, retrieve, update, and forget

Memory is selected state that survives beyond the current context window. Useful memory is scoped, attributable, retrievable when relevant, correctable, and deletable—not an excuse to save every transcript forever.

Advance a real record through write, scoped retrieval, versioned update, expiry, and payload deletion. Inject missing provenance, a scope mismatch, a version conflict, or denied deletion and inspect the append-only operation ledger.

A bounded agent memory system selecting a fact, storing it with provenance, retrieving it for a relevant task, and expiring stale state
Agent memory · Durable state with a lifecycle
Inspect
Scope · provenance · timestamp · retention · recall
Changes
Persistent records written or retrieved
Lifecycle
Persist · retrieve · update · expire · delete
Memory lifecycle ledgerretrieve-complete
  1. 01writecompleted

    A scoped record was committed with a source, version, and expiry time.

  2. 02retrievecompleted

    Only the eligible record projection was injected into the active context.

  3. 03updatenot-reached

    Not reached in this run.

  4. 04expirenot-reached

    Not reached in this run.

  5. 05deletenot-reached

    Not reached in this run.

Scoped durable record

travel.preferences / home_airport

Subject user:user_42. Retrieval must match subject, purpose, agent, status, and time before any value reaches context.

Current record
{
  "id": "mem_user42_travel_home",
  "version": 1,
  "subject": {
    "type": "user",
    "id": "user_42"
  },
  "namespace": "travel.preferences",
  "key": "home_airport",
  "value": {
    "iata": "DTW"
  },
  "scope": {
    "allowedPurposes": [
      "trip-planning",
      "travel-booking"
    ],
    "allowedAgents": [
      "travel-assistant"
    ]
  },
  "provenance": {
    "sourceType": "user-statement",
    "sourceId": "turn_184",
    "capturedAt": "2026-08-01T14:05:00Z"
  },
  "createdAt": "2026-08-01T14:05:00Z",
  "updatedAt": "2026-08-01T14:05:00Z",
  "expiresAt": "2026-09-01T00:00:00Z",
  "status": "active"
}
Context injection
[
  {
    "recordId": "mem_user42_travel_home",
    "namespace": "travel.preferences",
    "key": "home_airport",
    "value": {
      "iata": "DTW"
    },
    "provenance": {
      "sourceType": "user-statement",
      "sourceId": "turn_184",
      "capturedAt": "2026-08-01T14:05:00Z"
    },
    "retrievedFor": {
      "purpose": "trip-planning",
      "agent": "travel-assistant"
    }
  }
]
Payload-free tombstone
{
  "notCreated": true
}
Append-only operation ledger1 stored version
01writecommitted{"operation":"write","status":"committed","recordId":"mem_user42_travel_home","version":1,"at":"2026-08-01T14:05:00Z"}
02retrieveinjected{"operation":"retrieve","status":"injected","recordId":"mem_user42_travel_home","version":1,"at":"2026-08-02T12:00:00Z"}

Primary research

Inspect the mechanism at its source.

Project architecture and terminology were checked against official documentation on August 10, 2026. Research papers are linked to their original publication records.

Just-in-time context and finite attentionEffective context engineeringOriginal source ↗Workspace and memory mechanismsOpenClaw memoryOriginal source ↗Bounded memory and learning stateHermes Agent memoryOriginal source ↗

Keep experimenting

Change the layer, keep the system visible.

AI Lab indexSee every interactive laboratoryBrowse the suite →Transformer microscopeGo beneath the agent runtime into the modelInspect the matrices →