Zep v3 icon

Zep v3

Interact with Zep Cloud v3 API

Overview

The "Add Messages to a Thread" operation in the Thread resource allows users to append one or more messages to an existing conversation thread within the Zep Cloud v3 API. This is useful for maintaining and updating ongoing conversations, chat logs, or dialogue histories programmatically.

Typical use cases include:

  • Adding user or assistant messages to a chat thread in customer support or chatbot applications.
  • Logging system messages or events related to a conversation.
  • Extending conversation history with multiple messages at once (batch mode).
  • Optionally retrieving relevant context from the thread after adding messages to inform subsequent processing.

For example, a chatbot integration could use this node to add each new user input and bot response to a persistent thread, enabling context-aware interactions over time.

Properties

Name Meaning
Thread ID The unique identifier of the thread to which messages will be added.
Messages A collection of messages to add. Each message includes:
- Role: The role of the message sender (string).
- Role Type: The type of role; options are User, Assistant, or System.
- Content: The textual content of the message.
Ignore Roles Optional list of role types (User, Assistant, System) to ignore when adding messages to graph memory.
Return Context Boolean flag indicating whether to return a context block relevant to the most recent messages after adding them.

Output

The output JSON contains the response from the Zep Cloud API after adding messages to the specified thread. It typically includes details about the updated thread state and any returned context if requested.

If Return Context is enabled, the output will also include a context block relevant to the newly added messages, which can be used for further processing or decision-making.

This node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the Zep Cloud v3 API.
  • The node makes HTTP requests to the base URL https://api.getzep.com.
  • Proper configuration of the API authentication credential in n8n is necessary.

Troubleshooting

  • Common Issues:

    • Invalid or missing Thread ID will cause the API request to fail.
    • Providing empty or improperly formatted messages may result in errors.
    • Ignoring roles that do not exist in the messages has no effect but should be checked for correctness.
    • Network or authentication failures will prevent successful API calls.
  • Error Messages:

    • Errors from the API will be thrown as node errors with messages describing the issue, such as "Thread not found" or "Invalid message format".
    • Authentication errors indicate issues with the API key credential setup.
  • Resolution Tips:

    • Verify the Thread ID exists and is correct.
    • Ensure messages have all required fields: role, role_type, and content.
    • Check API credentials and network connectivity.
    • Use the "Continue on Fail" option in n8n to handle errors gracefully if needed.

Links and References

Discussion