Knowledge

cells, entities, types, memory and the corpus

cellv1.0.0

a finding corrected or confirmed, or what rests on it refreshed

The cells directly, each addressable by the ids any answer cites: a cell says which passages back it, a faction says which lines of which file it was cut from.

GET/v1/projects/{projectId}/cellsAPI keyTeam

Read the spine directly

Page the project's derived cells, optionally scoped to one file, entity, or parent cell.

A cell is one derived claim with its provenance attached. This is the raw graph read under the ranked retrieval above — reach for it when you want a selection's cells rather than a ranked answer.

Every read pages on `X-Next-Cursor`, the scoped ones (`fileId`, `entityId`, `factionId`, `parentCellId`) included; follow the cursor to read a selection whole. A scoped read's first page carries the selection's count on `X-Total-Count`, left off where it cannot be exact: a `factionId` or `fileId` read narrowed by `entityId`, and a `fileId` read whose files hold more than 30 sections.

`schemaId` pages the cells a type's fields were filled into; with `entityId` beside it the page narrows to that one entity's filled cell, which carries the type's field names as keys plus `schemaVersion`.

The first page carries the ancestor-visibility union, so a child project sees its parents' cells inline, each row keeping its own `projectId`.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe project to read.

Query parameters

FieldTypeRequiredDescription
fileIdstringoptionalPage the cells derived from these files, comma-separated.
entityIdstringoptionalPage the cells backing this entity; beside `factionId` or `fileId` it narrows them to the cells that also back it.
schemaIdstringoptionalPage the cells filled against this type entity's fields; add `entityId` to read one entity's.
parentCellIdstringoptionalPage this cell's children.
cursorstringoptionalCursor from a previous page.
limitintegeroptionalPage size, capped at 200.
Request · curl
curl -X GET "https://runlogai.com/runlogapi/projects/p7Kd2mQx/cells?fileId=4mHqZ1nR8vTbC0sWyLpAeGkJ3dXfU6iO2rN" \
  -H "Authorization: Bearer $RUNLOG_API_KEY" \
  -H "X-Project-Id: p7Kd2mQx"
Response · 200
[
  {
    "cellId": "c_7Hq2Rm",
    "confidence": 0.92,
    "description": "- Router.send retries once on a 5xx before surfacing the transport error.",
    "entityIds": [
      "e_2Kd9Lp"
    ],
    "factionIds": [
      "f_8Rk2Vm"
    ],
    "projectId": "p7Kd2mQx",
    "title": "Router.send retries once",
    "updatedAt": "2026-08-07T18:24:31Z"
  }
]

Errors

StatuserrorWhen
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401invalid API keyThe `Authorization` header is missing, malformed, or names a revoked key.
400name the target project via the X-Project-Id header or projectId queryNo project was named and the key is not bound to one.
429rate limit exceededYou passed 60 requests/minute on this key. `Retry-After` carries the seconds to wait.
500internal errorThe service failed to serve the request. Retry with backoff; the cause is logged server-side against your request.

Answers Cell[]: One claim, figure, rule or passage Runlog read out of the project's files, with the ids of what it rests on.

FieldTypeRequiredDescription
cellIdstringrequiredThe cell's id: what an answer cites.
projectIdstringrequiredThe project whose memory holds the cell; a cell a parent project lends keeps its own project's id.
titlestringoptionalA short label for the cell, under ten words.
descriptionstringoptionalWhat the cell states, as bullet lines.
factionIdsstring[]optionalThe source passages the cell was read from, at most ten; GET /projects/{projectId}/factions resolves each to its file and line span.
entityIdsstring[]optionalThe entities the cell names, at most ten.
confidencenumberoptionalHow sure Runlog is of the cell, from 0 to 1; 1 once a person confirmed or edited it.
parentCellIdstringoptionalThe cell this one refines, when it is a child.
childCellIdsstring[]optionalThe cells that refine this one.
dynamicFieldsobjectoptionalThe typed fields read into the cell, by name; a cell filled against a type's schema carries that type's field names.
versionintegeroptionalRaised on every write to the cell.
createdAtstringoptionalWhen the cell was first written, as an RFC 3339 timestamp.
updatedAtstringoptionalWhen the cell last changed, as an RFC 3339 timestamp.
GET/v1/projects/{projectId}/factionsAPI keyTeam

Resolve cited spans

Resolve faction ids to the file and the line span each was cut from — the place behind a citation.

