# AI support chatbot pricing example This example shows pricing for an AI support chatbot using Ably's AI Transport, where an agent streams token responses to users. It uses Ably's per-message and per-minute billing model. ## Scenario - **Chats:** 35,000 per month - **Prompts per chat:** 4 (to reach resolution) - **Tokens per response:** 300 token events - **Agent stream rate:** 75 appends per second - **Chat duration:** 3 minutes average **Total cost: $109.50/month** --- ## Cost breakdown The following breakdown shows the cost of connections, channels and messages in this scenario. ### How messages are counted Every chat message counts as a billable message. Messages are counted when a user sends a prompt and when the agent delivers a response. Usage is billed in increments of one million messages, rounded up. One user prompt sent to an agent = 2 messages (one sent to Ably + one delivered to the agent). **How rollup reduces token messages** Without rollup, each streamed token would be a separate message: 300 tokens = 300 messages per response. [Rollup batches tokens together](https://ably.com/docs/ai-transport/token-streaming/token-rate-limits.md#rollup), reducing this to 100 messages per response (a 66% saving). Because the append channel rule is required to use this pattern, persistence is automatically enabled and those messages are stored. #### Messages generated by this scenario | Message type | Calculation | Messages | |------------------------|----------------------------------------------------------------|------------| | User prompts | 35,000 chats × 4 prompts × (1 sent + 1 delivered) | 280,000 | | Agent responses | 35,000 chats × 4 responses × 100 msgs × (1 sent + 1 delivered) | 28,000,000 | | Persisted messages | 14,140,000 inbound messages persisted | 14,140,000 | | **Total messages** | 280,000 + 28,000,000 + 14,140,000 | **42,420,000** | | **Total message cost** | **43,000,000 × $2.50/M** | **$107.50** | --- ### How connection and channel minutes are counted Both connection minutes and channel minutes are rounded up per million minutes used. #### Connection minutes [Connection minutes](https://ably.com/docs/platform/pricing.md#connections) are billed based on how long users remain connected. | Item | Calculation | Total | |-----------------------------|------------------------------------------|--------------| | Connection minutes | 35,000 chats × 3 mins × 2 (user + agent) | 210,000 mins | | **Connection minutes cost** | **1,000,000 mins × $1.00/M** | **$1.00** | #### Channel minutes [Channel minutes](https://ably.com/docs/platform/pricing.md#channels) are billed based on how long channels are active for. | Item | Calculation | Total | |------------------|------------------------|--------------| | Channel minutes | 35,000 chats × 3 mins | 105,000 mins | | **Channel cost** | **1,000,000 mins × $1.00/M** | **$1.00** | --- ### Total cost The total monthly cost for 35,000 chats. | Item | Cost | |--------------------|-------------------| | Messages | $107.50 | | Connection minutes | $1.00 | | Channel minutes | $1.00 | | **Total cost** | **$109.50/month** | ## Related Topics - [Livestream chat](https://ably.com/docs/platform/pricing/examples/livestream.md): Calculate Ably Chat pricing for livestream events with high-concurrency chat. Example shows 5K concurrent viewers, message batching reducing costs by 95%, and total cost of ~$92.50 for a 1-hour major event. - [Support chat](https://ably.com/docs/platform/pricing/examples/support-chat.md): Calculate Ably Chat pricing for enterprise customer support chat. Example shows 50K MAU, one-to-one messaging, and why consumption pricing at ~$78/month outperforms MAU pricing at $2,500/month for support use cases. - [Data broadcast](https://ably.com/docs/platform/pricing/examples/data-broadcast.md): A pricing example that uses Ably Pub/Sub for data broadcast. Example shows how message conflation reduces message costs from ~$1,800 to ~$374/month for 10K users across 50 matches. - [Realtime dashboard](https://ably.com/docs/platform/pricing/examples/realtime-dashboard.md): Calculate Pub/Sub pricing for healthcare patient monitoring dashboards. Example shows realtime vitals tracking for 100 patients monitored by 5 care coordinators, with total cost of ~$98/month including presence and history features. ## Documentation Index To discover additional Ably documentation: 1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages. 2. Identify relevant URLs from that index. 3. Fetch target pages as needed. Avoid using assumed or outdated documentation paths.