Skip to content

Thread Collaboration Demo Script ​

Six demos. About fourteen minutes. Shared threads with governed PII, inline review, and real-time awareness.

This script walks through GhostAI Thread Collaboration: owners and admins invite colleagues with explicit roles and PII visibility, invitees accept and see content according to policy, participants annotate messages with threaded comments, the UI shows who is present and typing over WebSocket session subscriptions, advanced controls cover lock/fork/pin, and compliance teams get a thread audit trail plus SIEM events.


Pre-Demo Checklist ​

  • [ ] GhostAI instance running; browser logged in as User A (thread owner or org member who can share)
  • [ ] Second account (User B) ready in another browser profile or incognito (or a colleague on the call)
  • [ ] Feature flag thread_collaboration enabled for both users’ tier or tenant
  • [ ] Feature flag thread_collaboration_comments enabled if you will demo inline comments
  • [ ] Feature flag thread_collaboration_advanced enabled if your environment gates fork/lock/pin behind it (match your subscription matrix)
  • [ ] Existing chat thread with several user and assistant messages (include at least one message with obvious PII tokens or masking so PII visibility is visible)
  • [ ] Org thread_sharing_policy known: platform_users (default), same_org, or disabled—set to platform_users or same_org for a successful share demo
  • [ ] If demonstrating ethical wall blocking: a matter-linked thread and a user blocked from that matter (optional negative path)
  • [ ] Screen layout: chat main pane + sidebar; ability to show Thread share UI, Collaboration / comments panel, and AvatarStack / presence strip without zooming below 100%

Quick capability check (optional) ​

Confirm the sharing router responds (401 without auth is fine; 404 means route not mounted):

bash
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8000/api/threads/shared-with-me

The Story ​

Alex owns a sensitive investigation thread. Riley needs to review conclusions without seeing raw identifiers. GhostAI lets Alex share with a role and PII visibility, Riley accepts an invite, both see who is online and who is typing, they comment on specific assistant outputs, and security gets an audit trail and SIEM signals—without copying transcripts into email.


Demo 1: Share a Thread ​

Duration: 2 minutes
Story: Alex grants governed access to Riley.

Actions (UI) ​

  1. Open an existing thread as User A (owner).
  2. Open Share thread (ThreadShareDialog).
  3. Enter Riley’s email (or pick a user).
  4. Choose a role:
    • Viewer — read-only chat and pins; no comments (hierarchy 0).
    • Commenter — viewer + inline comments (1).
    • Collaborator — commenter + fork and pin (2).
    • Admin — collaborator + share management and thread lock (3).
      Effective hierarchy: viewer < commenter < collaborator < admin.
  5. Set PII visibility for that participant:
    • full — original message content as stored for that user’s visibility path.
    • masked — sanitized / tokenized-style content (default invite posture).
    • redacted — PII spans replaced with placeholders such as entity-type labels.
  6. Toggle Share content library and Share memory to show how collateral and recall can be included or withheld for this share.
  7. Optionally enable can export where policy allows.
  8. Send the invite; copy invite link or token if the product surfaces it for pending email invites.

Talking Points ​

"Sharing is not ‘everyone sees everything.’ Each participant gets a role and a PII visibility slice. That maps cleanly to review workflows: counsel sees redacted, owners see full."

"We cap scale: 25 participants per thread, 50 active shares per sharer, and 5 pending invite operations per thread per hour—so blast sharing does not slip past governance."

"Org policy thread_sharing_policy can be platform_users, restrict to same_org, or be disabled entirely."


Demo 2: Accept Invite and View ​

Duration: 2 minutes
Story: Riley lands in the thread with the right data plane.

Actions (UI) ​

  1. As User B, open the invite (notification, deep link, or paste token into accept flow—per product build).
  2. Confirm the thread appears under Shared with me (or equivalent navigation).
  3. Open the thread and compare message rendering to User A’s view:
    • With masked or redacted, Riley should not see the same raw PII User A sees when Alex is on full.
  4. Optionally show content library / memory presence or absence based on share toggles.

Talking Points ​

"PII visibility is enforced per participant, not per thread. The assistant transcript you surface in the UI follows full / masked / redacted for that viewer."

"If the org enforces same_org, email-only invites to unknown users can be blocked—the product steers you toward known directory users."

"If an ethical wall blocks the target user for the thread’s matter, share fails and we emit collaboration.ethical_wall_blocked to SIEM when org context exists."


Demo 3: Inline Comments ​

Duration: 2 minutes
Story: Structured review on a specific assistant message.

Actions (UI) ​

  1. As a user with commenter or higher, open the comments / collaboration panel.
  2. Anchor a new comment to a specific message (message-level annotation).
  3. Add a reply so the UI shows a thread (backend uses parent_id linking to the parent comment).
  4. Resolve the discussion when the issue is closed. If your product build exposes reopen / unresolve in the comments UI, show toggling back to an open state (the public REST surface documents resolve; unresolve is not a separate route in thread_comments.py).
  5. (Optional) Show soft delete: removed from active view but retained for audit posture where applicable.

Talking Points ​

"Comments are first-class objects: anchored to message_id, threaded with parent_id, resolved with actor attribution, and soft-deleted when retracted—so you get review semantics, not a parallel chat."

"Viewers without commenter role can read but not annotate—separation of read vs review."

Note: The public REST API exposes resolve; there is no separate unresolve route in thread_comments.py—reopening a thread in the UI, if present, is product-specific.


Demo 4: Real-Time Presence ​

Duration: 2 minutes
Story: Both users feel co-present without screen sharing.

