Shapes you will see everywhere
{ "generation": "3", "sequence": "41" }
{ "branch": "main", "version": null }
{ "rows": 100, "bytes": 65536 }
{ "collection": "patients", "document_id": "p0" }
Writing
define_collection
Define a collection and its shape on a branch.
request_idbranchexpectedcollectionschema
schema is null, a boolean or an object.
put_records
Put one or more records on a branch atomically.
request_idbranchexpectedcollectionrecords
Each record is a document_id and a document.
delete_record
Delete a record and its incident edges and vectors.
request_idbranchexpectedrecord
link_records
Link two records on a branch.
request_idbranchexpectedrelationfromtoproperties
unlink_records
Remove a link between two records on a branch.
request_idbranchexpectedrelationfromto
create_branch
Fork a branch from a retained version.
request_idbranchexpectednamefrom
branch is the source; its expected head guards the fork.
merge_branch
Merge a reviewed branch, at the version its review read, into the branch it was forked from.
request_idbranchexpectedfromreviewed
reviewed must equal the current source head; the target must still match the source fork base. Read the review before supplying its version.
Reading
run_query
Read one bounded page from a query.
selectionquerypage parameters?after?
describe_store
Describe one captured store version in bounded pages: branches, collections, relations and vector fields.
selectionpageafter
read_history
Read retained branch snapshots, or a record at a captured version.
selectionpage record?after?
review_branch
Read bounded branch differences, preparation states and dangling findings.
selectionpageafter
after is an object of review cursors, initially {}. Read every page before merging.
A write, as an agent sends it
{
"request_id": "admit-p2-2026-10-13",
"branch": "ward-4b-intake",
"expected": { "generation": "1", "sequence": "9" },
"collection": "patients",
"records": [
{ "document_id": "p2", "document": { "name": "Cai", "ward": "4B", "admitted": 20261013 } }
]
}