At a glance
New plan: $49 includes 2,000 drafts, then $0.04 each. Cost per successful draft is 2.2¢, because 15% of drafts aren't usable.
| Failure | What the agent sees | Recovery |
|---|---|---|
| Timeout over 15 s | "Try again" | One retry, then the matching macro |
| Provider outage | Banner: drafts paused | Backup provider; macros shown |
| Retry loop | Draft unavailable | Hard stop at 3 calls per draft |
1. Call map (one draft)
| Call | Model | Input tokens | Cached | Output tokens | Retries | User waits? |
|---|---|---|---|---|---|---|
| Classify intent | M | 1,500 | 80% (system prompt and intent definitions) | 20 | 2% | Yes |
| Draft reply | M | 6,000 | 30% (system prompt and examples) | 400 | 5% | Yes |
| Retrieval and embeddings | n/a | n/a | n/a | n/a | n/a | Yes |
Success rate: 85% of drafts are sent with light or no edits (from the eval suite and pilot).
2. Baseline, from scripts/cost_model.py
Cost per action $0.02103
Cost per successful task $0.02474 (success rate 85%)
Caching saves $0.00620 per action (23% of model cost)
typical 1500 actions/month cost $ 31.54 margin 35.6%
heavy 6000 actions/month cost $ 126.16 margin -157.5% <-- loses money
Break-even usage: 2330 actions per month at $49/month
The draft call is 97% of the cost. A heavy workspace loses money, and typical margin is thin for software.
3. Levers tried, in order
| Lever | Change | Effect on cost per draft | Effect on quality |
|---|---|---|---|
| Cut what doesn't earn its place | Removed a "polish tone" second call tested in the prototype | Already excluded above | Eval scores unchanged without it |
| Trim context | Top 3 retrieved passages instead of 5; last 4 messages instead of 6 (input 6,000 → 4,700) | −$0.0041 | Common 94% → 94%; recall@3 0.86 vs recall@5 0.90, misses all in multi-order threads |
| Route by difficulty | Multi-order threads (8%) to model L | +$0.0019 | Multi-order category 64% → 86% |
| Caching | Already on for system prompt and examples; workspace macros are too varied to cache | n/a | n/a |
| Batch | Nightly re-embedding of help-center changes moved to batch | Small; outside the per-draft cost | n/a |
After trimming and routing, still at a flat $49:
Cost per action $0.01885
Cost per successful task $0.02218 (success rate 85%)
typical 1500 actions/month cost $ 28.28 margin 42.3%
heavy 6000 actions/month cost $ 113.11 margin -130.8% <-- loses money
4. Pricing decision
$49 per month includes 2,000 drafts; $0.04 per draft above that.
- Typical (1,500): revenue $49, cost $28.28, margin 42%
- Heavy (6,000): revenue $209, cost $113.11, margin 46% Revisit when model prices drop: at half today's prices, typical margin rises above 70% with no product change.
5. Latency budget
Target: first words visible within 2 seconds, full draft p95 under 8 seconds.
- Classification and order lookup run in parallel (0.7 s)
- Retrieval 0.3 s; draft streams into the editor, first tokens at about 1.4 s
- Measured: p50 4.4 s, p95 7.6 s on M; multi-order threads on L, p95 12.4 s, shown with "Drafting a longer reply…"
6. Failure plan
| Failure | Detection | What the agent sees | Recovery |
|---|---|---|---|
| Model timeout (> 15 s) | Request timer | "Draft unavailable, try again" button | One retry with backoff; then fall back to the matching macro |
| Provider outage | Error rate > 5% over 2 minutes | Banner: drafts paused | Switch to backup provider for classification; drafting paused, macros shown |
| Malformed output | Schema validation | Nothing; retried | One retry; else macro |
| Order API down | Integration error | "Order data unavailable" in the draft header | Draft without order facts, marked for review |
| Cost runaway | Workspace spend > 3× its 30-day daily average | Nothing | Alert to Tandem; drafts continue until the plan limit |
| Loop or repeated retries | Retries per draft > 3 | Draft unavailable | Hard stop at 3 calls per draft |
Degradation plan
| Level | Trigger | What the agent sees | Back up when |
|---|---|---|---|
| 1. Full | Normal | Draft in about 4 seconds, sources shown | n/a |
| 2. Lighter | p95 over 10 s or error rate over 2% | Multi-order threads also drafted on model M; shorter context | p95 under 8 s for 10 minutes |
| 3. Macros | Error rate over 5% or provider outage | Matching macro with order facts filled in by code; banner: drafts paused | Errors under 1% for 10 minutes |
| 4. Off | Cost per workspace over 3x its daily average | Reply Assist hidden for that workspace; Tandem alerted | A person reviews and re-enables |
7. Production dashboard and alerts
Cost per successful draft; cost per workspace (median and top 5%); cache hit rate; p50 and p95 latency; timeout, fallback and retry rates; escalation rate; weekly eval scores. Alerts: cost per workspace up 50% week over week, cache hit rate below 70% of baseline, error rate above 5%, any must-pass eval category below 100%.