Skip to content

[Feature Request]:Add User Isolation and User-Level Tracking for Documents and Chat Messages #2220

@Saravanakumar26

Description

@Saravanakumar26

Do you need to file a feature request?

  • I have searched the existing feature request and this feature request is not already filed.
  • I believe this is a legitimate feature request, not just a question or bug.

Feature Request Description

Currently, LightRAG does not support user isolation or user-level tracking.
All uploaded knowledge base documents and chat messages are shared globally across users, and there is no mechanism to identify which user performed specific actions.

This creates issues in multi-user environments, where multiple users are uploading documents and chatting within the same system instance.

Current Limitations:

  1. No user tracking for uploaded documents:
    o There is no database field to record which user uploaded a specific document.
    o All uploaded documents are accessible to every user, regardless of who uploaded them.
  2. Chat messages stored only in localStorage:
    o Currently, chat messages are saved in the browser’s localStorage, not in the database.
    o This means messages are not tied to any user account and are only visible in the browser that created them.
    o When another user logs in from a different browser or device, they see a fresh chat history (no persistent or user-based chat storage).
  3. No user information persisted:
    o The system does not maintain any user details in the database.
    o There is no way to link documents or chat messages to a specific logged-in user.

Enhancement Request:
Please enhance LightRAG to support user-level isolation, tracking, and persistent chat storage by implementing the following features:

  1. User Management:
    o Add a users table to store basic user information (e.g., username, email).
    o Capture and persist user authentication/session information.
  2. User-Linked Documents:
    o Add a user_id column to the document storage tables.
    o Track which user uploaded each document.
  3. User-Linked Chat Messages:
    o Store chat messages in the database with a user_id reference instead of browser localStorage.
    o Show each user only their own chat history when they log in.

Expected Benefits:
• Each user’s data (documents and chats) is isolated and private.
• Uploaded content and chat logs are persistently stored in the database.
• The system becomes multi-user ready with clear ownership, auditability, and better data security.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions