You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/ai-transport/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,4 +153,4 @@ The cost of streaming token responses over Ably depends on:
153
153
- the number of subscribers receiving the response.
154
154
- the [token streaming pattern](/docs/ai-transport/features/token-streaming#token-streaming-patterns) you choose.
155
155
156
-
For example, an AI support chatbot sending a response of 250 tokens at 70 tokens/s to a single client using the [message-per-response](/docs/ai-transport/features/token-streaming/message-per-response) pattern would consume 90 inbound messages, 90 outbound messages and 90 persisted messages. See the [AI support chatbot pricing example](/docs/platform/pricing/examples/ai-chatbot) for a full breakdown of the costs in this scenario.
156
+
For example, suppose an AI support chatbot sends a response of 300 tokens, each as a discrete update, using the [message-per-response](/docs/ai-transport/features/token-streaming/message-per-response) pattern, and with a single client subscribed to the channel. With AI Transport's [append rollup](/docs/ai-transport/messaging/token-rate-limits#per-response), this will result in usage of 100 inbound messages, 100 outbound messages and 100 persisted messages. See the [AI support chatbot pricing example](/docs/platform/pricing/examples/ai-chatbot) for a full breakdown of the costs in this scenario.
Copy file name to clipboardExpand all lines: src/pages/docs/platform/pricing/examples/ai-chatbot.mdx
+10-17Lines changed: 10 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: AI support chatbot
2
+
title: AI support chatbot pricing example
3
3
meta_description: "Calculate AI Transport pricing for conversations with an AI chatbot. Example shows how using the message-per-response pattern and modifying the append rollup window can generate cost savings."
4
4
meta_keywords: "chatbot, support chat, token streaming, token cost, AI Transport pricing, Ably AI Transport pricing, stream cost, Pub/Sub pricing, realtime data delivery, Ably Pub/Sub pricing"
5
5
intro: "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."
@@ -12,7 +12,7 @@ The scale and features used in this calculation.
12
12
| Scale | Features |
13
13
|-------|----------|
14
14
| 4 user prompts to get to resolution | ✓ Message-per-response |
15
-
|250 tokens per LLM response ||
15
+
|300 token events per LLM response ||
16
16
| 75 appends per second from agent ||
17
17
| 3 minute average chat duration ||
18
18
| 1 million chats ||
@@ -23,32 +23,25 @@ The high level cost breakdown for this scenario is given in the table below. Mes
23
23
24
24
| Item | Calculation | Cost |
25
25
|------|-------------|------|
26
-
| Messages |1092M × $2.50/M | $2730|
26
+
| Messages |1212M × $2.50/M | $3030|
27
27
| Connection minutes | 6M × $1.00/M | $6 |
28
28
| Channel minutes | 3M × $1.00/M | $3 |
29
29
| Package fee ||[See plans](/pricing)|
30
-
|**Total**||**~$2739/M chats**|
30
+
|**Total**||**~$3039/M chats**|
31
31
32
32
### Message usage breakdown
33
33
34
34
Several factors influence the total message usage. The message-per-response pattern includes [automatic rollup of append events](/docs/ai-transport/features/token-streaming/token-rate-limits#per-response) to reduce consumption costs and avoid rate limits.
35
35
36
+
- Agent stream time: 300 token events ÷ 75 appends per second = 4 seconds of streaming per response
37
+
- Messages published after rollup: 4 seconds x 25 messages/s = **100 messages per response**
38
+
36
39
| Type | Calculation | Inbound | Outbound | Total messages | Cost |
The calculation above uses the default append rollup window of 40ms, chosen to control costs with minimum impact on responsiveness. For a text chatbot use case, you could increase the window to 200ms without noticably impacting the user experience.
0 commit comments