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.
![]()
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:
| Step | Resource | Description |
|---|---|---|
| 1. Create Personas | Personas | Define AI characters with instructions and parameter fields |
| 2. Assign to Scenarios | Scenarios | Build training situations and attach personas, documents, and objectives |
| 3. Add Scenarios to Simulations | Simulations | Bundle scenarios into a complete training session with rubrics and time limits |
| 4. Add Simulations to Cohorts | Cohorts | Assign simulations to groups of learners |
| 5. Run Attempts | Attempts | Learners 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-op | Endpoint | Purpose |
|---|---|---|
chat_get | POST /attempt/chat_get | hydrate a single chat by id |
chat_create | POST /attempt/chat_create | create a new chat (rare) |
chat_message | POST /attempt/chat_message | send a user message |
chat_response | POST /attempt/chat_response | submit a structured question response |
chat_grade | POST /attempt/chat_grade | request grading |
chat_complete | POST /attempt/chat_complete | mark a chat completed |
chat_hints | POST /attempt/chat_hints | fetch hints |
chat_feedback | POST /attempt/chat_feedback | per-standard feedback |
chat_strengths / chat_improvements | POST /attempt/chat_strengths / _improvements | per-message strength/improvement breakdown |
chat_analyses | POST /attempt/chat_analyses | overall analyses |
chat_audio | POST /attempt/chat_audio | attach an audio resource to a message |
chat_speak / chat_silence / chat_voice | POST /attempt/chat_speak / _silence / _voice | live voice session control (see WS surface below) |
chat_draft / chat_drafts | POST /attempt/chat_draft (PATCH-like) / chat_drafts | edit draft / list drafts |
chat_refresh / chat_export | POST /attempt/chat_refresh / chat_export | invalidate 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:
| Filter | Description |
|---|---|
description_search | Filter descriptions by text |
persona_search | Filter personas by text |
document_search | Filter documents by text |
problem_statement_search | Filter problem statements by text |
image_search | Filter images by text |
video_search | Filter videos by text |
question_search | Filter questions by text |
option_search | Filter options by text |
persona_show_selected | Show only currently selected personas |
document_show_selected | Show 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
| Task | CLI | API |
|---|---|---|
| Get chat details | glow attempts chat get --body '{"chat_entry_id": "..."}' | POST /attempt/chat_get |
| Send a message | glow attempts chat message <chat_id> "..." | POST /attempt/chat_message |
| Grade a chat | glow 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 transcript | glow attempts chat export | POST /attempt/chat_export |
| Save a chat draft | glow attempts chat draft --body '{...}' | POST /attempt/chat_draft |
| List chat drafts | glow attempts chat drafts | POST /attempt/chat_drafts |
| Refresh views | glow attempts chat refresh | POST /attempt/chat_refresh |
Related
- Attempt API Reference — every chat_* endpoint with full schemas
- Attempts CLI Reference — every
glow attempts ...command - Scenarios — the training situations that each chat runs
- Personas — the AI characters active in each chat
- Simulations — the training sessions that define which scenarios (and chats) are created