CourseChat
Students already ask general AI chatbots for help with their courses. A general chatbot does not know the course. It may solve a problem with a method the course has not taught, and it often gives the full solution to a homework problem. The instructor cannot see these conversations.
CourseChat is an AI assistant like ChatGPT, which an instructor sets up for one course. The instructor gives it the course material and instructions on how to help. For example, the instructor can tell it to give a hint before an answer. The instructor can also read the conversations. When a student flags an answer as wrong, or the app flags one on its own, the answer goes to the instructor for review.
Course assistants in practice
I built CourseChat for a research project. It is not in active use. Others have built assistants like it. In 2023, Harvard’s CS50 course gave its students an AI assistant, the CS50 Duck, set up to guide them toward a solution instead of handing it over. Khan Academy has a similar tutor, Khanmigo, also from 2023.
This chapter does not cover how the assistant uses the course material. We focus on the assistant’s reply and how it reaches the student’s screen.
A conversation
A student starts a conversation with the assistant. The student sends a message, and the assistant replies to it. A conversation has only two participants: the student and the assistant.
Lena is a student in this course. Lena starts conversation 31 and asks about consistent hashing, from earlier in the course. Lena’s client sends:
POST /conversations/31/messages HTTP/1.1
Content-Type: application/json
{
"body": "Why does adding a shard with hash(code) mod N move most of the links?"
}
The server saves Lena’s message as message 52817 and sends the conversation to the language model behind the assistant, such as one of OpenAI’s GPT models or Anthropic’s Claude. It waits for the model’s reply. Then it saves the reply as message 52818 and responds:
HTTP/1.1 201 Created
Location: /conversations/31/messages/52817
Content-Type: application/json
{
"id": 52818,
"role": "assistant",
"body": "Because the shard of a link depends on N. ...",
"created_at": "2026-10-17T15:04:22Z"
}
The POST creates Lena’s message, so Location holds the path of message 52817. The body holds the reply, message 52818, because the client already has Lena’s text and needs the reply. role says who wrote a message: student or assistant.
How this chat differs from Courselore’s
Recall the chat we added to Courselore. A room has many members. Priya posts a message, and it has to reach Marcus’s screen, but Marcus’s client has not sent a request for it. In HTTP, the server sends data only as the response to a request. That is why we needed long polling, and then a WebSocket.
In CourseChat, nobody else posts to Lena’s conversation. Every message from the assistant is the reply to a message Lena sent. So the reply can be sent as the response to Lena’s request. Plain request and response is enough.