Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
createEntitygetEntityresolveEntitylistEntitiesupdateEntityrenameEntitymergeEntitiesunmergeEntitytombstoneEntity
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKEntitieslistEntities

listEntities

Enumerate entities by type and name prefix — cursor-paged, with a required type filter.

PURPOSE

A cursor-paged listing of the entities in the caller's space.

GET/v1/entitiesBearer API keystable
listEntities(query?: ListEntitiesQuery): Promise<ListEntitiesResult>
Handshake credentialstable
listEntities(request: EntityListRequest): Promise<EntityListItem[]>
listEntitiesFrames(request: EntityListRequest): Promise<EntityListResponseFrame[]>

Parameters

ParameterTypeRequired
typeIdintegeroptional

Restrict to one entity type. Brain v1.0 requires a type filter to list entities — an unfiltered listing is rejected rather than scanned.

prefixstringoptional

Canonical-name prefix. On the wire the field is namePrefix.

mentionCountMinintegeroptional

Floor on how many memories mention the entity. The cheap way to skip one-off extractions.

includeTombstonedbooleanoptional

Defaults to false.

includeMergedbooleanoptional

Include entities merged into another. Defaults to false, so a merged entity disappears from listings without disappearing from storage.

limitintegeroptional

Page size.

cursorstring (wire: bytes)optional

Cursor from the previous page.

Returns

FieldTypePresence
entitiesEntityDetail[]always

The page.

countintegeralways

How many are in this page.

nextCursorstring

Absent on the last page.

On the wire

Ids are fixed-width UUID bytes rather than strings, attributes is an opaque attributesBlob, and every request carries a requestId plus an optional actAs. See Wire client.

See also
getEntityPagination

Was this page helpful?

resolveEntity

Ask Brain which entity a surface form means — the four outcomes, and why Ambiguous writes nothing.

updateEntity

Replace an entity's canonical name, aliases and attributes.

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground