For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundDiscordStatusDashboardSign Up >
DocumentationSDK ReferenceGraphiti
DocumentationSDK ReferenceGraphiti
  • Getting Started
    • Coding with LLMs
    • Key Concepts
    • Quickstart
    • Building an Agent Walkthrough
    • Memory
    • Projects
    • Users
    • Sessions
    • Groups
  • Working with the Graph
    • Understanding the Graph
    • Utilizing Facts and Summaries
    • Customizing Graph Structure
    • Adding Data to the Graph
    • Reading Data from the Graph
    • Searching the Graph
    • Deleting Data from the Graph
    • Debugging
  • Cookbook
    • Check Data Ingestion Status
    • Customize Your Memory Context String
    • Add User Specific Business Data to User Graphs
    • Share Memory Across Users Using Group Graphs
    • Get Most Relevant Facts for an Arbitrary Query
    • Find Facts Relevant to a Specific Node
  • Best Practices
    • Performance Best Practices
    • Adding JSON Best Practices
  • Ecosystem
    • LangGraph
    • Autogen
  • Migrations
    • February 2026 Deprecation Wave
    • Migrate from Mem0
  • FAQ
    • Frequently Asked Questions
  • Legal
    • Privacy Policy
    • Terms of Service
    • Website Terms of Use
LogoLogo
PlaygroundDiscordStatusDashboardSign Up >
On this page
  • Ensuring your User data is correctly mapped to the Zep knowledge graph
  • Adding a User
  • Getting a User
  • Updating a User
  • Deleting a User
  • Getting a User’s Sessions
  • Listing Users
  • Get the User Node
Getting Started

Users

Was this page helpful?
Previous

Sessions

Next
Built with

A User represents an individual interacting with your application. Each User can have multiple Sessions associated with them, allowing you to track and manage their interactions over time.

The unique identifier for each user is their UserID. This can be any string value, such as a username, email address, or UUID.

The User object and its associated Sessions provide a powerful way to manage and understand user behavior. By associating Sessions with Users, you can track the progression of conversations and interactions over time, providing valuable context and history.

In the following sections, you will learn how to manage Users and their associated Sessions.

Users Enable Simple User Privacy Management

Deleting a User will delete all Sessions and session 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.

1from zep_cloud.client import Zep
2
3client = Zep(api_key=API_KEY)
4
5new_user = client.user.add(
6 user_id=user_id,
7 email="[email protected]",
8 first_name="Jane",
9 last_name="Smith",
10)

Learn how to associate Sessions with Users

Getting a User

You can retrieve a user by their ID.

1user = client.user.get("user123")

Updating a User

You can update a user’s details by providing the updated user details.

1updated_user = client.user.update(
2 user_id=user_id,
3 email="[email protected]",
4 first_name="Jane",
5 last_name="Smith",
6)

Deleting a User

You can delete a user by their ID.

1client.user.delete("user123")

Getting a User’s Sessions

You can retrieve all Sessions for a user by their ID.

1sessions = client.user.get_sessions("user123")

Listing Users

You can list all users, with optional limit and cursor parameters for pagination.

1# List the first 10 users
2result = client.user.list_ordered(page_size=10, page_number=1)

Get the User Node

You can also retrieve the user’s node from their graph:

1results = client.user.get_node(user_id=user_id)
2user_node = results.node
3print(user_node.summary)

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”).