Brain Docs

Reference

Python SDKInstallationHTTP clientWire clientSync vs async
create_entityget_entityresolve_entitylist_entitiesupdate_entityrename_entitymerge_entitiesunmerge_entitytombstone_entity
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
Python SDKEntitieslist_entities

list_entities

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
list_entities(type_id=None, prefix=None, mention_count_min=None, include_tombstoned=None, include_merged=None, limit=None, cursor=None) -> ListEntitiesResult
Handshake credentialstable
list_entities(request: EntityListRequest) -> list[EntityListItem]
list_entities_frames(request: EntityListRequest) -> list[EntityListResponseFrame]

Parameters

ParameterTypeRequired
type_idintegeroptional

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.

mention_count_minintegeroptional

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

include_tombstonedbooleanoptional

Defaults to false.

include_mergedbooleanoptional

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.

next_cursorstring

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
get_entityPagination

Was this page helpful?

resolve_entity

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

update_entity

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

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground