You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(knowledge): Share KB facts when sharing conversations #689
When sharing a conversation with another user, provide option to include associated knowledge base facts.
Problem
Currently, sharing a conversation only shares the messages. Any KB facts created during that conversation remain private to the original owner, making the shared context incomplete.
Proposed Solution
UI Changes
Chat Sharing Dialog - Add checkbox: "Include knowledge created in this conversation"
Preview - Show list of KB facts that would be shared
Granular Control - Allow selecting specific facts to share vs share all
Backend Changes
Add shared_via_session field to fact metadata when sharing
Update fact visibility to "shared"
Add shared user IDs to shared_with array
Create Redis index entries for shared user
API Endpoint
POST /api/chat/sessions/{session_id}/share
{
"share_with": ["user_id"],
"include_knowledge": true,
"knowledge_facts": ["fact_id1", "fact_id2"] // Optional: specific facts
}
Acceptance Criteria
Sharing dialog shows option to include KB facts
User can preview which facts would be shared
Shared facts appear in recipient's "Shared with me" KB view
session:shared_with:{session_id} → Set of recipient user IDs
user:shared_sessions:{user_id} → Set of session IDs shared with user
user:shared_facts:{user_id} → Set of fact IDs shared with user
user:facts:{user_id} → Set of fact IDs owned by user (#688)
Acceptance Criteria
Sharing dialog shows option to include KB facts
User can preview which facts would be shared
Shared facts appear in recipient's shared_facts index (retrievable via get_shared_facts)
Original owner retains full ownership
Recipient can view but not modify shared facts (read-only via shared_access)
Activity
mrveiss commentedon Feb 11, 2026
Implementation Complete
Backend Changes (3 files, +389 lines)
autobot-user-backend/knowledge/facts.py- Fact ownership & sharinguser_idtracking in_store_fact_in_redis()→user:facts:{user_id}Redis set (feat(knowledge): User ownership model for chat-derived knowledge #688 minimal)share_facts()- Share specific facts with users, updates metadata withshared_witharray_share_single_fact()- Per-fact sharing helper, createsuser:shared_facts:{user_id}indicesget_shared_facts()- Retrieve all facts shared with a userautobot-user-backend/security/session_ownership.py- Session sharingshare_session()- Share session viasession:shared_with:{id}anduser:shared_sessions:{id}Redis setsis_shared_with_user()- Check if session is shared with userget_shared_sessions()- List all sessions shared with a user_check_ownership_mismatch()- shared_access bypass (after owner/org_admin checks)autobot-user-backend/api/chat_sessions.py- API endpointsPOST /chat/sessions/{id}/share- Share conversation with optional KB fact inclusionGET /chat/sessions/{id}/share/preview- Preview KB facts before sharingscope=sharedonGET /chat/sessions- List sessions shared with authenticated userSessionShareRequestPydantic model withshare_with,include_knowledge,knowledge_factsFrontend Changes (2 files, +281 lines)
ShareConversationDialog.vue(new) - Sharing modalChatSidebar.vue- Share buttonRedis Key Schema (Issue #689)
Acceptance Criteria
get_shared_facts)Commit: f1f3e6e
merge: resolve conflict between #688 ownership and #689 sharing
chore(kb): merge main into the #16693 backfill, keeping ownerless SYS…
fix(knowledge): resolve file-size-ratchet overages from #13708's reda…