CSE Roadmap

Core tier · about 6 hours · 8 parts

Part 1 of 8 · 1 min read

Overview

In this module you will

  • Estimate the cost of one agent run and of a month of traffic from token counts.
  • Explain why a loop's cost grows faster than its number of steps, and name three ways to bend the curve.
  • Split latency into time to first token and output time, and say what shortens each.
  • Handle rate limits with a token bucket, retries with exponential backoff and jitter, and a concurrency estimate.

A chatbot makes one model call per message. An agent makes ten, twenty or forty, and each call carries everything said so far. That single fact explains most surprise bills and most slow agents.

This module gives you the arithmetic to predict cost before you ship, instead of discovering it on an invoice.

Prices here are placeholders

The code uses made-up prices: $3 per million input tokens, $15 per million output tokens, and $0.30 per million for cached input. Real prices differ by provider and model and change often. Replace them with current figures from your provider's pricing page. The method is what lasts.