`factionIds` is the form a cited answer uses: pass the ids a turn cited and the whole set comes back in one batched read, unpaginated and in no guaranteed order — match the rows back by `factionId`.

`sourceLocation` is the anchor. A code or text faction carries `lineStart`/`lineEnd`, a PDF one `pdfPageStart`/`pdfPageEnd`, a media one `audioStartMs`/`videoStartMs`. A dimension that does not apply to the asset is absent rather than zero, so a missing span is readable as "not anchored" rather than as line 0.

`fileIds` is derived reach, not a stored field: it is the files whose cells reference this faction. A faction that no cell has reached yet comes back with none.

A file-scoped read (`fileId`) is one-shot and complete, bounded by the file; the unscoped read and the `categoryEntityId` and `entityId` reads page on `X-Next-Cursor`, an `entityId` read's first page counting the entity's sections on `X-Total-Count`.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe project to read.

Query parameters

FieldTypeRequiredDescription
factionIdsstringoptionalComma-separated faction ids — the cited set, resolved complete and unpaginated in one read.
fileIdstringoptionalReturn every faction this file's cells reach, complete and unpaginated.
categoryEntityIdstringoptionalPage the factions read as this type entity, on `X-Next-Cursor`.
entityIdstringoptionalPage the factions this entity's reading named.
factionTypestringoptionalKeep only this kind, e.g. `code_unit`, `text`, `table`.
cursorstringoptionalCursor from a previous page.
limitintegeroptionalPage size, capped at 200.
Request · curl
curl -X GET "https://runlogai.com/runlogapi/projects/p7Kd2mQx/factions?factionIds=fa_3Qm8Xz,fa_9Rt2Kd" \
  -H "Authorization: Bearer $RUNLOG_API_KEY" \
  -H "X-Project-Id: p7Kd2mQx"
Response · 200
[
  {
    "factionId": "fa_3Qm8Xz",
    "factionType": "code_unit",
    "fileIds": [
      "4mHqZ1nR8vTbC0sWyLpAeGkJ3dXfU6iO2rN"
    ],
    "inferredType": "text/code/python",
    "sourceLocation": {
      "lineEnd": 131,
      "lineStart": 88
    }
  }
]

Errors

StatuserrorWhen
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401invalid API keyThe `Authorization` header is missing, malformed, or names a revoked key.
400name the target project via the X-Project-Id header or projectId queryNo project was named and the key is not bound to one.
429rate limit exceededYou passed 60 requests/minute on this key. `Retry-After` carries the seconds to wait.
500internal errorThe service failed to serve the request. Retry with backoff; the cause is logged server-side against your request.
project-write

Refresh what rests on this

cell_reconcile: Refresh everything the project worked out from one piece of what it knows, against the newest content.Teamruns on a thread, stream it

FieldTypeRequiredDescription
cellIdstringrequiredwhat the refresh starts from

Contract Runs the confidence cascade from the named cell; it never edits the cell's content.

project-write

Correct or confirm a finding

cell_edit: Record what the person said about one finding — a changed title, text or typed values, or their confirmation that it is correct as it stands. Values land beside what the file says, under the person's name and the moment they said it, and everything derived from the finding is refreshed.Teamruns on a thread, stream it

FieldTypeRequiredDescription
cellIdstringrequiredthe finding to correct or confirm
actionstringoptional'edit' to change it, or 'approve' to confirm it as it stands; 'edit' by default
titlestringoptionalfor 'edit': the finding's new title
descriptionstringoptionalfor 'edit': the finding's new text
fieldsobjectoptionalfor 'edit': the typed values to set on it, as name to value
messageIdstringrequiredthe person's own message in this thread that says the finding is wrong or right

Contract Only a person's own message authorises the change; citing a reply of Ro's is refused.

Contract An edit or an approval moves the finding's confidence toward the person's by the share of it they spoke to, and starts the refresh of everything derived from it; that refresh runs after the answer, so nothing in the same turn may read its result.

Contract An edit changes only the keys it names and leaves the finding's other values alone; a reserved key is refused rather than written.

entityv1.0.0

the project's entities: list, correct, set a role, edit a type's fields, view and write any type's records

The people, companies, products and types the project's cells name. Every type is itself an entity carrying the schema each entity of that type is read into; editing it bumps its version, and every entity of the type is re-read against it the next time new material mentions it.

GET/v1/projects/{projectId}/entitiesAPI keyTeam

