Smart Memory

Stores, retrieves, and manages conversational history for AI and chatbot applications. Supports multiple backends and flexible data structures.

Clear Memory

AI-generated

Summary

Clear conversation memory for a specified session or all sessions from the selected storage backend.

Inputs

  • Session ID — Unique identifier for the conversation session. Provide to clear a specific session's memory; leave empty to clear memory for all sessions.
  • Storage Backend (required) — Select the storage system where the conversation memory is stored: In-Memory, Redis, PostgreSQL, or SQLite.
  • TTL (Time To Live) — Expiration time in seconds for Redis storage; relevant only if Redis is chosen as the backend.
  • Table Name — Database table name for PostgreSQL or SQLite storages.
  • Database File Path — Path to the SQLite database file; used only when SQLite is the selected storage backend.
  • Log Level — Verbosity of the logs generated during the operation.

Output shape

no body — success or failure only

Operation executes asynchronously and clears either the specified session memory or all session memories if no session ID is given. Successful execution indicates the requested memory was cleared from the chosen storage backend; errors may occur if connection or configuration is invalid.

Examples

Example 1: Clear memory for a specific conversation session with ID 'user123_chat456' using Redis storage.

Set Session ID to 'user123_chat456', Storage Backend to 'Redis', optionally configure TTL and Log Level.

Example 2: Clear all conversation memories from in-memory storage.

Leave Session ID empty, set Storage Backend to 'In-Memory', and execute to remove all sessions' memory.

Links

Discussion