Actions5
- Agent Memory Actions
- Workflow Execution Actions
Overview
This node, named "Supabase Memory," provides functionality to store and retrieve agent memory data using a Supabase backend. It is designed to help AI tools or agents maintain stateful information across multiple steps or sessions by saving intermediate outputs, guidance, and other relevant data. This is particularly useful in scenarios where an AI agent performs multi-step reasoning or execution and needs to recall previous context or results.
For the Agent Memory - Store operation specifically, the node stores detailed memory entries related to an agent's execution step, including the session ID, step index, agent name, guidance given, agent output, and any intermediate JSON data. If no session ID is provided when storing, the node generates a new unique session ID.
Practical examples include:
- An AI planner agent that records each planning step's output and guidance for later retrieval.
- An executor agent that saves its intermediate results and outputs during a complex workflow.
- Any multi-turn AI interaction where maintaining session-based memory is critical.
Properties
Name | Meaning |
---|---|
Session ID | Identifier for the memory session. Leave empty to generate a new UUID when storing. Required for retrieval. |
Step Index | The sequence number of the current step in the agent's execution flow. |
Agent Name | Name of the agent (e.g., "planner", "executor") whose memory is being stored or retrieved. |
Guidance | Instructions or guidance provided to the agent at this step. |
Agent Output | The output generated by the agent at this step. |
Intermediate Data | JSON-formatted data representing intermediate results or state from the agent's execution. |
User ID | Optional identifier for the user associated with this memory entry. |
Output
The node outputs a JSON object containing the following fields:
sessionId
: The session ID used for storing or retrieving memory.- Additional fields depend on the operation result returned from the Supabase client methods, typically including stored or retrieved memory entries with their details such as step index, agent name, guidance, agent output, intermediate data, and optionally user ID.
The output is structured per input item, paired accordingly.
No binary data output is involved.
Dependencies
- Requires a Supabase backend configured with appropriate tables to store agent memory.
- Needs an API key credential for authenticating with Supabase (referred generically as "an API key credential").
- Uses the
uuid
library internally to generate new session IDs when none are provided. - Relies on a Supabase client utility (
SupabaseClientManager
) to perform database operations.
Troubleshooting
- Missing Session ID on Retrieve: Retrieval operations require a session ID; if omitted, the node throws an error indicating the session ID is required.
- Invalid JSON in Intermediate Data: The
Intermediate Data
property expects valid JSON. Malformed JSON will cause parsing errors. - Credential Issues: Ensure the Supabase URL and API key credentials are correctly set up and valid.
- Network or Permission Errors: Failures connecting to Supabase or permission denials may occur if the API key lacks necessary rights or network connectivity issues exist.
Links and References
- Supabase Documentation
- UUID npm package
- n8n documentation on creating custom nodes