Users
Overview
A User represents an individual interacting with your application. Each User can have multiple Threads associated with them, allowing you to track and manage their interactions over time. Additionally, each user has an associated User Graph which stores the memory for that user.
The unique identifier for each user is their UserID
. This can be any string value, such as a username, email address, or UUID.
In the following sections, you will learn how to manage Users and their associated Threads.
Users Enable Simple User Privacy Management
Deleting a User will delete all Threads and thread artifacts associated with that User with a single API call, making it easy to handle Right To Be Forgotten requests.
Ensuring Your User Data Is Correctly Mapped to the Zep Knowledge Graph
Adding your user’s email
, first_name
, and last_name
ensures that chat messages and business data are correctly mapped to the user node in the Zep knowledge graph.
For e.g., if business data contains your user’s email address, it will be related directly to the user node.
You can associate rich business context with a User:
user_id
: A unique identifier of the user that maps to your internal User ID.email
: The user’s email.first_name
: The user’s first name.last_name
: The user’s last name.
Adding a User
You can add a new user by providing the user details.
Learn how to associate Threads with Users
Getting a User
You can retrieve a user by their ID.
Updating a User
You can update a user’s details by providing the updated user details.
Deleting a User
You can delete a user by their ID.
Getting a User’s Threads
You can retrieve all Threads for a user by their ID.
Listing Users
You can list all users, with optional limit and cursor parameters for pagination.
Get the User Node
You can also retrieve the user’s node from their graph:
The user node might be used to get a summary of the user or to get facts related to the user (see “How to find facts relevant to a specific node”).