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.

Open in

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, reducing this to 100 messages per response (a 66% saving). Because the append rule is required to use this pattern, persistence is automatically enabled and those messages are stored.

Messages generated by this scenario

Message typeCalculationMessages
User prompts35,000 chats × 4 prompts × (1 sent + 1 delivered)280,000
Agent responses35,000 chats × 4 responses × 100 msgs × (1 sent + 1 delivered)28,000,000
Persisted messages14,140,000 inbound messages persisted14,140,000
Total messages280,000 + 28,000,000 + 14,140,00042,420,000
Total message cost43,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 are billed based on how long users remain connected.

ItemCalculationTotal
Connection minutes35,000 chats × 3 mins × 2 (user + agent)210,000 mins
Connection minutes cost1,000,000 mins × $1.00/M$1.00

Channel minutes

Channel minutes are billed based on how long channels are active for.

ItemCalculationTotal
Channel minutes35,000 chats × 3 mins105,000 mins
Channel cost1,000,000 mins × $1.00/M$1.00

Total cost

The total monthly cost for 35,000 chats.

ItemCost
Messages$107.50
Connection minutes$1.00
Channel minutes$1.00
Total cost$109.50/month