Katexs
Sessions and visitors

Chat

Sessions and visitors

How chat conversations start, continue, end and are remembered.

Visitors

The first time someone chats, Katexs creates an anonymous visitor id and signs it into a visitor token. The token is stored in an HttpOnly, Secure cookie for 30 days and is only valid for that one agent. Tokens can't be forged or moved to another agent.

Sessions

A session is one conversation. It starts on the first message without a sessionId and continues while the visitor keeps sending messages with that id.

A session ends when:

  • the visitor or agent sends an end phrase,
  • your UI sends action: "end",
  • it has been idle longer than the agent's idle timeout (the next message starts a new session), or
  • your UI sends action: "idle" after the timeout.

What's saved

When a session ends, Katexs writes an interaction to the contact's timeline with the transcript, a summary and the credits used. Every completed reply is also traced with its latency, time to first token, token count and knowledge sources.

Concurrency

Only one reply per session can be in progress. A second message sent while the agent is still replying gets "A reply is already in progress. Please wait." Disable your send button until the done event.

Last updated November 2026 · Found a problem? Email support@katexs.com