Skip to main content
Maps Slack identifiers (team_id, channel_id, user_id) to Synap scopes so the bot remembers context per workspace, per channel, and per Slack user.
Why these mappings?
  • team_idcustomer_id: each Slack workspace is one tenant. Two different workspaces never share memories.
  • slack_user_iduser_id: stable Slack identifier. Survives display-name changes.
  • One conversation_id per channel (kept in a process-local dict here; use Redis in production): the bot remembers cross-message context within a channel but doesn’t bleed across channels.
Channel-level vs thread-level memory If you want each Slack thread to be its own conversation, key _channel_convs on event["thread_ts"] or event["ts"] instead of channel_id. That gives more isolated context per thread but loses cross-thread memory in the same channel.

Going further