Brain Docs

Reference

Python SDKInstallationHTTP clientWire clientSync vs async
encoderecallforgetencode_vectormemory_listmemory_inspectgraph_fetchlinkunlink
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
Python SDKMemorymemory_list

memory_list

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
memory_list(limit=None, cursor=None, dir=None, include_tombstoned=None) -> MemoryListPage
Handshake credentialstable
memory_list(request: MemoryListRequest) -> list[MemoryListItem]
memory_list_frames(request: MemoryListRequest) -> list[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.

include_tombstonedbooleanoptional

Include softly-forgotten memories. Defaults to false.

Returns

FieldTypePresence
itemsMemoryListItem[]always

The page.

next_cursorstring

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[].statement_count / entity_count / relation_countintegeralways

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 / access_count / last_accessed_at_unix_nanos—always

The decay inputs. See Decay and retention.

items[].memory_id / text / kind / created_at_unix_nanos / occurred_at_unix_nanos—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
memory_inspectPagination

Was this page helpful?

encode_vector

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

memory_inspect

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