Skip to Content
Chat

Chat

Chats are the individual conversations within an attempt — each chat corresponds to one scenario and holds the full message history between the learner and the AI persona.

Chat is a sub-namespace on the attempt artifact. Every operation is named chat_<op> and lives at POST /attempt/chat_<op>: chat_get, chat_message, chat_grade, chat_draft, etc. The CLI exposes them as glow attempts chat <op> for ergonomics; the wire path concatenates them under /attempt/.

What is a Chat?

A chat is a single conversational session between a learner and an AI persona within an Attempt. When a learner starts a simulation with three scenarios, three chats are created — one per scenario. Each chat holds the message thread, the persona configuration, attached documents, and any customization applied at runtime.

A chat contains:

  • Chat Entry ID — unique identifier for this conversation
  • Attempt ID — the parent attempt this chat belongs to
  • Names / Descriptions — display copy
  • Personas — the AI character(s) active in this chat (inherited from the scenario)
  • Documents — reference materials available during the conversation
  • Parameter Fields — resolved parameter values injected into persona instructions
  • Scenarios — the scenario this chat is running
  • Objectives — learning goals the chat is targeting
  • Questions & Options — structured prompts for quiz-style interactions
  • Images & Videos — media assets shown as context
  • Problem Statements — the situation being addressed
  • Flags — configuration flags for the chat session
  • Departments — organizational groupings

Chats also support a draft system for customizing chat configurations before or during a session.

Chat interface showing message thread with AI persona, with voice mode toggle and input area

Sending a message

Quick Start

Get Chat Details via CLI

Calls below use $GLOW_INSTANCE_URL + $GLOW_TOKEN — see Authentication to export them once.

glow attempts chat get --body '{"chat_entry_id": "your-chat-entry-uuid"}'

Get Chat Details via API

curl -X POST $GLOW_INSTANCE_URL/attempt/chat_get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{ "chat_entry_id": "your-chat-entry-uuid", "attempt_id": "parent-attempt-uuid" }'

The response includes all hydrated resources: personas, documents, parameter fields, questions, options, and more.

Export a Chat

# CLI glow attempts chat export --body '{"chat_entry_id": "..."}' # API curl -X POST $GLOW_INSTANCE_URL/attempt/chat_export \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{ "chat_entry_id": "your-chat-entry-uuid", "attempt_id": "parent-attempt-uuid" }'

How Chats Connect to the Workflow

Chats are created automatically as part of step 5 when a learner starts an attempt:

StepResourceDescription
1. Create PersonasPersonasDefine AI characters with instructions and parameter fields
2. Assign to ScenariosScenariosBuild training situations and attach personas, documents, and objectives
3. Add Scenarios to SimulationsSimulationsBundle scenarios into a complete training session with rubrics and time limits
4. Add Simulations to CohortsCohortsAssign simulations to groups of learners
5. Run AttemptsAttemptsLearners start attempts; Glow creates one Chat per scenario

You do not create chats directly via chat_create in normal flows — the attempt’s POST /attempt/start does it. chat_create is exposed for tooling that needs to seed chats outside the normal flow.

The chat sub-op surface

Every chat operation is a separate endpoint under /attempt/chat_<op>:

Sub-opEndpointPurpose
chat_getPOST /attempt/chat_gethydrate a single chat by id
chat_createPOST /attempt/chat_createcreate a new chat (rare)
chat_messagePOST /attempt/chat_messagesend a user message
chat_responsePOST /attempt/chat_responsesubmit a structured question response
chat_gradePOST /attempt/chat_graderequest grading
chat_completePOST /attempt/chat_completemark a chat completed
chat_hintsPOST /attempt/chat_hintsfetch hints
chat_feedbackPOST /attempt/chat_feedbackper-standard feedback
chat_strengths / chat_improvementsPOST /attempt/chat_strengths / _improvementsper-message strength/improvement breakdown
chat_analysesPOST /attempt/chat_analysesoverall analyses
chat_audioPOST /attempt/chat_audioattach an audio resource to a message
chat_speak / chat_silence / chat_voicePOST /attempt/chat_speak / _silence / _voicelive voice session control (see WS surface below)
chat_draft / chat_draftsPOST /attempt/chat_draft (PATCH-like) / chat_draftsedit draft / list drafts
chat_refresh / chat_exportPOST /attempt/chat_refresh / chat_exportinvalidate cache / export transcript

CLI dispatch is symmetric — glow attempts chat <op> (e.g. glow attempts chat message <chat_id> "...") maps 1:1 to POST /attempt/chat_<op>.

Grading a chat

Hints, feedback, and analyses

Live REPL (WS)

The same chat surface is also exposed over socket.io for live message flow. The CLI has an interactive REPL at:

# Open a socket.io REPL — type a line + Enter to send a chat_message glow attempts chat live <chat_id>

Voice is handled separately by the chat_voice / chat_speak / chat_silence session ops (glow attempts chat voice|speak|silence, each a plain call to its POST /attempt/chat_* endpoint) — see the Voice pipeline for the full STT → LLM → TTS loop.

Searching and filtering chat resources

POST /attempt/chat_get supports search filters to narrow down the resources shown for a chat:

curl -X POST $GLOW_INSTANCE_URL/attempt/chat_get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{ "chat_entry_id": "your-chat-entry-uuid", "persona_search": "confused", "document_search": "FERPA", "persona_show_selected": true, "document_show_selected": false }'

Available search filters:

FilterDescription
description_searchFilter descriptions by text
persona_searchFilter personas by text
document_searchFilter documents by text
problem_statement_searchFilter problem statements by text
image_searchFilter images by text
video_searchFilter videos by text
question_searchFilter questions by text
option_searchFilter options by text
persona_show_selectedShow only currently selected personas
document_show_selectedShow only currently selected documents

Working with drafts

Chat drafts let you customize a chat’s configuration — changing which personas, documents, parameters, and other resources are active.

# CLI glow attempts chat draft --body '{ "name": "Custom FERPA Chat", "description": "Modified chat with additional documents", "persona_ids": ["concerned-student-uuid"], "document_ids": ["ferpa-policy-uuid", "supplemental-guide-uuid"], "parameter_field_ids": ["location-param-uuid"] }' # API curl -X POST $GLOW_INSTANCE_URL/attempt/chat_draft \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN" \ -d '{ "name": "Custom FERPA Chat", "description": "Modified chat with additional documents", "persona_ids": ["concerned-student-uuid"], "document_ids": ["ferpa-policy-uuid", "supplemental-guide-uuid"] }'

The draft endpoint supports optimistic concurrency through expected_version and returns the form_state with all selected resource IDs after save.

List your chat drafts:

# CLI glow attempts chat drafts # API curl -X POST $GLOW_INSTANCE_URL/attempt/chat_drafts \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $GLOW_TOKEN"

Exporting a transcript

Common Operations

TaskCLIAPI
Get chat detailsglow attempts chat get --body '{"chat_entry_id": "..."}'POST /attempt/chat_get
Send a messageglow attempts chat message <chat_id> "..."POST /attempt/chat_message
Grade a chatglow attempts chat grade <chat_id>POST /attempt/chat_grade
Live REPL (socket.io)glow attempts chat live <chat_id>(WebSocket — see CLI source)
Export chat transcriptglow attempts chat exportPOST /attempt/chat_export
Save a chat draftglow attempts chat draft --body '{...}'POST /attempt/chat_draft
List chat draftsglow attempts chat draftsPOST /attempt/chat_drafts
Refresh viewsglow attempts chat refreshPOST /attempt/chat_refresh
Last updated on