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 SDKEntitiesget_entity

get_entity

Read one entity — its canonical name, aliases, mention count and merge lineage.

PURPOSE

Read one entity by id, including where it sits in any merge lineage.

GET/v1/entities/:idBearer API keystable
get_entity(entity_id: str) -> EntityDetail
Handshake credentialstable
get_entity(request: EntityGetRequest) -> EntityGetResponse

Parameters

ParameterTypeRequired
entity_idstringrequired

The entity to read. Positional on the HTTP tier.

Returns

FieldTypePresence
entity_idstringalways

The id.

entity_type_idintegeralways

Its type, from the schema.

canonical_namestringalways

The entity's own name.

aliasesstring[]always

Every other surface form that resolves here.

attributesstring

The opaque attribute blob, when one was set.

mention_countintegeralways

How many memories mention it.

merged_intostring | nullalways

Non-null means this entity was merged away. Follow it to the survivor; reads against this id still work, which is what keeps old references valid.

resolved_fromstring[]always

The entities merged into this one.

created_at_unix_nanos / updated_at_unix_nanos64-bit integeralways

Lifecycle timestamps.

A merged id still reads

Merging does not invalidate the merged entity's id. A caller holding an old id gets a successful read with mergedInto set, rather than a 404 — so stored references keep working. Follow mergedInto when you need the current entity.

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
merge_entitieslist_entities

Was this page helpful?

create_entity

Create an entity with a canonical name, aliases and a schema-declared type.

resolve_entity

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

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground