Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
encoderecallforgetencodeVectormemoryListmemoryInspectgraphFetchlinkunlink
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKMemorymemoryList

memoryList

Enumerate the memories in a space, cursor-paged, with filters for kind, time, salience and text.

PURPOSE

A cursor-paged listing of the memories in the caller's space. The wire tier takes a considerably wider filter set than the HTTP one.

GET/v1/memoriesBearer API keystable
memoryList(query?: MemoryListQuery): Promise<MemoryListPage>
Handshake credentialstable
memoryList(request: MemoryListRequest): Promise<MemoryListItem[]>
memoryListFrames(request: MemoryListRequest): Promise<MemoryListResponseFrame[]>

Parameters

ParameterTypeRequired
limitintegeroptional

Page size. The server caps it — ask for more and you get the cap, not an error.

cursorstring (wire: bytes)optional

The cursor from the previous page. Omit for the first. See Pagination.

dirstringoptional

Sort direction.

includeTombstonedbooleanoptional

Include softly-forgotten memories. Defaults to false.

Returns

FieldTypePresence
itemsMemoryListItem[]always

The page.

nextCursorstring

Absent on the last page. Absent is the terminator — an empty page with a cursor present is a valid intermediate page.

items[].stateintegeralways

Lifecycle state. Non-zero means tombstoned; you only ever see it when tombstoned rows were requested.

items[].statementCount / entityCount / relationCountintegeralways

How much typed graph this memory produced. All three zero on a memory written while no schema was active — not a derivation failure.

items[].salience / accessCount / lastAccessedAtUnixNanos—always

The decay inputs. See Decay and retention.

items[].memoryId / text / kind / createdAtUnixNanos / occurredAtUnixNanos—always

The memory itself.

The wire filters

MemoryListRequest exposes filters the HTTP tier does not: sort, kinds, timeAxis, fromUnixNanos, toUnixNanos, salienceMin, salienceMax and textContains.

timeAxis is the one worth knowing — it decides whether the time range means record time (when Brain wrote it) or event time (when the thing happened). Those answer different questions, and the HTTP tier cannot ask the second.

The wire response item also carries spaceId, sessionId and sourceRequestId, which the HTTP item omits.

See also
memoryInspectPagination

Was this page helpful?

encodeVector

Store a memory with an embedding you computed yourself, bypassing Brain's embedder.

memoryInspect

See everything the write pipeline derived from one memory — vector, keyword fields, HyPE questions, graph and edges.

On this page

ParametersReturnsThe wire filters
Suggest an editOpen in Playground