Skip to main content

Sessions

In Qefro, a session is the channel-scoped context that ties messages, identity, and (optionally) verified customer state to a conversation inside an AI Workspace.

Layers

LayerMeaning
Channel sessionWidget token / WhatsApp thread / API client context
ConversationDurable message thread in a workspace
Verified identityResult of Customer Provider / challenge — used for high-risk tools
Flow runSeparate execution record when a Business Flow is active

Chat can exist without a flow run. A flow run may wait (waiting_for_approval, challenge) while the conversation stays open.

Website widget

  1. Page loads widget with workspace/public configuration.
  2. Widget obtains a session token for the channel.
  3. Optional identify() attaches a known customer subject (see identity docs).
  4. Messages create or continue a conversation.
  5. Tool calls may require Customer Provider authorization against session attributes.

WhatsApp

  • Thread identity is typically the phone number (provider-verified).
  • Conversation mapping is workspace + channel + external thread key.
  • Same Runtime and tools as widget; channel packaging differs.

API / Employee channels

  • Org JWT or internal portal session for employees.
  • Customer chat APIs use channel credentials, not employee RBAC.

Relationship to memory

Session and conversation IDs scope what Memory and flow variables can see. Do not put secrets in client-visible session metadata.