Tutorial: First Chat Flow
Goal: create a conversation, continue it, inspect metadata, then delete it.
1. Start a conversation
bash
curl -s -X POST http://127.0.0.1:5051/chat \
-H "Content-Type: application/json" \
-d '{
"message": "My name is Erik.",
"system": "Be concise."
}'Save conversation_id from the response.
2. Continue with context
bash
curl -s -X POST http://127.0.0.1:5051/chat \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "YOUR_CONVERSATION_ID",
"message": "What is my name?"
}'You should get an answer grounded in prior turns.
3. Inspect lifecycle metadata
bash
curl -s http://127.0.0.1:5051/chat/YOUR_CONVERSATION_IDResponse includes:
message_counttokens_used(estimated)last_activity_atexpires_at
4. Delete the conversation
bash
curl -s -X DELETE http://127.0.0.1:5051/chat/YOUR_CONVERSATION_IDCommon mistakes
- Sending legacy
messagespayload. Current contract requiresmessage. - Sending
systemwithconversation_id.systemis only valid for new conversations. - Reusing expired/evicted conversation IDs.