Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
createSpacelistSpacesdeleteSpacecreateSessionlistSessionsdeleteSession
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKSpaces and sessionsdeleteSession

deleteSession

Remove a session and its memories — tombstoned by default, zeroed with hard.

PURPOSE

Remove a session and the memories in it. Same soft/hard distinction as forget, applied to a whole session at once.

DELETE/v1/sessions/:idBearer API keystable
deleteSession(sessionId: bigint, query?: DeleteSessionQuery): Promise<SessionErased>
Handshake credentialstable
deleteSession(request: SessionDeleteRequest): Promise<SessionDeleteResponse>

Parameters

ParameterTypeRequired
sessionId64-bit integerrequired

The session to remove. Positional on the HTTP tier — it is a path segment, not a query field.

hardbooleanoptional

false (the default) tombstones the session's memories; true zeroes them. A query parameter on the HTTP tier; a required field on the wire request.

Returns

FieldTypePresence
spaceId / sessionId—always

What was targeted.

existedbooleanalways

false when there was no such session. Not an error.

memoriesForgotten64-bit integeralways

How many memories went with it.

You do not choose your space on the HTTP tier

The space comes from the credential. These verbs act on the caller's space. Addressing another space per request is a wire-tier capability — see act_as. Per-end-user isolation is a storage-key prefix inside one space, not a key per user; see Namespaces.

See also
forgetdeleteSpace

Was this page helpful?

listSessions

The sessions in the caller's space, with their titles and memory counts.

createEntity

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

On this page

ParametersReturns
Suggest an editOpen in Playground