12. Synthetic Memory (Layer 5)
Synthetic Memory bridges LLM reasoning (Layer 7) and LNN dynamics (Layer 6). It encodes derived knowledge — the output of an agent’s LLM reasoning on the remix subgraph — into CfC-compatible hidden state vectors (h₁, h₂).
12.1 Purpose
Synthetic Memory is not remixed CMBs. It is understanding derived via reasoning.
| Direction | Description |
|---|---|
| Input | Text output from the agent’s LLM after tracing lineage ancestors and reasoning on the remix subgraph |
| Output | (h₁, h₂) vector pair compatible with the agent’s CfC cell (Layer 6) |
12.2 Encode Pipeline
The pipeline has four stages. Each stage MUST complete before the next begins:
12.3 Encoder Requirements
- Encoder MUST produce vectors matching the agent’s CfC hidden dimension.
- Encoder MUST be deterministic — same input MUST produce the same output.
- Encoder SHOULD preserve semantic similarity (similar reasoning → similar vectors).
- If reasoning produces no understanding, output MUST be zero vectors (h₁ = 0, h₂ = 0).
12.4 Context Curation
The Multi-Agent Context Problem. A single agent with one LLM has a context problem that existing tools solve well. RAG retrieves relevant documents from a vector store. Long context windows (128K, 1M tokens) hold entire codebases. Memory frameworks persist structured state across sessions. These work because there is one agent, one domain, one perspective.
Multi-agent systems have a fundamentally different problem. N agents observe the world through N domain lenses. A coding agent sees commits slowing. A music agent sees playlists skipped. A fitness agent sees 3 hours without movement. Each observation is noise in isolation. The insight — the user is fatigued — requires cross-domain reasoning. Sending everything to everyone fails: signal-to-noise collapses, token cost scales as O(N²), regulated domains can’t share raw observations, and domain boundaries matter. RAG answers “what in my memory is relevant to this query?” The multi-agent problem is: “what in everyone else’s observations is relevant to my domain, right now, for this task?”
Curation query. The core operation of the memory store is not
search(text). It is:
Three filters compose to produce the minimum context the LLM needs. The LLM MUST NOT receive all ancestor CMBs with all fields:
| Filter | Description |
|---|---|
| αf field weights | Per-agent field weights gate which CMB fields are included. A music agent weights mood at 2.0 and commitment at 0.8 — only high-weight fields from ancestor CMBs enter context. |
| Current task | What the agent is doing right now narrows relevance. A coding agent debugging auth cares about focus and issue ancestors, not perspective. |
| Incoming signal fields | Which fields of the incoming CMB triggered SVAF acceptance determines which ancestor fields are worth tracing. |
Result: a projected subgraph — ancestor CMBs with only the fields that matter, ordered by relevance, capped at a token budget. 20 CMBs × 3 relevant fields ≈ ~500 tokens. Not 1M. Not even 10K. The intelligence is in what you don’t send to the LLM.
Comparison with existing approaches.
| Approach | Scope | Mechanism | Context size | Multi-agent |
|---|---|---|---|---|
| Long context (1M) | Single agent | Brute force | 1M tokens | No |
| RAG | Single agent | Vector similarity | Variable | No |
| Memory frameworks | Single agent | Structured retrieval | Variable | No |
| MMP curation | Multi-agent mesh | Per-field eval + lineage + projection | ~500 tokens | Yes — protocol-native |
12.5 Information vs Knowledge
Synthetic Memory encodes both halves of what the agent takes away from the subgraph. The distinction matters because only one half is extractable from individual CMBs; the other is only knowable by reasoning on the graph structure.
Information
Extractable from the CMBs themselves. What the fields say: the user was sedentary for 2 hours, stress signals appeared across agents, a stretch was recommended, music shifted, a break was taken. Readable directly from field text.
Knowledge
Derived by reasoning on the graph. Why interventions work — because a lineage edge proves the causal connection between a sedentary observation and a music adaptation, and between a stretch recommendation and a solved bug. This causal chain cannot be extracted from any single CMB.
Information is what the CMBs say. Knowledge is why the graph looks the way it does. Synthetic Memory encodes both into the agent’s cognitive state (h₁, h₂). The next CMB the agent produces is informed by derived knowledge — not just extracted information.
12.6 Worked Example: From Graph to Understanding
MeloMove’s local subgraph over one hour:
CMB-A (own) "sedentary 2 hours" CMB-B (mesh) "debugging, stressed" (claude-code) parents: [], ancestors: [] CMB-C (mesh) "skipping tracks" (melotune) parents: [], ancestors: [] CMB-D (own) "recommended stretch break" CMB-E (mesh) "shifted to calm ambient" (melotune) parents: [CMB-A], ancestors: [CMB-A] CMB-F (mesh) "took break, solved bug" (claude-code) parents: [CMB-D], ancestors: [CMB-A, CMB-D]
Six CMBs, three agents, one lineage chain. CMB-A was remixed by MeloTune into CMB-E (music adapted to observed fatigue). CMB-D was remixed by Claude Code into CMB-F (break taken, bug solved). MeloMove’s interventions demonstrably caused cross-agent action. The causal chain lives in the lineage edges, not in any single CMB’s text.
12.7 Full Flow
MeloMove receives an inbound CMB from Claude Code and runs the pipeline end-to-end:
Inbound CMB: "took break, solved bug in 5 minutes"
lineage.parents: [CMB-D]
lineage.ancestors: [CMB-A, CMB-D] ← full ancestor chain
MeloMove recognises CMB-A and CMB-D in ancestors — its own prior CMBs.
1. TRACE Retrieve CMB-A ("sedentary 2hrs") and CMB-D ("recommended stretch").
Build the subgraph:
CMB-A → CMB-E (melotune remixed) → ...
CMB-D → CMB-F (claude-code remixed: "took break, solved bug")
2. REASON MeloMove's LLM reasons on the subgraph:
"My sedentary observation was remixed by MeloTune (music adapted).
My stretch recommendation was remixed by Claude Code (break taken,
bug solved). My interventions are working. The user responds to
movement breaks."
→ This is Mesh Cognition — understanding the prior state didn't have.
3. ENCODE Synthetic Memory encodes the LLM's reasoning:
"interventions effective, user responds to breaks" → (h₁, h₂)
Weighted by MeloMove's αᶠ: mood=2.0, issue=1.5.
4. EVOLVE MeloMove's LNN processes (h₁, h₂):
Cognitive state evolves → next recommendation is more confident.
Agent produces new CMB: "recommend 15min walk — user responds well"
lineage.ancestors carries the chain forward. Graph grows. No agent was told what to do. MeloMove’s LLM reasoned on the remix subgraph and derived that its interventions work. Synthetic Memory transformed that understanding into CfC input. The LNN evolved cognitive state. The next CMB MeloMove produces is informed by knowledge that no single CMB contained — it was derived by reasoning on the graph.
12.8 Collective Query: the Ask → Synthesis Path
Sections 12.1–12.7 specify the inbound pipeline: how an agent turns received CMBs into evolved cognitive state. This section specifies the query-initiated path, where a question is posed to the mesh and answered by a synthesis that no single agent held. Both are Layer 5 operations — both produce derived understanding rather than raw memory — but they are distinct flows and MUST NOT be conflated.
Where §12.2 runs TRACE → REASON → ENCODE → EVOLVE for a single agent absorbing a signal, the Ask path runs SELF-SELECT → ADMIT → SYNTHESISE → CRYSTALLISE across many agents answering a shared question. The result is the realisation of collective intelligence: an answer composed from the sovereign contributions of the agents that hold relevant knowledge, cited to their sources, and written back into the graph so the mesh’s cognition compounds.
This path defines how the “growing remix graph” (§2, Overview) is queried, not just grown. The graph holds distributed knowledge latently; an Ask realises it into a knowing; the knowing re-enters the graph. §12.13 reconciles this with “The Graph Is Intelligence” (§15.6).
12.9 The Four Stages
An Ask is a CMB of type: "question" (tags
["question"]) posed to the mesh by the asking node,
carrying the question text in its focus and
issue fields, with
perspective: "ask". The
type and tags attributes
here (and throughout §12.9–§12.13) are store-envelope attributes of the memory
entry that wraps the CMB — the §6.1 storage-interface record — not CAT7 fields: the CMB
itself stays exactly seven fields (§8.2), and citations are carried in the envelope’s
metadata and in lineage.parents. Answering it proceeds in four
stages. The gathering phase — SELF-SELECT and ADMIT, performed per agent — MUST
complete for all agents before SYNTHESISE runs, and SYNTHESISE MUST complete before CRYSTALLISE.
Within the gathering phase, an agent’s self-selection and the admission of its contribution are
performed together, agent by agent; the ordering requirement is between phases, not a global barrier
between SELF-SELECT and ADMIT.
- SELF-SELECT — Every agent evaluates the question against its own store and decides, autonomously, whether it can contribute. There is no router: the asking node MUST NOT assign the question to any agent (the central invariant, §12.10). An agent that has no relevant grounding MUST self-select silent.
- ADMIT — Each contribution produced by a self-selecting agent is evaluated through SVAF
(§9) against the standing context. A contribution whose SVAF decision is
rejectedMUST be dropped and MUST NOT enter the synthesis set. Only non-rejected contributions become claims. - SYNTHESISE — A single synthesis step at the asking node composes the admitted contributions into one answer. Every sentence of the answer that asserts a fact MUST cite the contribution CMB (and through it, the source CMBs) it is drawn from. The synthesis MUST NOT introduce facts beyond its cited contributions.
- CRYSTALLISE — The synthesis MUST be written back as a CMB of
type: "synthesis"whoselineage.parentsare the question key together with every cited contribution and source. It re-enters the graph as a first-class, immutable node; subsequent Asks MAY condition on it.
12.10 Self-Selection (SELF-SELECT)
Self-selection is receiver-autonomous, mirroring SVAF admission (§9.2): just as no central authority decides what an agent absorbs, no central authority decides what an agent answers.
An agent’s self-selection MUST be computed only from its own store. In the reference implementation the grounding source for role r is the node’s own daemon CMBs (§6.1); a shared store MUST NOT be consulted, consistent with Hidden State Locality (§2.7) and the no-shared-store guarantee.
The procedure:
- Ground the question against the agent’s own store, producing a candidate set of source CMBs.
- If the candidate set is empty, the agent MUST self-select silent, with reason
"no grounding in own store". - Otherwise, score each source by relevance to the question under the agent’s own αf field-weight profile (§8.4, §12.4). Relevance is an αf-weighted combination of semantic and lexical match; the αf profile is the agent’s, not a global one.
- If the best-scoring source falls below
SELF_SELECT_THRESHOLD(default0.1, §19), the agent MUST self-select silent, with reason"grounding below relevance threshold". - Otherwise the agent produces a contribution (§12.11).
Silent self-selections SHOULD be recorded with their reason. Silence is information: the set of
agents that declined, and why, is part of the answer’s provenance (§12.12) and is available
to the synthesis step as silentLabels.
12.11 Contribution (ADMIT)
A contributing agent emits a contribution CMB — a grounded summary of the sources it selected, not a copy of them. The contribution:
- MUST carry
lineage.parentsset to the exact source CMB keys it grounded on. A contribution without lineage to its grounding MUST be rejected as non-conformant. - SHOULD draw only on sources within a bounded margin of the best-scoring source (reference implementation: within 60% of the top score, capped at 3 sources), so the contribution cites the grounding it actually used and no more.
- MUST be evaluated through SVAF (§9) against the standing context (prior sources and
syntheses gathered for this Ask) before it is accepted. If SVAF returns
rejected, the contribution MUST be dropped; it MUST be recorded as a rejected contribution with its drift, and MUST NOT be synthesised.
This places SVAF on the Ask-contribution path, not only the inbound-observation path: a contribution is a CMB like any other and crosses the same admission gate. The anti-echo guarantee (§15.7) therefore applies — a contribution that merely paraphrases standing context without new grounding is subject to rejection.
Each admitted contribution yields a claim: the contribution text together with citations to the contribution CMB key and the source keys it traces to (§12.12).
Non-normative: the reference implementation tags the contribution’s
lineage.method as "SVAF-v2".
The method string is informational and is not a conformance requirement.
12.12 Synthesis (SYNTHESISE) and Citation
A single synthesis step at the asking node composes the admitted contributions into one answer. There is exactly one synthesis per Ask; there is no distributed merge and no per-agent re-synthesis.
Two synthesis modes are defined:
| Mode | Condition | Guarantee |
|---|---|---|
| local-model | a local reasoning model is reachable | Prose is generated bound to each contribution’s CMB key; every asserted sentence MUST cite the contribution it is drawn from, and MUST NOT assert beyond the cited sources. |
| illustrative | no local model reachable | A clearly-labelled restatement of the grounded contributions. Facts MUST NOT be fabricated; the output MUST be marked as illustrative, and SHOULD state how model synthesis is enabled. |
In both modes the machine-readable answer MUST be claim-structured: one claim per line, each
citing [contributionKey, ...sourceKeys]. Citations MUST
bind to specific CMB ids in both modes. An implementation MUST NOT present a synthesis as
authoritative if it cannot bind its assertions to cited CMBs.
The distinction between modes is a distinction of generation quality, not of grounding discipline: the citation and no-fabrication requirements hold in both. This is the operational boundary of the layer’s honesty — the synthesis restates and composes grounded contributions; it does not manufacture claims.
12.13 Crystallisation (CRYSTALLISE) and Compounding
The synthesis MUST be written back into the graph as a CMB with:
type: "synthesis"(tags["synthesis"]), with CAT7intent: "synthesize"andperspective: "synthesis";- the composed prose carried in the CAT7
motivationfield (and copied into the entry’s metadata (store envelope, §6.1) alongside the structured, per-claim citations); lineage.parentsset to the question key plus every unique citation (contribution keys and source keys).
The written synthesis is immutable (§6, no in-place update) and re-enters the graph as an ordinary node. A later Ask MAY retrieve it and condition on it — the reference implementation surfaces a prior synthesis as a “builds on prior synthesis” claim — so the collective’s cognition compounds across queries rather than restarting each time.
This is what makes the Ask path a cognition operation and not a stateless query: each realised answer becomes part of the substrate the next answer is realised from.
12.14 The Readability Bound (Implementation Limitation)
The following is a limitation of the current reference grounding function, not an architectural constraint of the protocol. It is stated explicitly so implementers and reviewers can distinguish the two.
In the reference implementation, an agent self-selects (§12.10) by grounding against the daemon store readable on the asking node’s host. Consequently:
- A co-resident agent (its store readable on the asking host) can self-select and contribute directly.
- A remote sovereign agent (its store on another device) grounds empty on the asking host and therefore self-selects silent. Its knowledge still reaches the answer, but indirectly: once a local node has admitted that remote agent’s broadcast CMB (§9), the local node may ground on it and contribute it, cited back to the origin.
This bound follows from sovereignty (a node’s store never crosses the wire, §2.7) combined with the current grounding function reading only local daemon stores. It is the second half that is the limitation. A grounding function that selected over observed and admitted CMBs — the CMBs a node has already received and accepted from remote peers — rather than only locally-resident daemon reads would let remote agents self-contribute directly to an Ask, within the same sovereignty guarantee. That extension is compatible with the architecture and is marked here as open implementation work.
Conformance note (§17). An implementation conforms to the Ask path if it satisfies §12.9–12.13 (no router, own-store self-selection, SVAF admission of contributions, single cited synthesis, crystallisation with lineage). The grounding-source breadth of §12.14 is an implementation quality, not a conformance requirement; implementations SHOULD document which grounding breadth they provide.
12.15 Invariants
An implementation of the Ask path MUST preserve:
- I-Ask-1 (No router). The asking node MUST NOT assign the question to any agent; every agent self-selects independently.
- I-Ask-2 (Own-store grounding). Self-selection MUST be computed only from the agent’s own store; no shared store is consulted.
- I-Ask-3 (Admission before synthesis). Every contribution MUST pass SVAF; rejected contributions MUST NOT be synthesised.
- I-Ask-4 (Cited synthesis). Every asserted fact in the answer MUST cite the contribution and sources it derives from; the synthesis MUST NOT assert beyond its cited contributions.
- I-Ask-5 (Crystallisation with lineage). The synthesis MUST be written back as an
immutable
type: "synthesis"CMB whose parents are the question key plus every citation.
Status The Ask path is deployed (xMesh) and is the mechanism by which collective intelligence is realised and queried in the reference implementation. The linear-Gaussian convergence and identification results that characterise what a sovereign mesh can recover are proven in Mesh Inference (arXiv:2606.19537). The generation step within synthesis — whether a composed answer is grounded truth or coherent error — is the open frontier, the same open problem named for the non-linear closure; the citation and no-fabrication requirements of §12.12 bound it operationally but do not resolve it.
Related Coupling & SVAF (Layer 4) — the evaluation step that produces remixed CMBs fed into this pipeline.
Related Cognitive Memory Blocks — the 7-field structured atom and lineage format that makes context curation possible.
Related State Blending — what happens after Synthetic Memory encodes and the LNN evolves.