ARCHIVE · 21

All articles

Follow the trail from foundational concepts to practical engineering decisions.

AI Coding & Agents5 min read

[AI Context #7] Cut API Costs with Prompt Caching

The final part of the series is about money. If you have run an agent through an API, you may have noticed something odd on the bill. Input tokens cost vastly more than output tokens. Given the architecture from Part 1, that is only natural. Every turn resends everything from the system prompt through the full conversation history, so in a 50-turn agent session, the same system prompt is effectively billed 50 times…

Read article