Brain Docs

Reference

Rust SDKInstallationHTTP clientWire client
create_spacelist_spacesdelete_spacecreate_sessionlist_sessionsdelete_session
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
Rust SDKSpaces and sessionsdelete_session

delete_session

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
async fn delete_session(&self, session_id: u64, query: &DeleteSessionQuery) -> Result<SessionErased, BrainHttpError>
Handshake credentialstable
async fn delete_session(&self, request: &SessionDeleteRequest) -> Result<SessionDeleteResponse>

Parameters

ParameterTypeRequired
session_id64-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
space_id / session_id—always

What was targeted.

existedbooleanalways

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

memories_forgotten64-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
forgetdelete_space

Was this page helpful?

list_sessions

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

create_entity

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

On this page

ParametersReturns
Suggest an editOpen in Playground