4.1 What you pay for Input (prompt) tokens — everything you send: system prompt, history, retrieved docs, the user message. Output (completion) tokens — what the model generates. Output is usually ...
Comprehensive guide to AI agent engineering: how 30+ frameworks actually work under the hood. Context rot, compaction, system prompt assembly, SOUL.md, agent loops, memory systems, tool sprawl, MC ...