Actions5
- Agent Memory Actions
- Workflow Execution Actions
Overview
The "Supabase Memory" node provides functionality to store and retrieve AI agent memory data using a Supabase backend. Specifically, for the Agent Memory - Retrieve operation, it allows fetching previously stored memory entries associated with a particular session and agent name. This is useful in scenarios where an AI agent needs to recall past interactions or states to maintain context over multiple steps or sessions.
Practical examples include:
- Retrieving the last N memory entries of a planning agent to inform the next planning step.
- Fetching executor agent's previous outputs to continue task execution seamlessly.
- Maintaining conversational context by retrieving stored memory snippets during multi-turn dialogues.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier for the memory session to retrieve. Must be provided for retrieval. |
| Agent Name | The name of the agent whose memory is being retrieved (e.g., "planner", "executor"). |
| Limit | Maximum number of memory entries to retrieve (default is 10). |
Output
The output JSON contains the following fields:
sessionId: The session ID used for the retrieval.- An array or list of memory entries corresponding to the specified session and agent name, limited by the
limitproperty.
Each memory entry typically includes details such as step index, guidance, agent output, intermediate data, and optionally user ID if stored. The exact structure depends on how memory was stored but generally represents discrete snapshots of the agent's state or outputs at various steps.
No binary data output is involved in this operation.
Dependencies
- Requires a Supabase backend configured with appropriate tables to store and retrieve agent memory.
- Needs an API key credential for authenticating with Supabase.
- The node expects the Supabase URL and API key to be set up in n8n credentials under a generic API key credential.
- Uses the
uuidpackage internally to generate new session IDs when storing memory (not relevant for retrieval).
Troubleshooting
- Missing Session ID Error: If the
Session IDproperty is left empty during a retrieve operation, the node will throw an error indicating that the session ID is required. To fix this, provide a valid session ID corresponding to the memory you want to fetch. - Empty Results: If no memory entries are returned, verify that the session ID and agent name are correct and that memory has been stored previously under those parameters.
- API Authentication Issues: Ensure the Supabase API key credential is correctly configured and has sufficient permissions to read from the memory tables.
- JSON Parsing Errors: Although not typical for retrieval, ensure that any JSON inputs related to other operations are well-formed to avoid errors.