Read the entity graph

Page the entities the project's cells resolve to — the nodes a code graph hangs off.

Only entities backing at least one cell are returned, so the graph never carries nodes nothing rests on.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe project to read.

Query parameters

FieldTypeRequiredDescription
entityTypestringoptionalPage only the entities of this type, e.g. `Person`; `Category` lists the types themselves.
rolestringoptionalPage only the entities carrying this role, e.g. `Self`, `Competitor`, `Lead`, `AE`. Combines with `entityType`, and stands alone for every entity carrying the role whatever its type.
qstringoptionalReturn the entities whose names best match these words, best first, up to `limit`; unpaginated.
cursorstringoptionalCursor from a previous page.
limitintegeroptionalPage size, capped at 200.
Request · curl
curl -X GET "https://runlogai.com/runlogapi/projects/p7Kd2mQx/entities" \
  -H "Authorization: Bearer $RUNLOG_API_KEY" \
  -H "X-Project-Id: p7Kd2mQx"
Response · 200
[
  {
    "confidence": 0.97,
    "entityId": "e_2Kd9Lp",
    "entityType": "Component",
    "name": "CheckoutClient",
    "projectId": "p7Kd2mQx"
  }
]

Errors

StatuserrorWhen
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401invalid API keyThe `Authorization` header is missing, malformed, or names a revoked key.
400name the target project via the X-Project-Id header or projectId queryNo project was named and the key is not bound to one.
429rate limit exceededYou passed 60 requests/minute on this key. `Retry-After` carries the seconds to wait.
500internal errorThe service failed to serve the request. Retry with backoff; the cause is logged server-side against your request.

Answers Entity[]: A person, company, product or other thing the project's cells name.

FieldTypeRequiredDescription
entityIdstringrequiredThe entity's id, which a cell's `entityIds` carries.
projectIdstringrequiredThe project whose memory holds the entity.
namestringrequiredThe entity's name as the project knows it.
entityTypestringoptionalThe entity's type, as `Person` or `Company`; `Category` marks an entity that is itself a type.
alternateNamesstring[]optionalOther names the same entity goes by in the files.
confidencenumberoptionalHow sure Runlog is the entity is one real thing, from 0 to 1.
typeEntityIdstringoptionalThe type entity whose schema this entity's fields are read into; empty on a type and on an untyped entity.
categorySchemaobjectoptionalOn a type entity, the fields every entity of the type is read into.
rolesobject[]optionalThe roles the entity holds beside its type (Self, Customer, Competitor, Lead, AE), each with the evidence that granted it.
updatedAtstringoptionalWhen the entity last changed, as an RFC 3339 timestamp.
PUT/v1/projects/{projectId}/entities/{entityId}/schemaSessionTeam

Edit a type's schema

Replace a type's fields, against the version the edit started from; the schema moves one version up.

`version` is the version you read, `0` for a type that had none. If the schema moved since, the edit is refused with the current schema so you can start again from it.

An edited schema is yours from then on: ingestion never rewrites it, it only proposes changes for you to approve or reject.

A field's `type` is a word of the field vocabulary (`text`, `number`, `date` and the rest — a 400 lists them all). Field names are unique ignoring case.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe owning project.
entityIdstringrequiredThe type entity carrying the schema.

Body

FieldTypeRequiredDescription
fieldsobject[]requiredThe complete field list: name, type, description, and whether it is required.
versionintegerrequiredThe schema version the edit started from.
Request · curl
curl -X PUT "https://runlogai.com/runlogapi/projects/p7Kd2mQx/entities/{entityId}/schema" \
  -H "Authorization: Bearer $RUNLOG_SESSION_TOKEN" \
  -H "X-Project-Id: p7Kd2mQx" \
  -H "Content-Type: application/json" \
  -d '{
  "fields": [
    {
      "description": "When payment is due.",
      "name": "dueDate",
      "required": true,
      "type": "date"
    }
  ],
  "version": 2
}'
Response · 200
{
  "categorySchema": {
    "fields": [
      {
        "description": "When payment is due.",
        "name": "dueDate",
        "required": true,
        "type": "date"
      }
    ],
    "version": 3
  }
}

Errors

StatuserrorWhen
409schema moved to version 3 since the edit beganSomeone else saved first; the body carries `categorySchema`, the schema to start again from.
400schema field "dueDate": names the same key as "Due Date"A field is unnamed, duplicated, reserved, too long, or of a type outside the vocabulary.
400entity is not a category; its schema lives on its type entityThe id names an entity of a type rather than the type.
404entity not foundThe project holds no such entity.
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
400invalid request bodyThe body is not JSON, or exceeds the 1 MB request-body cap.
401unauthorizedNo valid session.
POST/v1/projects/{projectId}/entities/{entityId}/schema/approveSessionTeam

Approve a proposed change

Make the change ingestion proposed for a type its live schema, one version up.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe owning project.
entityIdstringrequiredThe type entity carrying the schema.
Request · curl
curl -X POST "https://runlogai.com/runlogapi/projects/p7Kd2mQx/entities/{entityId}/schema/approve" \
  -H "Authorization: Bearer $RUNLOG_SESSION_TOKEN" \
  -H "X-Project-Id: p7Kd2mQx" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
{
  "categorySchema": {
    "fields": [
      {
        "description": "When payment is due.",
        "name": "dueDate",
        "required": true,
        "type": "date"
      }
    ],
    "version": 3
  }
}

Errors

StatuserrorWhen
404no pending schema proposalThe type carries no proposed change.
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401unauthorizedNo valid session.
POST/v1/projects/{projectId}/entities/{entityId}/schema/rejectSessionTeam

Reject a proposed change

Drop the change ingestion proposed for a type, keeping its schema.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe owning project.
entityIdstringrequiredThe type entity carrying the schema.
Request · curl
curl -X POST "https://runlogai.com/runlogapi/projects/p7Kd2mQx/entities/{entityId}/schema/reject" \
  -H "Authorization: Bearer $RUNLOG_SESSION_TOKEN" \
  -H "X-Project-Id: p7Kd2mQx" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
{}

Errors

StatuserrorWhen
404no pending schema proposalThe type carries no proposed change.
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401unauthorizedNo valid session.
read

List the project's entities

entity_list: List who and what the project holds — by type, by the role an entity carries, or by name — one page at a time. A type entity comes back with the fields every entity of that type fills and any change waiting on the owner.Teamruns on a thread, stream it

FieldTypeRequiredDescription
entityTypestringoptionalthe type to page — Person, Company, Category, or any type the project declares
rolestringoptionalkeep only the entities carrying this role — Self, Customer, Competitor, Relationship
querystringoptionala name to search for instead of paging a type
entityIdstringoptionalone entity to read in full, with its roles and its schema
cursorstringoptionalthe cursor a prior page ended on, to continue
limitnumberoptionalrows in this page; fifty by default and two hundred at most

Contract A read naming no type, role, name or id is refused: the project's entity count makes an unnarrowed read a whole-collection scan.

Contract A page is a window, never a total — a reply states the count it read and the cursor it stopped on, and never treats a page as the whole set.

project-write

Edit a type's fields

entity_schema_edit: Set the fields every entity of one type fills, or settle the change ingestion is waiting on the owner for. An edit lands one version up and marks the type the owner's, so no later reading overwrites it.Teamruns on a thread, stream it

FieldTypeRequiredDescription
entityIdstringrequiredthe type entity whose fields these are
actionstringoptional'set' to write fields, 'approve' or 'reject' to settle a waiting change; 'set' by default
fieldsobjectoptionalfor 'set': the fields to add or change, each {name, type, description, required}; every other field stays
removeFieldsstring[]optionalfor 'set': the names of fields to drop
replacebooleanoptionalfor 'set': true makes fields the WHOLE list, made against version; only when the person asks to replace it
versionnumberoptionalfor a replace: the version the list was made against, so a change underneath it is refused rather than overwritten

Contract A set is field-scoped by default: it changes only the fields it names, so a field another writer added since the read survives.

Contract A replace made against a version that has since moved is refused with the fields it moved to; the edit is re-made over them, never forced.

Contract Only a type entity carries fields; an instance is refused, naming the type its schema lives on.

project-write

Set what an entity is to the business

entity_role_set: Mark an entity as the business itself, a customer, a competitor or a lead — or take that mark back. A role carries the evidence it was granted on, so the reason survives the grant.Teamruns on a thread, stream it

FieldTypeRequiredDescription
entityIdstringrequiredthe entity the role is set on
rolestringrequiredthe role — Self, Customer, Competitor, Relationship
actionstringoptional'grant' or 'revoke'; 'grant' by default
evidencestringoptionalwhat the grant rests on — what was read, or that the owner said so

