@dotwee/node-red-supermemory 1.0.2
Node-RED nodes for interacting with the Supermemory.ai API
@dotwee/node-red-supermemory
A collection of Node-RED nodes to interact with the Supermemory.ai API (see OpenAPI docs here).
Supermemory is the Memory API for the AI era, allowing you to store, search, and manage information efficiently.
Install
Run the following command in your Node-RED user directory (typically ~/.node-red
):
npm install @dotwee/node-red-supermemory
Alternatively, search for @dotwee/node-red-supermemory
in the Node-RED Palette manager.
Prerequisites
- Node-RED: Ensure you have a working Node-RED installation.
- Supermemory Instance:
a) Sign up at dev.supermemory.ai to get an API key.
b) Self hosted supermemory instance. Follow the self-hosting-guide.
Nodes
This package currently provides the following nodes:
Configuration Node
- Supermemory Config (
supermemory-config
): Configures the connection to the Supermemory API.- API Key (Required): Your secret API key from dev.supermemory.ai.
- Base URL (Optional): Defaults to
https://v2.api.supermemory.ai
. Change this only if you are self-hosting Supermemory.
Functional Nodes
Add Memory (
supermemory-add
): Adds new content to your Supermemory.- Config: Link to your
supermemory-config
node. - Content (Required): The text content of the memory.
- Metadata (Optional): A JSON object of key-value pairs (string, number, boolean) to associate with the memory.
- Space IDs (Optional): A string or array of strings specifying which space(s) to add the memory to.
- Memory ID (Optional): A custom string ID for the memory. Supermemory generates one if omitted.
- Summarize (Optional): Boolean flag to request summarization during ingestion.
- Output:
msg.payload
contains the API response ({ id, status }
) on success or an error object on failure.
- Config: Link to your
Search Memories (
supermemory-search
): Searches your memories based on a query.- Config: Link to your
supermemory-config
node. - Query (Required): The search query string.
- Limit (Optional): Maximum number of results to return (default: 10).
- Filters (Optional): A JSON object for metadata-based filtering (refer to Supermemory API docs for format).
- Categories (Optional): A string or array of strings to filter results by category ID(s).
- Output:
msg.payload
contains the API response ({ results: [...] }
) on success or an error object on failure.
- Config: Link to your
Note: Nodes for Update, Delete, and Fast Search may be added in future versions based on the OpenAPI spec.
Usage Example (see also examples/add-and-search-supermemory.js
)
Here's a simple example flow to add a memory and then search for it:
[{"id":"config","type":"supermemory-config","name":"My Supermemory Key","credentials":{"apiKey":"YOUR_API_KEY_HERE"}},{"id":"addNode","type":"supermemory-add","name":"Add Note","config":"config","content":"payload","contentType":"msg","metadata":"","metadataType":"str","spaceIds":"","spaceIdsType":"str","summarize":false,"memoryId":"","memoryIdType":"str","wires":[["searchNode"]]},{"id":"injectAdd","type":"inject","name":"Add \"Hello Supermemory\"","props":[{"p":"payload","v":"Hello Supermemory","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello Supermemory","payloadType":"str","x":160,"y":100,"wires":[["addNode"]]},{"id":"searchNode","type":"supermemory-search","name":"Search for \"Hello\"","config":"config","query":"Hello","queryType":"str","limit":"10","limitType":"num","filters":"","filtersType":"str","categoriesFilter":"","categoriesFilterType":"str","wires":[["debugNode"]]},{"id":"debugNode","type":"debug","name":"Search Result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":100,"wires":[]}]
To use this example:
- Copy the JSON above.
- In Node-RED, click the menu (☰) > Import > Clipboard.
- Paste the JSON and click "Import".
- Double-click the "My Supermemory Key" configuration node and enter your actual API Key.
- Deploy the flow.
- Click the inject button on the "Add "Hello Supermemory"" node.
- Check the Debug sidebar to see the search results for "Hello".
Contributing
Contributions, bug reports, and feature requests are welcome! Please open an issue or pull request on the GitHub repository.
License
Copyright (C) 2025 Lukas 'dotWee' Wolfsteiner
Licensed under the Do What The Fuck You Want To public license (see LICENSE file).