| 34 |
64
|
|
An unattributed system memory cannot be challenged, corrected, or discounted.
|
| 35 |
65
|
|
Every decision below follows from those three failure modes.
|
| 36 |
66
|
|
|
| 37 |
|
- |
The one-sentence design: **a system memory is an ordinary signed engram that
|
| 38 |
|
- |
has passed an evidence-backed admission gate, carries a transparency tier of
|
| 39 |
|
- |
`ledger` or above, distributes on the existing engram sync seam, and can be
|
| 40 |
|
- |
challenged and superseded by further signed events — never edited.**
|
|
67
|
+ |
The one-sentence design: **a system memory is an ordinary memory row that has
|
|
68
|
+ |
passed an evidence-backed admission gate, carries a transparency tier of
|
|
69
|
+ |
`ledger` or above, is served from the one shared store every client already
|
|
70
|
+ |
reads, and can be challenged and superseded by further records — never
|
|
71
|
+ |
edited.**
|
| 41 |
72
|
|
|
| 42 |
73
|
|
## 2. What stays unchanged
|
| 43 |
74
|
|
|
| 44 |
|
- |
The system bucket adds no new event kind, no new store, and no new channel.
|
| 45 |
|
- |
It reuses, unmodified:
|
| 46 |
|
- |
|
| 47 |
|
- |
- **The engram event model** (`memory/engram.ts`): NIP-AE `kind:30174`
|
| 48 |
|
- |
addressable events, the OpenAgents companion body, the hard-unsafe
|
| 49 |
|
- |
redaction gate before signing, content digests, and the
|
| 50 |
|
- |
`supersedes` correction path. A correction appends; it never edits.
|
| 51 |
|
- |
- **The projection** (`memory/projection.ts`): derived, idempotent,
|
| 52 |
|
- |
order-independent; unresolved supersession chains are refused whole.
|
| 53 |
|
- |
- **The ranking module** (`memory/ranking.ts`): deterministic cosine top-K,
|
| 54 |
|
- |
salience recall, token-budget packing.
|
| 55 |
|
- |
- **The sync seam** (`memory/sync.ts`): `EngramTransport`,
|
| 56 |
|
- |
`EngramSyncQueue`, local-first, never blocks a turn.
|
|
75
|
+ |
The system bucket adds no new store and no second channel. It reuses,
|
|
76
|
+ |
unmodified:
|
|
77
|
+ |
|
|
78
|
+ |
- **The memory row model** (#51): account-scoped rows carrying a bucket, a
|
|
79
|
+ |
body, a source reference, and a supersession pointer. A correction inserts a
|
|
80
|
+ |
new row and points the old one at it; it never edits in place.
|
|
81
|
+ |
- **Derived status.** A memory's effective state is computed from the records
|
|
82
|
+ |
that reference it, not read from a field the author set. The derivation is
|
|
83
|
+ |
pure, idempotent, and order-independent, and an unresolved supersession
|
|
84
|
+ |
chain is refused whole.
|
|
85
|
+ |
- **The ranking discipline**: deterministic top-K, salience recall, and
|
|
86
|
+ |
token-budget packing, with stable tie-breaks so equal inputs give equal
|
|
87
|
+ |
notes. Retrieval targets embedding search per the workspace retrieval
|
|
88
|
+ |
invariant; a full-text slice is a marked, swappable stand-in.
|
|
89
|
+ |
- **The redaction gate**: the hard-unsafe rule set that refuses a write
|
|
90
|
+ |
outright, applied at the write boundary before any row lands.
|
| 57 |
91
|
|
- **The transparency vocabulary**: `dark` (nothing public), `pulse`
|
| 58 |
92
|
|
(metadata only), `ledger` (content and metadata), `glass` (full access).
|
| 59 |
93
|
|
|
| 60 |
|
- |
What the bucket adds is one companion extension (section 3), three event
|
| 61 |
|
- |
roles (admission, challenge, refutation — sections 4 and 5), one relay
|
| 62 |
|
- |
namespace on the coming Nostr transport (section 6), and recall caps
|
| 63 |
|
- |
(section 7).
|
| 64 |
|
- |
|
| 65 |
|
- |
## 3. Event shape
|
| 66 |
|
- |
|
| 67 |
|
- |
A system memory is an engram whose companion body carries a `system` block.
|
| 68 |
|
- |
The companion schema id bumps to name the extension; events without the block
|
| 69 |
|
- |
are user- or learned-bucket engrams and nothing about them changes.
|
| 70 |
|
- |
|
| 71 |
|
- |
```jsonc
|
| 72 |
|
- |
// content of a kind:30174 event, after redaction, before signing
|
| 73 |
|
- |
{
|
| 74 |
|
- |
"slug": "sys:gateway-402-retired-model",
|
| 75 |
|
- |
"value": "A 402 from the inference gateway usually means the default model was retired upstream. Check gateway status before bisecting local lanes.",
|
| 76 |
|
- |
"openagents": {
|
| 77 |
|
- |
"schema": "openagents.agent_experience_memory.nip_ae_companion.v2",
|
| 78 |
|
- |
"admission": "candidate", // existing field; see section 4
|
| 79 |
|
- |
"entityId": "inference-gateway",
|
| 80 |
|
- |
"contentDigest": "sha256:…",
|
| 81 |
|
- |
"sourceEventRefs": [
|
| 82 |
|
- |
{ "eventId": "…64 hex…", "role": "tool_result" }
|
| 83 |
|
- |
],
|
| 84 |
|
- |
"relations": [],
|
| 85 |
|
- |
"derivedFromSlugs": [],
|
| 86 |
|
- |
"supersedes": "…64 hex…", // optional, existing path
|
| 87 |
|
- |
"system": {
|
| 88 |
|
- |
"schema": "openagents.system_memory.v1",
|
| 89 |
|
- |
"tier": "ledger", // "ledger" | "glass"; never lower
|
| 90 |
|
- |
"asOf": "2026-08-25", // the date the claim was observed true
|
| 91 |
|
- |
"evidenceRefs": [ // at least one, required
|
| 92 |
|
- |
{
|
| 93 |
|
- |
"kind": "receipt", // "receipt" | "engram" | "url"
|
| 94 |
|
- |
"ref": "https://openagents.com/receipts/…",
|
| 95 |
|
- |
"digest": "sha256:…" // required for kind "url"
|
| 96 |
|
- |
}
|
| 97 |
|
- |
]
|
| 98 |
|
- |
}
|
| 99 |
|
- |
}
|
| 100 |
|
- |
}
|
| 101 |
|
- |
```
|
|
94
|
+ |
What the bucket adds is a set of system fields on the row (section 3), three
|
|
95
|
+ |
record roles — admission, challenge, and refutation (sections 4 and 7.3) —
|
|
96
|
+ |
and recall caps (section 7).
|
|
97
|
+ |
|
|
98
|
+ |
## 3. Record shape
|
|
99
|
+ |
|
|
100
|
+ |
A system memory is a row in the shared memory store whose bucket is `system`
|
|
101
|
+ |
and which carries the system-only fields below. Rows in the `user` and
|
|
102
|
+ |
`learned` buckets are unchanged and carry none of them. This shape replaces
|
|
103
|
+ |
the `kind:30174` companion block the spec first carried; the fields and the
|
|
104
|
+ |
reasons for them are the same, restated as columns.
|
|
105
|
+ |
|
|
106
|
+ |
| Field | Values | Notes |
|
|
107
|
+ |
| --- | --- | --- |
|
|
108
|
+ |
| `bucket` | `user`, `learned`, `system` | `system` selects this shape |
|
|
109
|
+ |
| `slug` | string | `sys:` prefix for system memories |
|
|
110
|
+ |
| `body` | text | the redacted claim, in plain language |
|
|
111
|
+ |
| `author_id` | account reference | the account that wrote the row |
|
|
112
|
+ |
| `entity` | string, optional | what the claim is about |
|
|
113
|
+ |
| `tier` | `ledger`, `glass` | never lower; see section 5 |
|
|
114
|
+ |
| `as_of` | date | the date the claim was observed true |
|
|
115
|
+ |
| `admission` | `candidate`, `admitted`, `rejected` | the author's claim only; see section 4 |
|
|
116
|
+ |
| `superseded_by_id` | row reference, optional | the only correction path |
|
|
117
|
+ |
| `source_refs` | list of `{ref, role}` | roles include the three added in section 4 |
|
|
118
|
+ |
| `evidence_refs` | non-empty list of `{kind, ref, digest}` | `kind` is `receipt`, `memory`, or `url` |
|
|
119
|
+ |
|
|
120
|
+ |
An example body: "A 402 from the inference gateway usually means the default
|
|
121
|
+ |
model was retired upstream. Check gateway status before bisecting local
|
|
122
|
+ |
lanes." — slug `sys:gateway-402-retired-model`, entity `inference-gateway`,
|
|
123
|
+ |
tier `ledger`, `as_of` 2026-08-25, one evidence ref of kind `receipt`.
|
| 102 |
124
|
|
|
| 103 |
125
|
|
Field decisions, and why:
|
| 104 |
126
|
|
|
| 105 |
|
- |
- **`source` is the event's own `pubkey`.** No separate source field: the
|
| 106 |
|
- |
signature already binds author to claim, and a claim nobody signed is a
|
| 107 |
|
- |
claim nobody can be held to. Unsigned or unverifiable events are never
|
| 108 |
|
- |
projected (existing behavior).
|
| 109 |
|
- |
- **`asOf` is distinct from `created_at`.** `created_at` orders the chain;
|
| 110 |
|
- |
`asOf` dates the claim. Recall renders `asOf` so a stale truth reads as
|
| 111 |
|
- |
dated, the same way a knowledge-base stance carries its review date.
|
| 112 |
|
- |
- **`evidenceRefs` is required and non-empty.** A system memory without
|
|
127
|
+ |
- **The source is the writing account.** No separate source field: the server
|
|
128
|
+ |
authenticates the writer and records the account on the row, so the store
|
|
129
|
+ |
binds author to claim the way a signature did, and a claim nobody is
|
|
130
|
+ |
attributed with is a claim nobody can be held to. An unattributed row is
|
|
131
|
+ |
never surfaced.
|
|
132
|
+ |
- **`as_of` is distinct from the insert time.** The insert time orders the
|
|
133
|
+ |
chain; `as_of` dates the claim. Recall renders `as_of` so a stale truth
|
|
134
|
+ |
reads as dated, the same way a knowledge-base stance carries its review
|
|
135
|
+ |
date.
|
|
136
|
+ |
- **`evidence_refs` is required and non-empty.** A system memory without
|
| 113 |
137
|
|
evidence is an assertion, and assertions do not enter the shared store
|
| 114 |
|
- |
(section 4). `kind: "receipt"` points at a forge receipt or signed event;
|
| 115 |
|
- |
`kind: "engram"` points at a prior admitted engram; `kind: "url"` points at
|
| 116 |
|
- |
public material and must carry a content digest so the evidence cannot be
|
| 117 |
|
- |
swapped after admission.
|
| 118 |
|
- |
- **`tier` is `ledger` or `glass`.** By definition a system memory's value
|
| 119 |
|
- |
reaches every agent, which is content-plus-metadata — `ledger`. `glass`
|
|
138
|
+ |
(section 4). `kind: "receipt"` points at a forge receipt; `kind: "memory"`
|
|
139
|
+ |
points at a prior admitted row; `kind: "url"` points at public material and
|
|
140
|
+ |
must carry a content digest so the evidence cannot be swapped after
|
|
141
|
+ |
admission.
|
|
142
|
+ |
- **`tier` is `ledger` or `glass`.** By definition a system memory's body
|
|
143
|
+ |
reaches every agent, which is content plus metadata — `ledger`. `glass`
|
| 120 |
144
|
|
additionally asserts that every evidence ref resolves publicly. `dark` and
|
| 121 |
145
|
|
`pulse` are not valid values here: a claim that cannot ship its content is
|
| 122 |
|
- |
not a system memory (section 5 covers what happens to it instead).
|
| 123 |
|
- |
- **`supersedes` is the only correction path.** Reused as-is from the engram
|
| 124 |
|
- |
model. Only the original author or a steward (section 4) may sign a
|
| 125 |
|
- |
superseding event for a system slug; the projection refuses a superseding
|
| 126 |
|
- |
event signed by anyone else. Anyone else who disagrees files a challenge
|
| 127 |
|
- |
(section 5.2).
|
|
146
|
+ |
not a system memory. Section 5 covers what happens to it instead.
|
|
147
|
+ |
- **Supersession is the only correction path.** Only the original author or a
|
|
148
|
+ |
steward (section 4) may write a superseding row for a system slug; the API
|
|
149
|
+ |
refuses a superseding write from anyone else, and the derivation ignores one
|
|
150
|
+ |
that reaches the table by another route. Anyone else who disagrees files a
|
|
151
|
+ |
challenge (section 7.3).
|
| 128 |
152
|
|
- **Slug namespace.** System slugs carry the `sys:` prefix. The prefix is a
|
| 129 |
153
|
|
routing convention, not a security boundary — the security boundary is the
|
| 130 |
|
- |
admission status and the signature.
|
|
154
|
+ |
admission status and the write authorization.
|
| 131 |
155
|
|
|
| 132 |
156
|
|
## 4. Admission
|
| 133 |
157
|
|
|