What happened?
- Agent Sharing Not Working
- Users cannot share agents with other users, even though the share button is visible
- Root cause: Default USER role lacks SHARED_GLOBAL permission
- Other users cannot see shared agents in the marketplace
- File Upload UX Issue
- Files can only be uploaded AFTER creating an agent
- Users must first save the agent, then edit it to add files
- This creates a confusing two-step process
Affected Files
- /packages/data-provider/src/roles.ts - Missing default permissions
- /packages/api/src/app/permissions.ts - Incomplete permission initialization
- /api/server/controllers/agents/v1.js - Agent creation/sharing logic
Root Cause Analysis
// Current DEFAULT permissions for USER role
[SystemRoles.USER]: {
permissions: {
[PermissionTypes.AGENTS]: {}, // Empty - no permissions!
[PermissionTypes.PEOPLE_PICKER]: {
[Permissions.VIEW_USERS]: false, // Cannot view users to share with
},
[PermissionTypes.MARKETPLACE]: {
[Permissions.USE]: false, // Cannot access marketplace
},
}
}
Proposed Fix
Quick Fix (for users):
// Update MongoDB directly
db.roles.updateOne(
{ name: 'USER' },
{
$set: {
'permissions.AGENTS.SHARED_GLOBAL': true,
'permissions.AGENTS.USE': true,
'permissions.AGENTS.CREATE': true,
'permissions.PEOPLE_PICKER.VIEW_USERS': true,
'permissions.MARKETPLACE.USE': true
}
}
)
Permanent Fix (for codebase):
- Update default USER permissions in /packages/data-provider/src/roles.ts
- Add SHARED_GLOBAL permission initialization in /packages/api/src/app/permissions.ts
- Allow file uploads during agent creation, not just after
Impact
- All LibreChat deployments with agent functionality enabled
- Users expecting agent sharing to work out-of-the-box
- Affects collaboration features
Workaround
Enable in config:
ALLOW_SHARED_LINKS: "true"
Then manually update database permissions as shown above.
Version Information
version docker-ghcr-io/danny-avila/librechat:v0.8.0-rc3
Steps to Reproduce
- Create agent from marketplace
- Share with your internal users
- they can't access this agent
- even for user yourself you need using the shared url can able to chat
What browsers are you seeing the problem on?
Chrome
Relevant log output
the screen has been attached. free to ping me if like to repeat this issue.
Screenshots
No response
Code of Conduct
What happened?
Affected Files
Root Cause Analysis
// Current DEFAULT permissions for USER role
[SystemRoles.USER]: {
permissions: {
[PermissionTypes.AGENTS]: {}, // Empty - no permissions!
[PermissionTypes.PEOPLE_PICKER]: {
[Permissions.VIEW_USERS]: false, // Cannot view users to share with
},
[PermissionTypes.MARKETPLACE]: {
[Permissions.USE]: false, // Cannot access marketplace
},
}
}
Proposed Fix
Quick Fix (for users):
// Update MongoDB directly
db.roles.updateOne(
{ name: 'USER' },
{
$set: {
'permissions.AGENTS.SHARED_GLOBAL': true,
'permissions.AGENTS.USE': true,
'permissions.AGENTS.CREATE': true,
'permissions.PEOPLE_PICKER.VIEW_USERS': true,
'permissions.MARKETPLACE.USE': true
}
}
)
Permanent Fix (for codebase):
Impact
Workaround
Enable in config:
ALLOW_SHARED_LINKS: "true"
Then manually update database permissions as shown above.
Version Information
version docker-ghcr-io/danny-avila/librechat:v0.8.0-rc3
Steps to Reproduce
What browsers are you seeing the problem on?
Chrome
Relevant log output
the screen has been attached. free to ping me if like to repeat this issue.Screenshots
No response
Code of Conduct