Skip to documentation
Docs navigation
Docs/clearSession()
MemoGrafterAgent

clearSession()

Clear local history and stored memory for the current session.

What it does

Clear local history and stored memory for the current session.

When to use it

Use only for an explicit full reset of the current conversation and its persisted memory.

Signature

TypeScript
clearSession(): Promise<void>

Behavior

Clears local chat history and the stored session graph.

Side effects and completion

Destructive. User-facing products should confirm intent before calling it.

Example

example.ts
await agent.clearSession();

Important behavior

This is an explicit destructive reset of the current session.