Skip to content

Conversations and sessions

Three words describe the record of an agent talking to someone, at three different time scales. Anychat uses them precisely, and so do the console, the API, and the reports.

Term What it is Time scale
Conversation Every message exchanged between one person and one agent, over all time. Unbounded
Session One sitting within a conversation: messages with less than 30 minutes of idle time between them. Minutes to hours
Turn One inbound message and the agent's reply to it. Seconds

The mental model is the Messages app on a phone. You see a list of people, and tapping one opens a single thread running back to the beginning, with date breaks where the back-and-forth paused. The thread is the conversation, and each stretch of activity is a session.

Conversation

A conversation is the complete set of messages exchanged with one person on one agent. It has no end, and it reopens every time the person comes back. There is exactly one conversation per person per agent.

A conversation is anchored on a channel identity rather than on a Person record. Most contacts are anonymous, and a conversation exists for them too.

Session

A session is a run of messages with less than 30 minutes of idle time between them. The moment more than 30 minutes passes between messages, the previous session is over and the next message begins a new one. A conversation is made of one or more sessions laid end to end.

Sessions are the unit of reporting and summarization. When a session ends, Anychat records a synopsis and evaluates whether the Goal was reached.

Some channels send an explicit session-start signal, such as when an Outreach opens a conversation. That starts a new session however recently the last message arrived.

Never use "conversation" for the 30-minute window.

Turn

A turn is one inbound message and the reply the agent produces for it. Every turn keeps a record of what was read, which Playbook was chosen, what was looked up, which Rules fired, and what was sent. See How a turn works.

The service window

Distinct from both a session and a conversation is the service window: the period after a person's inbound message during which a channel lets the agent reply freely before the channel's template and pricing rules apply. On RCS and WhatsApp that window is 24 hours.

Those channels call the window a "conversation", which is a third time scale and not the sense used here. Anychat calls it the service window throughout.

The provider's own thread id, channelConversationId, is likewise a separate thing from an Anychat conversation.

Sandbox and live

Every conversation is either live or sandbox. A sandbox conversation is stored beside the live ones, marked, and never counted in reports. Sandbox is where personas, the emulator, and Tests run. See Testing.

What's next

  • How a turn works: the pipeline behind one reply.
  • Testing: the two worlds, and what is real and what is captured in the sandbox.
  • People: the record a conversation may be attached to.
  • Agent API: reading conversations, sessions, and turns.