Contract A grant states its evidence; a role granted on nothing is a claim the corpus cannot answer for.

Contract Granting a role an entity already carries refreshes its evidence rather than duplicating it, and its other roles are untouched.

project-write

Correct an entity

entity_correct: Fix what the project has an entity's name, type or other names as. Every finding backing it gains confidence for the fields corrected, and everything derived from those findings is refreshed.Teamruns on a thread, stream it

FieldTypeRequiredDescription
entityIdstringrequiredthe entity to correct
namestringoptionalthe name the entity should carry
entityTypestringoptionalthe type the entity should carry
addNamesstring[]optionalother names it goes by, to add
removeNamesstring[]optionalother names it does not go by, to drop
alternateNamesstring[]optionalthe WHOLE list of other names, replacing what is stored; only when the person asks to replace it

Contract A correction naming no field changes nothing and says so, rather than rewriting the entity with what it already held.

Contract Other names change field-scoped by default: addNames and removeNames apply over the freshest read, so a name another writer added survives.

read

View records

entity_records: Read the records of any type the project holds, one the person defined or one Runlog declares, as a table or a board: filtered and sorted by any of the type's fields, grouped by one field with each value's count, and with the records of other types that name each one (an account's people, an industry's accounts). Answers the type's fields and the project's types.Teamanswers inline

FieldTypeRequiredDescription
typestringoptionalthe type whose records to read, as the project names it; omit to list the project's types
filtersobject[]optionaleach {field, op, value}: op is is, not, has, gt, gte, lt, lte, empty or set; a date field takes the value today, today+3d or today-2w, read at the call, so {field: next, op: lte, value: today} is what is due; a related type's name as the field filters on how many of its records name the row
groupBystringoptionalone field to group the matched records by, each value with its count
sortstringoptionalthe field to order by; the record's name by default
descbooleanoptionaltrue orders high to low
relatedobject[]optionaleach {type, field}: the records of that type whose field names the row, by name or id
columnsstring[]optionalthe fields each row carries; every field but nested objects by default
cursorstringoptionalthe cursor a prior page ended on, to continue
limitnumberoptionalrows in this page; fifty by default and five hundred at most

Contract It writes nothing and calls no model.

Contract Counts and groups cover every matched record; the rows are one page of them, with the cursor that continues.

Contract A field the type does not carry is refused, naming the fields it does.

project-write

Write records

entity_record_write: Define or extend a type's fields and write records of it: a type the project does not hold yet is created with the fields named, a held one gains or changes only those, and each record lands on the entity its name denotes, with only the values it names changed. How the person structures their work (segments, accounts, people, roles, stages) is theirs to name.Teamanswers inline

FieldTypeRequiredDescription
typestringrequiredthe type to write, as the person names it
fieldsobject[]optionalfields to add or change on the type, each {name, type, description}; type is text, number, money, boolean, date, email, url, list or object
recordsobject[]optionalup to one hundred records, each {name, entityId, values}: values maps a field's name to its value, null clearing it

Contract A value for a field the type does not carry, or one its type cannot read, refuses the whole call before anything is written.

Contract A record names an existing entity by id or by name; a name the project does not hold mints one of this type.

categoryv1.0.0

settle a suggested type

When the same record shape recurs across your files, ingestion proposes it as a type, citing where it was read. Nothing is bound to a proposal until you confirm it; a rejected shape is never proposed again.

GET/v1/projects/{projectId}/category-proposalsSessionTeam

List proposed types

Page the shapes awaiting your decision, newest first.

The body is a bare array; the next page's cursor rides on the `X-Next-Cursor` header, empty on the last page. `evidence` lists the sections the shape was read from.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe project to read.

Query parameters

FieldTypeRequiredDescription
cursorstringoptionalCursor from a previous page.
limitintegeroptionalPage size, capped at 200.
Request · curl
curl -X GET "https://runlogai.com/runlogapi/projects/p7Kd2mQx/category-proposals" \
  -H "Authorization: Bearer $RUNLOG_SESSION_TOKEN" \
  -H "X-Project-Id: p7Kd2mQx"
Response · 200
[
  {
    "description": "A bill for goods or services.",
    "evidence": [
      "fa_3Qm8Xz"
    ],
    "fields": [
      {
        "description": "When payment is due.",
        "name": "dueDate",
        "required": true,
        "type": "date"
      }
    ],
    "name": "Invoice",
    "proposalId": "cp_3Xr9Lm",
    "status": 1,
    "updatedAt": "2026-08-07T18:22:10Z"
  }
]

