Overview

Users in Julep represent the entities interacting with your AI agents. These can be real people or other systems that require automated responses from an agent. Managing users effectively allows for personalized and contextual interactions, ensuring that each user’s preferences and history are maintained across sessions.

Components

Users are comprised of several key components that facilitate their interaction with agents and sessions:

  • Name: The identifier for the user.
  • About: Additional information describing the user.
  • Metadata: Customizable key-value pairs that store user-specific data, preferences, and other relevant information.

Users configuration options

When creating a user, the following attributes can be specified:

FieldTypeDescriptionDefault
namestringThe name of the user.Required
aboutstringInformation about the user.""
metadataobjectAdditional metadata for the user, such as preferences or settings.null

Creating a User

You can create a user using Julep’s SDKs in Python or JavaScript. Below are examples demonstrating how to create a user.

Managing Users

Once users are created, you can perform various operations such as retrieving, updating, and deleting user profiles.

Retrieving Users

Retrieve user information individually or as a list.

Updating Users

Update user details or specific fields within the user profile.

Deleting Users

Remove users from your system when they are no longer needed.

Check out the API reference here or SDK reference (Python here or JavaScript here for more details on different operations you can perform on users.

Relationship to Other Concepts

Sessions

Users interact with agents through sessions, which maintain the context and history of conversations. Each session is associated with a single user and an agent, ensuring that interactions are personalized and relevant.

Example:

Agents

While users represent the entities interacting with your system, agents are the AI-powered entities that respond to user interactions. Agents can have access to user data to provide personalized and context-aware responses.

Example:

Best Practices

Session Management

  • 1. Reuse Sessions: Reuse existing sessions for returning users to maintain continuity in interactions.
  • 2. Session Cleanup: Regularly clean up inactive sessions to manage resources efficiently.
  • 3. Context Overflow Strategy: Choose an appropriate context overflow strategy (e.g., β€œadaptive”) to handle long conversations without losing important information.

Personalization

  • 1. Leverage Metadata: Use user metadata to store and retrieve preferences, enhancing personalized interactions.
  • 2. Maintain Context: Ensure that the context within sessions is updated and relevant to provide coherent and context-aware responses.

Data Security

  • 1. Protect User Data: Ensure that all user data, especially sensitive information, is stored securely and complies with relevant data protection regulations.
  • 2. Access Control: Implement proper access controls to restrict who can view or modify user data.

Next Steps

  • Sessions - Learn how to manage sessions and maintain conversation context.
  • Agents - Learn how to manage agents and create personalized interactions.
  • Tasks - Learn how to manage tasks and create automated workflows.