Clawith icon indicating copy to clipboard operation
Clawith copied to clipboard

Enable Multi-User/Department/Project-Level Agent Sharing`

Open lijiajun1997 opened this issue 8 months ago • 2 comments

Pre-checks

What problem does this solve?

Summary:

Enhance Agent sharing to support department-level, project-level, and user-level access. The AgentPermission model already supports company/department/user scope types (backend/app/models/agent.py), but the frontend UI does not expose this capability.

Use Cases:

  • Department-shared agents (e.g., "Marketing Assistant" for all marketing team members)
  • Project-shared agents for cross-functional collaboration
  • Dynamic permission adjustment during project lifecycle

Proposed Solution :

Phase 1: Backend Validation

  • Ensure all Agent API endpoints enforce AgentPermission checks (chat, triggers, tools, workspace)
  • Add permission resolution logic: manage > use, personal > department > company
  • Optional: Add batch permission management endpoint for department-level grants

Phase 2: Frontend UI

  • Agent Creation Wizard (Step 4: Permissions): Add sharing scope selector
    • Options: Personal / Department / Company / Custom (users/departments)
    • Access level: use / manage
  • Agent Settings Panel: Add "Shared Permissions" management module
    • View/edit current permissions
    • Add/remove users or departments
  • Visual Indicators: Display sharing badges in Agent cards and lists

Phase 3: UX Enhancements

  • Notify affected users via Feishu/Slack on permission changes
  • Display current access level in Agent detail view
  • Admin audit view for widely-shared agents

Acceptance Criteria:

  1. Users can set sharing scope during Agent creation
  2. Admins can manage permissions via Agent Settings
  3. All Agent operations enforce permission checks
  4. UI clearly indicates sharing state and access level
  5. Permission changes reflect promptly for affected users

Proposed solution

No response

Willing to contribute?

  • [ ] I'd be interested in working on this.

lijiajun1997 avatar Mar 13 '26 14:03 lijiajun1997

Great feature request! 🎯

This is a well-structured enhancement proposal for multi-level agent sharing and permission management. The 3-phase approach is clear:

Analysis Summary:

✅ Strengths:

  • Leverages existing AgentPermission model infrastructure (company/department/user scope)
  • Clear phased implementation roadmap
  • Well-defined acceptance criteria
  • Covers both backend validation and frontend UX

🔍 Key Considerations:

  1. Backend Priority: Phase 1 (permission enforcement) should be completed first before exposing UI
  2. Backward Compatibility: Ensure existing personal agent permissions remain unaffected
  3. Default Behavior: Clarify default sharing scope for newly created agents
  4. Audit Trail: Consider logging permission changes for compliance/debugging

Suggested Next Steps:

  1. Link to related AgentPermission model implementation
  2. Create subtasks for Phase 1 backend validation
  3. Define API contract changes needed for batch permission management
  4. Design permission resolution precedence clearly (personal > department > company)

Would you like to start with Phase 1 backend validation, or would you prefer community input on the UI design first?

CC: @wisdomqin @yaojin3616 for visibility on this enhancement

Clawiee avatar Mar 13 '26 15:03 Clawiee

Great proposal — the layered knowledge model and project/team thinking really resonate with Clawith's direction.

The department-level sharing part is actionable and contributions are welcome. The Project + Team concept is a bigger change that I'm still working through. I'm exploring whether lighter primitives — like group chat (multi-agent conversations as project spaces) or shared Focus Items across agents — could achieve similar results without a heavy project management layer.

Haven't fully figured it out yet. Would love to keep discussing — your input on how this should feel from a user perspective is really valuable.

wisdomqin avatar Mar 14 '26 01:03 wisdomqin