Skip to main content
Version: Latest

Session Assist

Session Assist helps a human operator review an ongoing conversation. It returns a factual summary, four distinct draft replies, and the visitor's apparent mood (humor). It does not send a reply or change the session's status. Review a suggested reply before sending it through the appropriate message endpoint.

Suggestions use the chronological conversation and completed review or transfer events so they do not recommend repeating an action already performed.

Get SESSION_UUID from payload.message.sessionId in a message webhook, and keep it with that conversation. The session belongs to a channel; its configured Agent workspace provides knowledge and a model. Workspace discovery returns the IDs used in channel configuration. Call it for a session belonging to your application with an application API key. Sessions in active, awaiting_human, or transferred status are supported. A session needs an Agent workspace and model; closed and expired sessions cannot be assisted.

curl -X POST 'https://app.chatt2.me/v1/agent/sessions/SESSION_UUID/assist' \
-H 'x-api-key: YOUR_APPLICATION_API_KEY'

The 200 response contains sessionId, summary, reply (an array of four strings), and humor. The mood value is an apparent reading of the conversation, not a verified statement about the visitor. Supported values are Angry, Frustrated, Irritated, Concerned, Confused, Neutral, Serious, Calm, Happy, and Excited.

For example, a successful response is:

{
"sessionId": "76c70ac5-4bd9-43dc-8af9-7de4f8f1f0e4",
"summary": "The visitor asked how to reset their password and has not received the reset email.",
"reply": [
"Please check your spam folder for the reset email.",
"I can help confirm the email address registered on your account.",
"Would you like me to walk you through requesting another reset email?",
"If the email is still missing, I can help investigate the delivery issue."
],
"humor": "Concerned"
}

The API allows up to five assistance requests per API key and session in 60 seconds. Repeated requests for an unchanged conversation can return a cached result; a changed session or message context can produce new suggestions. 404 SESSION_NOT_FOUND also covers a session from another application. 409 SESSION_NOT_ASSISTABLE means the session status is unsupported; 409 AI_WORKSPACE_REQUIRED means its workspace or model is missing. 429 means the rate limit was reached.

Successful generation uses the AiChat service. If that session was already charged for Agent, Session Assist, or CX Score, it does not create another AiChat debit. A cached response does not start a new generation. See application wallet history to inspect attributable debits and the API reference for the complete contract.