Errors

StatuserrorWhen
400invalid cursorThe cursor is not one a previous page returned.
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401unauthorizedNo valid session.
POST/v1/projects/{projectId}/category-proposals/{proposalId}/confirmSessionTeam

Confirm a proposed type

Make a shape a type: its fields become the type's schema, and the sections it was read from are filed under it.

Confirming a shape whose name is an existing type gives that type the fields. Confirming twice answers the same `entityId`.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe owning project.
proposalIdstringrequiredThe proposal to settle.
Request · curl
curl -X POST "https://runlogai.com/runlogapi/projects/p7Kd2mQx/category-proposals/{proposalId}/confirm" \
  -H "Authorization: Bearer $RUNLOG_SESSION_TOKEN" \
  -H "X-Project-Id: p7Kd2mQx" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
{
  "entityId": "t_8Qm2Kd"
}

Errors

StatuserrorWhen
404category proposal not foundThe project holds no such proposal.
409category proposal already settledIt was confirmed or rejected already the other way.
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401unauthorizedNo valid session.
POST/v1/projects/{projectId}/category-proposals/{proposalId}/rejectSessionTeam

Reject a proposed type

Refuse a shape; it is never proposed again.

Path parameters

FieldTypeRequiredDescription
projectIdstringrequiredThe owning project.
proposalIdstringrequiredThe proposal to settle.
Request · curl
curl -X POST "https://runlogai.com/runlogapi/projects/p7Kd2mQx/category-proposals/{proposalId}/reject" \
  -H "Authorization: Bearer $RUNLOG_SESSION_TOKEN" \
  -H "X-Project-Id: p7Kd2mQx" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
{}

Errors

StatuserrorWhen
404category proposal not foundThe project holds no such proposal.
409category proposal already settledIt was confirmed or rejected already the other way.
404project not foundThe project does not exist, or you have no access to it. Projects are non-enumerable, so a denied read is indistinguishable from a missing one.
401unauthorizedNo valid session.
project-write

Settle a suggested type

category_settle: Accept a type ingestion suggested, minting it with the fields it proposed, or reject it so it stops being offered. A suggestion nobody settles is a question the project keeps asking.Teamruns on a thread, stream it

FieldTypeRequiredDescription
proposalIdstringrequiredthe suggestion to settle, as the Explore panel lists it
actionstringrequired'confirm' to mint the type, or 'reject' to stop it being offered

Contract Confirming mints the type at its derived id and answers with that id; a suggestion already settled is reported as settled rather than minted twice.

Contract Rejecting is not a deletion of what was read — the findings that suggested the type stay; only the offer stops.

memoryv1.1.0

the project's memory: query, write, forget or correct

Every read an agent makes. A read is packed to a token budget you set and every row carries the ids it came from, so an answer built on it can cite its source rather than assert it.

POST/v1/api/actionsAPI keyPay-as-you-go

Search the spine

Rank the project's derived cells, entities, and artifacts against a query, packed to a budget.

With a `query`, this ranks and packs. Without one it pages the raw collection — `{"input": {"kind": "cells"}}` returns one bounded page plus a `nextCursor`, and `kind: "entities"` selects the entity collection instead.

Every returned row carries its own ids, which is what lets a downstream answer cite the exact cell it rested on.

**Tether the read when you know what it should rest on.** `fileIds` and `entities` are the two ids ingestion hands back, and passing either narrows the walk to what those files and entity names back. This is how you ask a question of one uploaded drawing rather than of the whole project.

**Ask for a shape and you get one.** Pass a JSON Schema as `schema` and the response carries a `structured` object conforming to it, synthesized from the same ranked rows — which still come back beside it, so every field can be checked against what it was derived from. The natural-language `query` is still required: it decides what is retrieved, and the schema only decides how the answer is laid out over it.

Body

