Home/Docs/Architecture Decision Records/ADR-0004: Flat Memory as Medium

ADR-0004: Flat Memory as MediumπŸ”—

StatusπŸ”—

Accepted.

DecisionπŸ”—

Memory is the shared context in which agents and services operate. It is not limited to an explicit save or search tool. Durable knowledge, transient graph scratch data, graph execution, and execution evidence have separate owners and contracts.

Important

Invariant: Durable Brain memory, transient Blackboard data, Router graph execution, and execution evidence keep distinct owners and lifecycles.

Memory ownersπŸ”—

SurfaceOwner and roleBoundary
BrainCellBrain stores durable facts, documents, and chunks with provenance.A trace, conversation record, or arbitrary node value does not become a Cell automatically; see ADR-0018.
CellEdgesBrain stores typed semantic relations between Cells.Edges are not Router execution edges. Retrieval follows ADR-0011.
BrainEngramBrain compiles governed evidence into a wiki-first context product.The Engram is derived from governed sources; see ADR-0010.
BrainSynapseBrain stores attributable action and outcome learning.A Synapse is a learning signal, not graph topology.
ConversationRecordBrain stores bounded conversation evidence with its own access and retention contract.Conversation evidence is not already a BrainCell.
Execution Trace and protected artifactsBrain stores bounded run evidence and purpose-bound protected model-I/O artifacts.Trace and artifact capture do not promote content into memory; see ADR-0014 and ADR-0018.
BlackboardBrain stores tenant-scoped, TTL-managed scratch values for pass-by-reference graph work.Blackboard is not durable knowledge, an event bus, or a graph scheduler.
Graph executionRouter admits and runs graph nodes, applies fan-in accounting, and records run evidence.Graph control does not belong to Brain; durable workflow authority follows ADR-0016.

Blackboard contractπŸ”—

Brain exposes WriteBlackboard, ReadBlackboard, and PruneExpiredBlackboard. Writes return a UUID reference. Payload reads accept batches of UUIDs, resolve tenant scope from the verified token, and exclude expired records. When menu-visible BlackboardSticker/v1 headers are enabled (planned in R-201), ListBlackboardMetadata may return bounded, non-expired sticker metadata (id, sticker_kind, content_hash, timestamps) within an explicit non-empty scope_path without returning payload bytes; full payload retrieval still requires ReadBlackboard by record IDs. Pruning is tenant-scoped.

Important

Invariant: Blackboard payload reads stay bounded to caller-supplied record IDs and verified tenant scope, and optional sticker discovery stays bounded to metadata-only headers within an explicit non-empty scope_path; Blackboard never provides tenant-wide listing, payload dumps, watch streams, or self-scheduling.

Graph admission uses Router-declared conditions. A Blackboard write does not admit or schedule a node. Durable handoff and recovery evidence stay with their owning Brain record; TTL expiry removes the scratch value and does not imply that durable state was lost.

CellEdges useπŸ”—

The Router graph-first retrieval path uses a seed and bounded TraverseCellGraph to expand semantic relations, then resolves governed Engram context as configured. An agent may call the bounded traversal contract when it needs to inspect relations directly. CellEdges do not replace search, and search does not replace graph traversal.

ConsequencesπŸ”—

  • Execution, conversation, and protected model-I/O evidence require explicit provenance and policy before a separate memory producer may derive a Cell.
  • Brain owns durable memory records; Router owns graph admission and execution. Worker's S3TraceArtifactArchive handles the separate protected trace-artifact lifecycle. General-purpose external object offload remains design-only under ADR-0015.
  • Product surfaces expose these owners through their typed contracts instead of treating every record as one shared event stream.

Non-goalsπŸ”—

  • Turning Blackboard into a durable ledger, event bus, or scheduler.
  • Treating trace or conversation capture as automatic memory formation.
  • Replacing CellEdges traversal with search-only access or default raw Cell dumps.
  • Applying blanket application-level encryption to all Brain fields.