Actions (UI) ​

  1. With both users in the same thread, confirm the AvatarStack (or presence bar) lists online participants.
  2. As User A types in the composer, User B sees a typing indicator.
  3. When User B navigates away or unsubscribes from the session, User A sees participant left behavior (exact UI copy may vary).

Talking Points (technical accuracy) ​

"Presence rides on the same /ws/chat connection. After auth, the client sends subscribe_session with the session_id. The server answers with session_subscribed and a viewers list, then pushes participant_joined / participant_left to other subscribers."

"Typing uses a typing frame with is_typing: true and typing_stopped (or is_typing: false) so we do not spam assistant tokens—only awareness."


Demo 5: Advanced — Lock, Fork, Pin ​

Duration: 3 minutes
Story: Freeze the record, branch analysis, mark decisions.

Lock ​

  1. As owner or admin share role, lock the thread.
  2. Show that edits or new messages are blocked per product rules (banner: locked thread).
  3. Unlock to resume.

Fork ​

  1. As collaborator or higher, choose Fork from a specific message (fork point).
  2. Open the new session; show copied history up to the fork point and new owner.

Pin ​

  1. As collaborator or higher, pin an important assistant or user message.
  2. Add a short note on the pin (e.g., “Approved for client send”).
  3. Open the pins list; unpin if you want to reset the demo.

Talking Points ​

"Lock is an admin/owner control—audit logs thread_locked / thread_unlocked."

"Fork creates a new thread owned by the forking user; we log thread_forked and emit collaboration.thread_forked to SIEM with the new session id and message counts."

"Pins are message-level bookmarks with optional notes—great for sign-off and replay narratives."


Demo 6: Audit Trail and SIEM ​

Duration: 2 minutes
Story: Security and GRC see the collaboration story.

Actions (UI or API teaser) ​

  1. As owner or admin, open thread audit / history (or call GET /api/threads/{session_id}/audit off-screen).
  2. Scroll events after your demos; call out representative action values:
    • share_created, share_updated, share_revoked, share_accepted
    • thread_locked, thread_unlocked, ownership_transferred, thread_forked
    • message_pinned, message_unpinned
    • comment_added, comment_resolved
    • Bulk: bulk_share_group, bulk_share_role
  3. In SIEM (Splunk, Sentinel, etc.), show normalized events with types such as:
    • collaboration.thread_shared
    • collaboration.share_revoked
    • collaboration.thread_forked
    • collaboration.ethical_wall_blocked

Talking Points ​

"Every meaningful collaboration action hits thread audit for admins—who did what, to which share or message, with metadata."

"SIEM gets category collaboration events for high-signal actions and policy blocks, so your SOC can correlate shares with identity and org context."


Recovery Steps ​

SymptomWhat to try
Share button missing / 403Enable thread_collaboration; confirm User A is owner or admin on the thread.
403 “Organization policy…”Set thread_sharing_policy to platform_users or same_org; avoid email invite if policy is same_org and target is not resolved in-org.
429 “Maximum participants…”Use a smaller demo thread or revoke old shares; cap is 25 participants per thread.
429 “Maximum active shares…”Revoke stale shares for User A; cap is 50 per user.
429 “Too many pending invites…”Wait for the rolling hour window; cap is 5 pending invites per thread per hour.
Invite 404 / expiredRegenerate share; token may have expired.
Comments 403Enable thread_collaboration_comments; raise user role to commenter or above.
Fork 403Role must be collaborator or higher.
Audit 403Only owner or admin on the thread can read the audit trail.
Presence emptyBoth users must subscribe_session on WebSocket while viewing the thread.
Ethical wall blockExpected for blocked users; use a different target user or adjust wall demo data.

Flow Cheat Sheet ​

  1. Share → role + PII visibility + library/memory toggles → invite.
  2. Accept → thread appears for invitee with correct masking.
  3. Comment → anchor → reply (parent_id) → resolve.
  4. Presence → subscribe_session → avatars + typing / typing_stopped.
  5. Lock → freeze → unlock; Fork at message; Pin with note.
  6. Audit / SIEM → prove governance.

Bulk operations (talk track): POST .../share-group (memory group) and POST .../share-role (all users with an org role).

Discovery: GET /api/threads/search/shared?q= full-text search across messages in threads shared with the current user.


FAQ ​

What is the role order?
viewer (0) < commenter (1) < collaborator (2) < admin (3). Thread owner is treated as admin for permission checks.

Who can share?
Only the thread owner or a participant with admin share role.

What does PII visibility actually change?
It controls how message content is presented to that participant: full, masked, or redacted (see apply_pii_visibility in the backend).

Can viewers comment?
No. They need commenter or higher.

Are comments editable?
Authors can PUT their comment; soft delete is available to the author or thread owner/admin.

Is there an API to unresolve a comment?
Not in the current thread_comments router—only POST .../comments/{comment_id}/resolve.

What SIEM events should I promise?
At minimum: collaboration.thread_shared, collaboration.share_revoked, collaboration.thread_forked, collaboration.ethical_wall_blocked (when applicable).

How do I find threads shared with me?
GET /api/threads/shared-with-me lists them; search uses GET /api/threads/search/shared?q=....


Close ​

"Thread Collaboration turns chat into a governed workspace: invites with PII-aware visibility, threaded review, live presence, lock/fork/pin for legal and ops workflows, and an audit plus SIEM story your security team can operationalize."

Offer the hands-on lab: collaboration-full-lab.md.

SOC 2 Type II Certified | BAA Available | HIPAA-Ready