FieldTypeRequiredDescription
actionstringrequiredMust be `"memory_query"`.
input.kindstringoptionalList mode: what to read — 'cells' (default) or 'entities'.
input.querystringoptionalNatural-language question or task; when present, results come ranked by relevance to it instead of as a paged dump.
input.budgetnumberoptionalQuery mode: approximate token ceiling the ranked response packs to. Leave it unset unless your context is genuinely smaller than the model window — unset returns every ranked row retrieval found, bounded only by the model's own input window.
input.cursorstringoptionalList mode: the nextCursor from a prior dispatch, to continue the window.
input.fileIdsstring[]optionalQuery mode: tether the answer to these ingested files — only knowledge derived from them is returned. Use the fileIds ingestion handed back.
input.entitiesstring[]optionalQuery mode: tether the answer to these entity names — each one is seeded into the spine walk alongside the entities the query itself names. Use the entity names ingestion handed back.
input.schemaobjectoptionalQuery mode: a JSON Schema the answer must conform to. With it, the response carries a `structured` object matching the schema, grounded in the same retrieved rows; without it the response is the retrieved rows alone.
Request · curl
curl -X POST "https://runlogai.com/runlogapi/api/actions" \
  -H "Authorization: Bearer $RUNLOG_API_KEY" \
  -H "X-Project-Id: p7Kd2mQx" \
  -H "Content-Type: application/json" \
  -d '{
  "action": "memory_query",
  "input": {
    "budget": 4096,
    "entities": [
      "North Elevation"
    ],
    "fileIds": [
      "4mHqZ1nR8vTbC0sWyLpAeGkJ3dXfU6iO2rN"
    ],
    "query": "what is the total glazed area and the floor count",
    "schema": {
      "properties": {
        "floorCount": {
          "type": "integer"
        },
        "glazedAreaSqFt": {
          "type": "number"
        }
      },
      "required": [
        "glazedAreaSqFt",
        "floorCount"
      ],
      "type": "object"
    }
  }
}'
Response · 200
{
  "action": "memory_query",
  "result": {
    "artifacts": [
      {
        "artifactId": "art_5Hn2Kp",
        "title": "Envelope takeoff"
      }
    ],
    "cells": [
      {
        "cellId": "c_7Hq2Rm",
        "description": "- The north elevation carries 12,480 sq ft of glazing across six occupied floors.",
        "entityIds": [
          "e_2Kd9Lp"
        ],
        "factionIds": [
          "f_8Rk2Vm"
        ],
        "projectId": "p7Kd2mQx"
      }
    ],
    "entities": [
      {
        "entityId": "e_2Kd9Lp",
        "entityType": "Component",
        "name": "North Elevation",
        "projectId": "p7Kd2mQx"
      }
    ],
    "query": "what is the total glazed area and the floor count",
    "structured": {
      "floorCount": 6,
      "glazedAreaSqFt": 12480
    }
  }
}

Errors

StatuserrorWhen
400action is requiredThe body named no action.
400query is required when a schema is suppliedA schema was sent without a query. A shape alone names nothing to retrieve.
403action not available to an API keyThe key's tier does not reach this action.
400invalid request bodyThe body is not JSON, or exceeds the 1 MB request-body cap.
401invalid API keyThe `Authorization` header is missing, malformed, or names a revoked key.
400name the target project via the X-Project-Id header or projectId queryNo project was named and the key is not bound to one.
429rate limit exceededYou passed 60 requests/minute on this key. `Retry-After` carries the seconds to wait.
500internal errorThe service failed to serve the request. Retry with backoff; the cause is logged server-side against your request.

Answers MemoryQueryResult: What `memory_query` answers: with a `query`, the ranked rows packed to the budget; without one, a page of the raw collection.

FieldTypeRequiredDescription
querystringoptionalThe question the rows were ranked against; absent on a page of the raw collection.
cellsCell[]optionalThe ranked cells, most relevant first, each carrying the ids it rests on.
entitiesEntity[]optionalThe ranked entities the question touches.
artifactsArtifactRef[]optionalThe generated documents the question touches.
structuredobjectoptionalPresent when the input carried a `schema`: an object conforming to it, filled from the same ranked rows.
itemsobject[]optionalWithout a query: one page of cells, or of entities when the input's `kind` is `entities`.
nextCursorstringoptionalWithout a query: the cursor of the next page, empty on the last; pass it as `cursor`.
read

Query memory

memory_query: Read the project's Runlog memory. With a query, returns the cells, entities, and artifacts ranked relevant to it, each carrying its ids as provenance; without one, lists cells (units of knowledge) or entities as a windowed dump. Scoped to the project the connection is bound to.Pay-as-you-goanswers inline

FieldTypeRequiredDescription
kindstringoptionallist mode: what to read — 'cells' (default) or 'entities'
querystringoptionalnatural-language question or task; when present, results come ranked by relevance to it instead of as a paged dump
budgetnumberoptionalquery mode: approximate token ceiling the ranked response packs to. Leave it unset unless your context is genuinely smaller than the model window — unset returns every ranked row retrieval found, bounded only by the model's own input window
cursorstringoptionallist mode: the nextCursor from a prior dispatch, to continue the window
fileIdsstring[]optionalquery mode: tether the answer to these ingested files — only knowledge derived from them is returned. Use the fileIds ingestion handed back
entitiesstring[]optionalquery mode: tether the answer to these entity names — each one is seeded into the spine walk alongside the entities the query itself names. Use the entity names ingestion handed back
schemaobjectoptionalquery mode: a JSON Schema the answer must conform to. With it, the response carries a `structured` object matching the schema, grounded in the same retrieved rows; without it the response is the retrieved rows alone

Contract List reads are windowed: a dispatch returns one bounded page of items plus a nextCursor; pass the returned cursor to continue and treat an empty nextCursor as the final page — a single dispatch is never the whole memory.

Contract Query reads are budgeted, not paged: the response packs the most relevant cells, entities, and artifacts into the requested token budget and stops — dispatch again with a refined query rather than a cursor.

Contract A schema never replaces the query: the natural-language query is what decides WHICH knowledge is retrieved, and the schema only decides what SHAPE the answer takes over it. A dispatch carrying a schema and no query is refused rather than answered from an unranked corpus.

Contract Tethers constrain, they do not rank: a fileIds or entities tether narrows the answer to what those files and entities back, so a tether naming nothing the project holds returns an empty result rather than a broader one. Leave both absent to retrieve across the whole project.

Contract Every field of a structured answer is grounded in the returned cells — the rows stay on the response beside the structured object precisely so a caller can check each value against what it was derived from.

project-write

Write memory

memory_write: Write what was learned into the project's Runlog memory so it persists across sessions. The statement is queued for ingestion, which names its entities, mints its cells and reconciles them against what the project already remembers — a restatement updates the earlier memory rather than duplicating it. Provide a bullet-list description capturing what was learned.Teamanswers inline

FieldTypeRequiredDescription
descriptionstringrequiredbullet-list description of what was learned — the memory content

Contract The write is queued, not immediate: the answer names the thread and message it landed as, and the cells appear once the project's ingestion wave has read them.

project-write

Forget or correct a memory

memory_forget: Remove or revise a prior memory entry. Use when the user says 'forget', 'remove', or 'that's not right' about something in memory; the harness audits the affected artifacts and Cells and may ask clarifying questions before committing.Teamanswers inline

FieldTypeRequiredDescription
targetstringrequiredwhat to forget or correct — the memory, Cell, or statement to remove or revise
cellIdstringoptionalspecific cell id to remove; omit to let the harness find the relevant memory
correctionstringoptionalif correcting rather than forgetting, the revised statement

corpusv1.0.0

the corpus around one subject, or a review of the spine

read

Read the corpus around one subject

corpus_read: Read what the project worked out about one subject: the findings citing an entity, the findings in one section, a finding's own children, the findings a file produced, or the values one entity filled against a type's fields. Named with a section, it reads that section's overview and text too.Teamruns on a thread, stream it

FieldTypeRequiredDescription
entityIdstringoptionalread the findings citing this entity, and the sections that named it
factionIdstringoptionalread this section — its overview, its text, and the findings in it
cellIdstringoptionalread this finding's children
fileIdsstring[]optionalread the findings the sections of these files produced
schemaIdstringoptionalwith entityId, read the values that entity filled against this type's fields
cursorstringoptionalthe cursor a prior page ended on, to continue
limitnumberoptionalrows in this page; fifty by default and two hundred at most

Contract Exactly one subject is read per call, in the order entityId · factionId · cellId · fileIds; a call naming none is refused rather than reading the project.

Contract Every finding is reported with its id, so what the reply says about the corpus cites the row it was read from.

read

Review the spine

corpus_review: Read again what the project's recent replies stood on: propose, on one card, what changed in the records the Model and Pipeline carry; hand disagreeing cells to lymph; report the cells since gone. The nightly routine's one step.Teamruns on a thread, stream it

FieldTypeRequiredDescription
hoursnumberoptionalhow many hours back to read replies; omit for the last day

Contract Reads only the subjects replies in the window stood on, one hop out, within the pass's budget; no model call of its own.

Contract Writes nothing: a record change waits on the person's card, a disagreement goes to lymph.