# AI support chatbot pricing example This example uses consumption-based pricing for an AI support chatbot use case, where a single agent is publishing tokens to user over AI Transport. ### Assumptions The scale and features used in this calculation. | Scale | Features | |-------|----------| | 4 user prompts to get to resolution | ✓ Message-per-response | | 300 token events per LLM response | | | 75 appends per second from agent | | | 3 minute average chat duration | | | 1 million chats | | ### Cost summary The high level cost breakdown for this scenario is given in the table below. Messages are billed for both inbound (published to Ably) and outbound (delivered to subscribers). Enabling the "Message updates, deletes and appends" [channel rule](https://ably.com/docs/ai-transport/token-streaming/message-per-response.md#enable) will automatically enable message persistence. | Item | Calculation | Cost | |------|-------------|------| | Messages | 1212M × $2.50/M | $3030 | | Connection minutes | 6M × $1.00/M | $6 | | Channel minutes | 3M × $1.00/M | $3 | | Package fee | | [See plans](https://ably.com/pricing) | | **Total** | | **~$3039/M chats** | ### Message usage breakdown Several factors influence the total message usage. The message-per-response pattern includes [automatic rollup of append events](https://ably.com/docs/ai-transport/token-streaming/token-rate-limits.md#per-response) to reduce consumption costs and avoid rate limits. - Agent stream time: 300 token events ÷ 75 appends per second = 4 seconds of streaming per response - Messages published after rollup: 4 seconds x 25 messages/s = **100 messages per response** | Type | Calculation | Inbound | Outbound | Total messages | Cost | |------|-------------|---------|----------|----------------|------| | User prompts | 1M chats × 4 prompts | 4M | 4M | 8M | $20 | | Agent responses | 1M chats x 4 responses x 100 messages per response | 400M | 400M | 800M | $2000 | | Persisted messages | Every inbound message is persisted | 404M | 0 | 404M | $1010 | | **Total** | | **808M** | **404M** | **1212M** | **$3030** |