GT RAG Memory Insertion
AI-generatedOverview
This node, named "GT RAG Memory Insertion," is designed to insert conversation memory records into an external memory API service. It takes details of a conversation—such as the human message, AI response, summary, session ID, timestamp, and optional metadata—and sends them to a remote endpoint that presumably stores or indexes these memories with embedding generation.
Common scenarios for this node include:
- Storing chat logs or conversational data in a vector database or memory store for retrieval augmented generation (RAG) workflows.
- Building a persistent memory layer for AI assistants to recall past interactions.
- Archiving conversations with rich metadata for analytics or compliance.
Practical example:
- After a chatbot interaction, use this node to save the conversation snippet along with a summary and metadata like user sentiment or topic tags, enabling future queries against this stored memory.
Properties
| Name | Meaning |
|---|---|
| Human Message | The human's message from the conversation (multi-line string). |
| AI Response | The AI's response from the conversation (multi-line string). |
| Summary | A summary of the conversation (string). |
| Session ID | Identifier for the conversation session (string). |
| Timestamp | Timestamp of the conversation in ISO 8601 format (date/time). |
| Metadata | Additional metadata fields for the conversation. Each field includes: |
| - Key: Metadata field name (string). | |
| - Value Type: Type of the metadata value; options are String, Number, Boolean, JSON. | |
| - Value: The metadata value as a string, converted based on the selected type. |
Output
The node outputs an array of items corresponding to each input item processed. Each output item contains:
json: An object including:- The response from the memory API after insertion (the exact structure depends on the API).
- The original input data under the
inputkey, echoing back the human message, AI response, summary, session ID, timestamp, and parsed metadata.
If an error occurs during processing an item and the node is set to continue on failure, the output for that item will contain an error field with the error message.
No binary data output is produced by this node.
Dependencies
- Requires access to an external memory API service endpoint, configured via credentials containing:
- An API domain URL.
- An API token for authorization.
- The node makes HTTP POST requests to
${apiDomain}/api/v1/memory/insertwith JSON payloads. - Proper credential setup in n8n is necessary to authenticate requests.
Troubleshooting
- Invalid JSON in Metadata: If a metadata field is set to type JSON but contains invalid JSON syntax, the node throws an error specifying which metadata key is problematic. To fix, ensure valid JSON formatting in the metadata value.
- API Authentication Errors: If the API token is missing or invalid, the request will fail. Verify that the API token credential is correctly configured.
- Network or Endpoint Issues: If the API domain is incorrect or unreachable, the node will error out. Confirm the API domain URL is correct and accessible.
- Missing Required Fields: All main properties (human message, AI response, summary, session ID, timestamp) are required. Omitting any will cause errors.
- Continue On Fail Behavior: When enabled, the node will output error messages per item instead of stopping execution, useful for batch processing.
Links and References
- No direct links provided in the source code.
- For best results, consult the documentation of the external memory API service used for inserting conversation memories.
- Refer to n8n documentation on credentials and HTTP Request node for related configuration guidance.