Reference
Thread TL;DR on demand (P12-M)
Summarize long reply threads without scrolling the full history. Reuses the same AI path as reply suggestions (P12-D) and daily digest (P12-F).
Usage
API
POST /messages/{messageId}/summary
Authorization: Bearer <jwt>
Content-Type: application/json
{ "roomId": "room_support" }Response
{
"summary": "- Customer asked about refund policy\n- Agent offered store credit\n- Follow up Friday",
"rootMessageId": 42,
"messageCount": 5,
"truncated": false
}SDK
const { summary } = await client.summarizeThread(messageId, roomId);Dashboard
Root messages with at least two replies show a TL;DR button in the agent room chat.
Behavior
- Resolve thread root by walking
parent_idup from the anchor message. - Collect root + nested replies (BFS, max 40 messages).
- Require at least 3 messages in the thread (
thread_too_shortotherwise). - Call OpenAI-compatible chat completions via
AI_BASE_URL.
Limits
| Control | Default |
|---|---|
| Min thread size | 3 messages |
| Max thread size | 40 messages |
| Quota metric | agent_invocations |
| Rate limit | RATE_LIMIT_THREAD_SUMMARY_PER_MINUTE (10/min) |
| Model | AI_SUMMARY_MODEL → AI_SUGGEST_MODEL → AI_MODEL |
Errors
| Code | HTTP | Meaning |
|---|---|---|
thread_too_short | 400 | Fewer than 3 messages in thread |
message_not_found | 404 | Invalid message id for room |
quota_exceeded | 402 | Monthly AI quota |
ai_not_configured | 503 | Missing AI_BASE_URL |
Scheduled Workflows (P12-L)
Cron jobs run through `FluxyScheduledWorkflow` with Cloudflare Workflows scheduled bindings instead of the Worker `scheduled` handler.
Webhook Secret Encryption Migration
This guide covers migrating existing plaintext webhook secrets to AES-GCM-encrypted values once `WEBHOOK_SECRET_ENCRYPTION_KEY` is configured.