Introducing the Zep User Store

Introducing the Zep User Store

Zep v0.11.0, released today, now includes a User Store. A User represents an individual interacting with your application. The User object and its associated Sessions provide a powerful way to manage and understand the behavior of individuals using your application.

Users may have additional data associated with them, including an email address, name, and metadata. The metadata field may include any data relevant to your user.

Working with Users

Adding a user is simple:

user_request = CreateUserRequest(
    user_id=user_id,
    email="[email protected]",
    first_name="Jane",
    last_name="Smith",
    metadata={"foo": "bar"},
)

# Create a user
new_user = client.user.add(user)

# Create a Session associated with the user
session = Session(session_id=session_id, user_id=user_id)
client.memory.add_session(session)

Adding a User using the zep-python package

Looking for the TypeScript example? See the User documentation.

And retrieving all Session objects for a User:

// Get all sessions for a user
const sessions = await userManager.getSessions(userId);

Retrieving all Session objects for a User using the zep-js package

Read more about the User object in the Zep User Documentation.

Other enhancements and improvements

Zep v0.11.0 includes several other enhancements and improvements:

  • New memory.getSessions (zep-js) and memory.get_sessions (zep_python) methods, allowing you to retrieve all Session records in Zep. The call is paginated, and we provide memory-efficient generators to allow you to iterate through the list.
  • Improved Azure OpenAI support thanks to Claudia Justice Kane. Zep now supports Azure OpenAI embeddings and LLM deployment names that differ from model names.
  • A major improvement of Zep's documentation. In particular, the Chat History Memory API documentation.