Where the money actually goes. AI spend is the largest variable cost (Council v2 chat ~$0.007/query × 50-200 queries/day = $0.35-1.50). Cloudflare per-request services (Workers, Queues, DOs, Workflows) within or just above free tier. Storage (D1, R2, KV, Vectorize) within free tiers. NetSuite API calls included in the NS account. CostCapDO is the gatekeeper that caps daily AI spend so a bug can't burn the budget.
| Rank | Center | Est $/day | Cap |
|---|---|---|---|
| 1 | Council v2 chat (Claude + Kimi + Llama) | $0.50 | CostCapDO |
| 2 | CF Workers compute (after free tier) | $0.15 | — |
| 3 | D1 reads/writes | $0.05 | within free tier |
| 4 | R2 storage (backups + docs) | $0.05 | within free tier |
| 5 | Wiki + grader Haiku | $0.07 | CostCapDO |
| 6 | Workflows + DOs | $0.02 | — |
| 7 | Browser Rendering | $0.01 | — |
| 8 | Vectorize | ~$0.001 | — |
| 9 | Queues | $0 | free tier |
| 10 | KV | $0 | free tier |
| 11 | NS API calls | (included) | — |
| Total | full stack | ~$1.50/day | ~$45/month |
CostCapDO is a Durable Object that tracks cumulative AI spend per day across the entire platform. Every AI call (chat council, grader, wiki rebuild) increments via CostCapDO.increment(cost_usd). When the daily cap is exceeded, subsequent AI calls short-circuit and chat falls back to deterministic tools-only mode (no LLM call).
Daily cap is configurable via env.AI_DAILY_CAP_USD. Default in development: $5/day. Production: unlimited (cap relied on as soft signal + alerting only).
| Color | Meaning |
|---|---|
| frontend | User-facing surface (chat UI, admin HTML pages) |
| backend | Worker logic / agent code / business rules |
| database | D1 table / R2 object / KV key / Vectorize index |
| cloud | External system (NetSuite, Anthropic, etc.) |
| security | Gate / policy / HITL approval / kill switch |
| messagebus | Event ledger, Queues, async fan-out |
| external | Inbound source (email, webhook, cron tick, user input) |
| → solid | Synchronous call (request → response) |
| → green | Approved / happy-path |
| → red dashed | Policy or security check |
| → grey dashed | Optional / conditional / async |