Actions2
Overview
This node, named "Graphiti Memory," interacts with a self-hosted Graphiti instance to manage conversational memory. It supports two main operations: retrieving relevant past messages based on a query ("Get Memory") and adding new user-assistant message pairs to the memory ("Add Messages"). This functionality is useful for building chatbots or AI assistants that maintain context over time by storing and recalling conversation history grouped by identifiers.
Practical examples include:
- Enhancing chatbot responses by fetching related past interactions.
- Logging conversations dynamically by adding user and assistant messages into organized groups.
Properties
| Name | Meaning |
|---|---|
| Group ID | Identifier to organize memories into separate groups or contexts. |
| User Message | The user's message content to be added to the memory (used only in "Add Messages"). |
| Assistant Message | The assistant's response message to be added alongside the user message (used only in "Add Messages"). |
Output
The node outputs JSON data representing the response from the Graphiti API:
- For the Add Messages operation, the output JSON contains the result of posting the user and assistant messages to the
/messagesendpoint. - The structure depends on the API response but generally confirms successful storage or returns error details.
- No binary data is produced by this node.
Dependencies
- Requires an API key credential to authenticate requests to the Graphiti self-hosted instance.
- Needs the base URL of the Graphiti API, which can use HTTP or HTTPS depending on configuration.
- The node makes HTTP POST requests to the Graphiti API endpoints
/get-memoryand/messages.
Troubleshooting
- Missing Credentials: If no API credentials are provided, the node throws an error "No credentials found." Ensure the API key and base URL are correctly configured.
- Network Issues: Connection failures to the Graphiti API will cause errors; verify network access and correct API endpoint URLs.
- Invalid Input: Required fields like Group ID, User Message, and Assistant Message must be provided; missing these will cause request failures.
- API Errors: If the Graphiti API returns errors, they will be included in the node output if "Continue On Fail" is enabled; otherwise, execution stops with an error.
Links and References
- Graphiti Self-Hosted Documentation (replace with actual URL)
- n8n HTTP Request Node documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/