Zep Chat Memory
The Zep Chat Memory component lets you connect your Nappai dashboard to a Zep instance so that chat messages can be saved and retrieved. This is useful when you want to keep a conversation history for AI assistants or other automated tasks.
How it Works
When you add this component, it uses the zep-python
library to talk to your Zep server.
- It sets the API base path (either
api/v1
orapi/v2
) so the request goes to the right endpoint. - It creates a
ZepClient
with the URL of your Zep instance and the API key you provide. - It then builds a
ZepChatMessageHistory
object that knows the session ID you specify. - The component returns this history object, which can be used by other parts of your workflow to read or write chat messages.
Inputs
- API Base Path: Choose the API version (
api/v1
orapi/v2
) that your Zep instance uses. - API Key: The secret key that authenticates your requests to Zep.
- Session ID: A unique identifier for the conversation you want to store.
- Zep URL: The web address of your Zep server (e.g.,
https://myzep.example.com
).
Outputs
- Memory: A
BaseChatMessageHistory
object that holds the chat history for the specified session. You can feed this output into other components that need to read or write messages.
Usage Example
- Add the component to your workflow.
- Fill in the inputs:
- Zep URL:
https://myzep.example.com
- API Key:
sk_********
- API Base Path:
api/v2
- Session ID:
chat-12345
- Zep URL:
- Connect the output (
Memory
) to a chat component or any other part of your workflow that needs access to the conversation history. - When the workflow runs, the component will automatically fetch existing messages for
chat-12345
and allow new messages to be stored back to Zep.
Related Components
- Chat Memory – A generic memory component that can store chat messages locally or in other back‑ends.
- Zep Client – A lower‑level component that lets you send raw requests to Zep; useful if you need custom API calls.
Tips and Best Practices
- Store your API key in a secure vault or environment variable instead of typing it directly.
- Use a unique session ID for each conversation to avoid mixing messages.
- Test the connection with a small sample conversation before deploying to production.
- Keep the API Base Path in sync with the version your Zep instance is running.
Security Considerations
- The API key is a secret; treat it like a password.
- Ensure that only trusted users have access to the component’s configuration.
- Use HTTPS for the Zep URL to protect data in transit.