Supabase Memory icon

Supabase Memory

AI Agent memory node — save, load, search & delete structured data in any Supabase table with custom field mapping and SQL-like filters.

Delete Memory

AI-generated

Overview

The node deletes records from a specified Supabase table based on SQL-like filters provided by the user. It ensures safety by requiring at least one filter to prevent accidental deletion of all records in the table. Users can choose whether to return the deleted rows after the operation. This operation is useful for managing and cleaning up data in Supabase tables, such as removing outdated or irrelevant memory entries in an AI agent's memory store.

Use Case Examples

  1. Deleting user session records older than a certain date to free up space.
  2. Removing specific entries from an AI agent's memory table based on session ID or other criteria.

Properties

Name Meaning
Table Name The Supabase table to operate on, specified either from a list or by name.
Filters SQL-like filters to apply for selecting records to delete. Multiple filters are combined with AND. Each filter includes a field, an operator (e.g., equals, not equals, greater than), and a value.
Return Updated Data Whether to return the affected rows after the delete operation.

Output

JSON

  • json - The deleted records returned as JSON objects if 'Return Updated Data' is true. Otherwise, a success confirmation JSON object is returned.

Dependencies

  • Requires Supabase API credentials including Supabase URL and service role key for authentication.

Troubleshooting

  • Error if no filters are provided for delete operation to prevent accidental full table deletion. Ensure at least one filter is set.
  • Supabase API errors during deletion will be thrown with descriptive messages, e.g., permission issues or invalid filters.
  • Ensure the table name is correct and accessible with the provided credentials.

Discussion