- Authentication
- Data persistence
allow_thread_sharing = truein the config (or via Chat Profile overrides)
- The callback returns
True, or - The thread metadata has
is_shared = true
thread dict in-place to redact or filter content.
Usage
Parameters
The serialized thread (including messages/steps, elements and
metadata). Mutate in-place to sanitize.Return Value
ReturnTrue to allow the sanitized (or unmodified) thread to be returned.
Return False (or raise) to deny with a 404 (the thread appears non-existent to the requester).
Common Patterns
- Role gate: allow administrators regardless of team.
- Expiry: compare
shared_atwithnow()and deny after a duration. - Partial visibility: trim messages beyond a timestamp or with specific labels.
- Redaction: scrub PII using regex before returning.
- Audit: log each successful access (user id, thread id, time).