Admin Insights
Review tenant-scoped LibreChat usage and activity from MongoDB.
Admin Insights is an opt-in dashboard for reviewing LibreChat activity stored in the deployment's primary MongoDB. It reports conversations, unique users, persisted messages, and recorded tokens over time, with top-user, churn, and recent-conversation views.
Enable Insights
Set ENABLE_INSIGHTS=true in .env, then restart LibreChat:
ENABLE_INSIGHTS=trueWhen enabled for an authorized account, Insights appears in the desktop sidebar and mobile panel switcher. When disabled, the access and data routes return 404 and the navigation item stays hidden.
Access Requirements
The signed-in account must satisfy all three checks:
- Have the
ADMINrole - Hold the
access:adminsystem capability - Hold the
read:insightssystem capability
Use the Admin Panel to assign system capabilities. Every Insights query derives tenant scope from the authenticated administrator. Tenant administrators only see records for their own tenant; an administrator without a tenant sees only unscoped records.
Sensitive operational data
Insights can display user names and email addresses, conversation IDs, and the first message from
recent conversations. Grant read:insights only to administrators who should review this data.
Dashboard Metrics
The four summary metrics and their daily sparklines use the selected date range:
- Conversations: conversations created in the range
- Unique users: users represented by matching persisted message activity
- Messages: persisted user and assistant messages attributed to those users
- Tokens: the sum of recorded message
tokenCountvalues
The dashboard also includes:
- Top users: up to eight users ordered by message count, with their conversation and message totals
- Churned users: up to eight users whose latest message sent to an assistant became 28 days old during the selected range
- Latest conversations: paginated conversations with date, owner, first message, persisted message count, and recorded tokens
These are database activity metrics, not billing or Langfuse analytics. Token totals depend on the values persisted with messages and do not calculate monetary cost.
Date Ranges and Search
The default range is seven days. Presets cover the last 24 hours, 7 days, or 30 days. A custom range can span at most 30 calendar days and is grouped in the browser's current time zone.
Recent-conversation search matches a conversation ID or user identity. Search starts at three characters, accepts up to 200 characters, and keeps the latest-conversation table paginated at 10 rows per page. Summary cards, top users, and churn metrics continue to represent the selected date range rather than the search result subset.
Data and Deployment Notes
Insights queries the existing Conversation, Message, and User collections directly and requires no separate analytics database. Results reflect persisted records only: temporary or deleted data that is no longer in MongoDB cannot appear. The API bounds custom ranges, result lists, page sizes, search input, and tenant scope before running its aggregations.
See ENABLE_INSIGHTS for the deployment switch.
How is this guide?