Brain Docs

Reference

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

getEntity

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
getEntity(entityId: string): Promise<EntityDetail>
Handshake credentialstable
getEntity(request: EntityGetRequest): Promise<EntityGetResponse>

Parameters

ParameterTypeRequired
entityIdstringrequired

The entity to read. Positional on the HTTP tier.

Returns

FieldTypePresence
entityIdstringalways

The id.

entityTypeIdintegeralways

Its type, from the schema.

canonicalNamestringalways

The entity's own name.

aliasesstring[]always

Every other surface form that resolves here.

attributesstring

The opaque attribute blob, when one was set.

mentionCountintegeralways

How many memories mention it.

mergedIntostring | 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.

resolvedFromstring[]always

The entities merged into this one.

createdAtUnixNanos / updatedAtUnixNanos64-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
mergeEntitieslistEntities

Was this page helpful?

createEntity

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

resolveEntity

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