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 SDKEntitiesmerge_entities

merge_entities

Fold one entity into another, with an audit id and a grace period you must read.

PURPOSE

Fold one entity into another. The merged entity's statements and relations re-point to the survivor; its id keeps resolving, with mergedInto set.

POST/v1/entities/:survivor/mergeBearer API keystable
merge_entities(survivor_id: str, merged: str, confidence=None, reason=None) -> MergeEntitiesResult
Handshake credentialstable
merge_entities(request: EntityMergeRequest) -> EntityMergeResponse

Parameters

ParameterTypeRequired
survivor_idstringrequired

The entity that remains. Positional on the HTTP tier; the wire field is survivor.

mergedstringrequired

The entity to fold in.

confidencefloatoptional

Confidence in the merge.

reasonstringoptional

Why — recorded in the audit entry.

Returns

FieldTypePresence
audit_idstringalways

The audit record for this merge.

grace_period_secondsintegeralways

How long unmerge_entity will still work. After it elapses the merge is permanent — read this value rather than assuming a default.

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
unmerge_entityget_entity

Was this page helpful?

rename_entity

Change an entity's canonical name, optionally keeping the old one as an alias.

unmerge_entity

Reverse a merge inside its grace period — addressed by the merged id, not the survivor's.

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground