Layer 3 · capability
store
Data a part writes and another part reads. A store has one of five kinds (record, artifact, key-value, semantic, graph), a scope and a retention. A record is one entry of a store under a key: it is put, confirmed by the service that plays the store, and stays present until a newer revision supersedes it, it expires or it is deleted once the authority approved a request to delete it. The block records that a write happened, its key, the digest of its content and who wrote it, never the bytes; the bytes live behind the store's port. An artifact is a record of an artifact store: its content is never revised, its key is its digest, and its provenance (who recorded it, which artifacts it derives from) is required. Reads are recorded too: a get by key and a query, each with the digests of what was asked and answered and a count. A store names no part: the architecture names the store a part links to.
Depends on
Used by
- work · layer 5 · 8 references
- authority · layer 6 · 12 references
- derivation · layer 7 · 5 references
- workspace · layer 8 · 10 references
Entities
Query
One query of a store, recorded as the digest of what was asked, then the digest of the answer and the number of items in it. Requested until the service that plays the store answers or fails.
Identified by query_id (QueryId).
| field | type | meaning |
|---|---|---|
store_id | StoreId | |
form | QueryForm | |
question | Content | Digest of the query (predicate, prefix, vector or text, pattern, path). |
limit | optional integer | At most this many items in the answer. |
read_by | PrincipalId | |
requested_at | timestamp | |
answer | optional Content | Digest of the answer; present once Answered. |
count | optional integer | The number of items in the answer; present once Answered. |
answered_at | optional timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
storereferences Store (one, bystore_id)readerreferences Principal of principal (one, byread_by)
Lifecycle of Query
Answered, Failed.Read
One get of a store by key, recorded with what it returned. Requested until the service that plays the store returns the present record of the key or fails.
Identified by read_id (ReadId).
| field | type | meaning |
|---|---|---|
store_id | StoreId | |
key | string | |
read_by | PrincipalId | |
requested_at | timestamp | |
record_id | optional RecordId | The record returned; present once Returned. |
answered_at | optional timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
storereferences Store (one, bystore_id)recordreferences Record (one, byrecord_id)readerreferences Principal of principal (one, byread_by)
Lifecycle of Read
Failed, Returned.Record
One entry of a store under a key. It is Writing from the put until the service that plays the store confirms or fails it. A confirmed record is Present until a newer revision under its key supersedes it, it expires or it is deleted. A record of an artifact store is an artifact: its key is the digest of its content, and no revision supersedes it.
Identified by record_id (RecordId).
| field | type | meaning |
|---|---|---|
store_id | StoreId | |
kind | StoreKind | The kind of its store, kept on the record so a guard on it needs no second read. |
key | string | The key it is stored under; for an artifact the digest of its content. |
revision | integer | 1 for the first record under a key, one more for each record that supersedes the one before. |
content | Content | Digest, length and class of the content; for an artifact the class is a row a field registers. |
recorded_by | PrincipalId | Who put it; an agent is a principal of kind Agent. |
recorded_at | timestamp | |
derived_from | list of RecordId | The records it derives from; for an artifact the artifacts it is a new version of or is made from. |
supersedes | optional RecordId | The record under the same key that it replaces when confirmed; absent for the first record under a key. |
expires_at | optional timestamp | When the clock of the store expires it. The writer sets it from the store's retention: the time of the put plus its seconds for a Duration retention, none for Forever; a Run retention ends the record with the instance of the architecture. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
storereferences Store (one, bystore_id)predecessorreferences Record (one, bysupersedes)derived_fromreferences Record (many, byderived_from)recorderreferences Principal of principal (one, byrecorded_by)
Always holds: revision >= 1.
Lifecycle of Record
Deleted, Expired, Failed, Superseded.Store
One store of one kind. Open until retired; a retired store takes no new put.
Identified by store_id (StoreId).
| field | type | meaning |
|---|---|---|
name | Name | |
kind | StoreKind | |
scope | StoreScope | |
retention | Retention | |
retention_seconds | optional integer | How long a record is kept, in seconds; required by a Duration retention and read by no other. |
record_type | optional Name | The record type every record of a record store has, a row a field registers; present when the kind is Record. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Lifecycle of Store
Retired.Commands
AnswerQuery
Answer a query.
Called by: Store service.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Query | Unknown: No query of this identity was requested. |
invalid-count refused | (input. | Invalid: The count is negative or exceeds the query's limit. |
answered | otherwise | moves the Query Requested → Answered; emits Query |
wrong-state refused | the Query is in a state that does not allow it | Query: The query is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ConfirmPut
Confirm a put.
Called by: Store service.
| field | type |
|---|---|
record_id | RecordId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Record | Unknown: No record of this identity exists. |
confirmed | state == Writing and not (defined(supersedes)) | moves the Record Writing → Present; emits Record |
predecessor-missing refused | no Record for supersedes | Record: The record named is no longer present: it was superseded, expired or deleted, or it is still being written. A put that supersedes such a record lost a compare-and-set. |
predecessor-gone refused | the Record of supersedes has state != Present | Record: The record named is no longer present: it was superseded, expired or deleted, or it is still being written. A put that supersedes such a record lost a compare-and-set. |
confirmed-superseding | otherwise | moves the Record Writing → Present; moves each Record with record_ to Superseded; emits Record, Record |
wrong-state refused | the Record is in a state that does not allow it | Record: The record is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
CreateStore
Create a store.
Called by: Store owner.
| field | type |
|---|---|
name | Name |
kind | StoreKind |
scope | StoreScope |
retention | Retention |
retention_seconds | optional integer |
record_type | optional Name |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
seconds-invalid refused | defined(retention_ | Invalid: A Duration retention names no positive number of seconds. |
seconds-missing refused | retention == Duration and not (defined(retention_ | Invalid: A Duration retention names no positive number of seconds. |
record-type-missing refused | kind == Record and not (defined(record_ | Record: A record store names no record type. |
created | otherwise | creates a Store in Open; emits Store |
More columns: swipe horizontally, or focus the table and use the arrow keys.
DeleteRecord
Delete a record. The authority's approval deletes a present record; it leaves a tombstone. Deleting data cannot be undone, so no actor issues this command: a request of action class Delete that names the record (agentic.authority.DecideRequest, recorded as ApprovalRequired) awaits a human or a delegate, and its approval issues it through the binding delete-record-on-approval. A rejected request issues nothing: the record stays present.
| field | type | meaning |
|---|---|---|
record_id | RecordId | |
approved_by | Decider | Who approved the request to delete: a human, or a delegate under a delegation of approval. |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Record | Unknown: No record of this identity exists. |
deleted | otherwise | moves the Record Present → Deleted; emits Record |
wrong-state refused | the Record is in a state that does not allow it | Record: The record is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ExpireRecord
Expire a record. The clock of the store ends a record whose expiry has come.
Called by: Store service.
| field | type |
|---|---|
record_id | RecordId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Record | Unknown: No record of this identity exists. |
no-expiry refused | not (defined(expires_ | Not: The record has no expiry, or its expiry lies in the future. |
not-yet refused | expires_ | Not: The record has no expiry, or its expiry lies in the future. |
expired | otherwise | moves the Record Present → Expired; emits Record |
wrong-state refused | the Record is in a state that does not allow it | Record: The record is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
FailGet
Fail a get.
Called by: Store service.
| field | type |
|---|---|
read_id | ReadId |
reason | string |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Read | Unknown: No get of this identity was requested. |
failed | otherwise | moves the Read Requested → Failed; emits Read |
wrong-state refused | the Read is in a state that does not allow it | Read: The get is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
FailPut
Fail a put.
Called by: Store service.
| field | type |
|---|---|
record_id | RecordId |
reason | string |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Record | Unknown: No record of this identity exists. |
failed | otherwise | moves the Record Writing → Failed; emits Put |
wrong-state refused | the Record is in a state that does not allow it | Record: The record is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
FailQuery
Fail a query.
Called by: Store service.
| field | type |
|---|---|
query_id | QueryId |
reason | string |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Query | Unknown: No query of this identity was requested. |
failed | otherwise | moves the Query Requested → Failed; emits Query |
wrong-state refused | the Query is in a state that does not allow it | Query: The query is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
GetRecord
Get a record. A reader asks for the present record under a key; the get is recorded.
Called by: Reader.
| field | type |
|---|---|
store_id | StoreId |
key | string |
read_by | PrincipalId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-store refused | no Store for store_ | Unknown: No store of this identity exists. |
key-not-found refused | no Record with store_ | Key: No record is present under this key. |
requested | otherwise | creates a Read in Requested; emits Read |
More columns: swipe horizontally, or focus the table and use the arrow keys.
PutRecord
Put a record. A writer asks the store to hold content under a key with no record present or being written. The record is Writing, at revision 1, until the service that plays the store confirms or fails the put. A put into an artifact store creates an artifact.
Called by: Writer.
| field | type |
|---|---|
store_id | StoreId |
key | string |
content | Content |
recorded_by | PrincipalId |
derived_from | list of RecordId |
expires_at | optional timestamp |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-store refused | no Store for store_ | Unknown: No store of this identity exists. |
store-retired refused | the Store of store_ has state != Open | Store: The store is retired and takes no new put. |
artifact-not-at-digest refused | the Store of store_ has kind == Artifact and input. | Artifact: A put into an artifact store names a key other than the digest of its content. |
key-taken refused | a Record with store_ | Key: A record is present or being written under this key and the put does not name it as the one it supersedes. In an artifact store, the same content is already stored or being stored. |
requested | otherwise | creates a Record in Writing; emits Put |
More columns: swipe horizontally, or focus the table and use the arrow keys.
QueryStore
Query a store. A reader asks a store a question of a form its kind answers; the query is recorded as digests.
Called by: Reader.
| field | type |
|---|---|
store_id | StoreId |
form | QueryForm |
question | Content |
limit | optional integer |
read_by | PrincipalId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
invalid-limit refused | defined(limit) and limit < 1 | Invalid: The limit is less than 1. |
unknown-store refused | no Store for store_ | Unknown: No store of this identity exists. |
form-not-served refused | the Store of store_ has (kind == Record and input. | Query: The store's kind does not answer a query of this form. |
requested | otherwise | creates a Query in Requested; emits Query |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RetireStore
Retire a store.
Called by: Store owner.
| field | type |
|---|---|
store_id | StoreId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Store | Unknown: No store of this identity exists. |
retired | otherwise | moves the Store Open → Retired; emits Store |
wrong-state refused | the Store is in a state that does not allow it | Store: The store is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ReturnRecord
Return a record.
Called by: Store service.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Read | Unknown: No get of this identity was requested. |
unknown-record refused | no Record for record_ | Unknown: No record of this identity exists. |
not-present refused | the Record of record_ has state != Present | Record: The record named is no longer present: it was superseded, expired or deleted, or it is still being written. A put that supersedes such a record lost a compare-and-set. |
returned | otherwise | moves the Read Requested → Returned; emits Record |
wrong-state refused | the Read is in a state that does not allow it | Read: The get is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ReviseRecord
Revise a record. A writer puts a new revision under the key of a present record, in the same store. It is a compare-and-set: refused when that record is no longer present. The new record is Writing until the put is confirmed, which supersedes the old one. An artifact is never revised.
Called by: Writer.
| field | type |
|---|---|
supersedes | RecordId |
revision | integer |
content | Content |
recorded_by | PrincipalId |
derived_from | list of RecordId |
expires_at | optional timestamp |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
revision-too-low refused | revision < 2 | Invalid: The revision is not 1 for a first record, or not one more than the record it supersedes. |
unknown-record refused | no Record for supersedes | Unknown: No record of this identity exists. |
artifact-revised refused | the Record of supersedes has kind == Artifact | Artifact: An artifact is never revised; a new version is a new artifact that derives from it. |
not-present refused | the Record of supersedes has state != Present | Record: The record named is no longer present: it was superseded, expired or deleted, or it is still being written. A put that supersedes such a record lost a compare-and-set. |
revision-not-next refused | the Record of supersedes has input. | Invalid: The revision is not 1 for a first record, or not one more than the record it supersedes. |
requested | otherwise | creates a Record in Writing; emits Revision |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Events
| event | fields | emitted by |
|---|---|---|
PutFailed | record_ RecordId, reason string, at timestamp | Fail |
PutRequested | record_ RecordId, store_ StoreId, key string, revision integer, content Content, recorded_ PrincipalId, derived_ list of RecordId, expires_ optional timestamp, at timestamp | Put |
QueryAnswered | query_ QueryId, answer Content, count integer, at timestamp | Answer |
QueryFailed | query_ QueryId, reason string, at timestamp | Fail |
QueryRequested | query_ QueryId, store_ StoreId, form QueryForm, question Content, limit optional integer, read_ PrincipalId, at timestamp | Query |
ReadFailed | read_ ReadId, reason string, at timestamp | Fail |
ReadRequested | read_ ReadId, store_ StoreId, key string, read_ PrincipalId, at timestamp | Get |
RecordDeleted | record_ RecordId, approved_ Decider, at timestamp | Delete |
RecordExpired | record_ RecordId | Expire |
RecordPut | record_ RecordId, store_ StoreId, key string, revision integer, content Content, recorded_ PrincipalId, at timestamp | Confirm |
RecordReturned | read_ ReadId, record_ RecordId, content Content, at timestamp | Return |
RecordSuperseded | record_ optional RecordId, superseded_ RecordId, at timestamp | Confirm |
RevisionRequested | record_ RecordId, supersedes RecordId, revision integer, content Content, recorded_ PrincipalId, derived_ list of RecordId, expires_ optional timestamp, at timestamp | Revise |
StoreCreated | store_ StoreId, name Name, kind StoreKind, scope StoreScope, retention Retention, retention_ optional integer, record_ optional Name | Create |
StoreRetired | store_ StoreId | Retire |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
ArtifactsArtifacts | each Record with kind == Artifact | record_ RecordId, store_ StoreId, content Content, recorded_ PrincipalId, recorded_ timestamp, derived_ list of RecordId, state State |
PresentRecordsPresent records | each Record with state == Present | record_ RecordId, store_ StoreId, key string, revision integer, content Content, expires_ optional timestamp |
QueriesQueries | each Query | query_ QueryId, store_ StoreId, form QueryForm, question Content, limit optional integer, read_ PrincipalId, requested_ timestamp, answer optional Content, count optional integer, answered_ optional timestamp, state State |
ReadsReads | each Read | read_ ReadId, store_ StoreId, key string, read_ PrincipalId, requested_ timestamp, record_ optional RecordId, answered_ optional timestamp, state State |
RecordsRecords | each Record | record_ RecordId, store_ StoreId, kind StoreKind, key string, revision integer, content Content, recorded_ PrincipalId, recorded_ timestamp, derived_ list of RecordId, supersedes optional RecordId, expires_ optional timestamp, state State |
StoresStores | each Store | store_ StoreId, name Name, kind StoreKind, scope StoreScope, retention Retention, retention_ optional integer, record_ optional Name, state State |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
QueryFormHow a query asks. Predicate filters records by their fields, with order and limit (a record store); Listing lists artifacts by class or provenance (an artifact store); Prefix scans keys by a prefix (a key-value store); Nearest finds the k items nearest a vector or a text, with a filter over the payload (a semantic store); Pattern matches a pattern and Path traverses a path (a graph store). | one of | Predicate, Listing, Prefix, Nearest, Pattern, Path |
RetentionHow long a record is kept. Duration keeps it for a declared number of seconds from its put, Run until the instance of the architecture ends, Forever until it is deleted. | one of | Duration, Run, Forever |
StoreKindWhat a store holds. Record holds typed records of one declared record type, each under a key and revised by a newer put; Artifact holds immutable content addressed by its digest, with provenance; KeyValue holds an opaque value per key, with an optional expiry; Semantic holds items with a vector and a payload; Graph holds nodes and typed edges as facts, a put asserts one and a delete retracts it. | one of | Record, Artifact, Key, Semantic, Graph |
StoreScopeWho shares a store. Part gives one store to each instance of one part (an agent's memory), Architecture one store to every part that links to it, External a store that outlives the architecture and is shared beyond it; which one and where is the binding's concern. | one of | Part, Architecture, External |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
4 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.
Correctness
| KPI | unit | better | gate | status |
|---|---|---|---|---|
deleted_without_approvalRecords deleted before their expiry without a principal's approval. How: RecordDeleted events of a record that had not expired, with no ApprovalGranted for that deletion before it. Deleting data cannot be undone. Must be 0. | count | lower | gate | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Quality
| KPI | unit | better | gate | status |
|---|---|---|---|---|
store_put_failure_shareShare of puts into a store that the store service failed. How: PutFailed events divided by PutRequested events, per store. A failed put stores nothing and leaves the record it would supersede present. | share | lower | – | planned source: design |
store_read_secondsMedian time from a get or query of a store to its answer. How: Seconds from ReadRequested to RecordReturned and from QueryRequested to QueryAnswered, median per store. Failed reads are counted apart. | seconds | lower | – | planned source: design |
records_never_readShare of records that ended without being read once. How: Records put that expired, were deleted or were superseded with no RecordReturned naming them, divided by records that ended. A store written and never read costs writes for nothing. | share | lower | – | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Settings
The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.
A part store:
| setting | type | unit | default | contract | what |
|---|---|---|---|---|---|
kind | enum Store: record, artifact, key_, semantic, graph | required | What the store holds: records of one record type, artifacts, a value per key, items with a vector, or graph facts. | ||
scope | enum Store: part, architecture, external | architecture | Who shares the store: one store in each copy of the part its per names (part), one store for every part that links to it (architecture), or a store outside the architecture that outlives it (external), which the sandbox of each part that reaches it names in its egress. | ||
retention | string | forever | How long a record is kept: a duration from its put (30d), run until the instance of the architecture ends, or forever until it is deleted. | ||
vectors | enum: supplied, made | supplied | On a semantic store: whether the writer supplies each item's vector or the store makes it with a model call, over its own model_call link to a gateway or a model. | ||
count | integer of at least 1 | 1 | How many copies of the part run. | ||
per | part | One copy of the part for each copy of the named part. | |||
notes | notes | Free notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it. |
More columns: swipe horizontally, or focus the table and use the arrow keys.