-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
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:
- 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. - 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). - 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:
- User Management:
o Add a users table to store basic user information (e.g., username, email).
o Capture and persist user authentication/session information. - User-Linked Documents:
o Add a user_id column to the document storage tables.
o Track which user uploaded each document. - 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