Caveman / Guides

Spend fewer tokens.
Finish the same work.

Practical guides to AI agent costs, prompt compression, caching, model routing, and evaluations. Commands, checks, and ways to measure the result.

01

Cost and quality

How to evaluate an AI agent optimization before rollout

Build an acceptance test that a cheaper but subtly wrong answer still fails. Write the rejections first, hold back tuning cases, count retries, read the losing runs.

How to measure AI agent cost per completed task

Count every attempt, including the failed ones, into one number. Set the task boundary, record the right fields per attempt, and divide by the tasks that passed.

Prompt caching and compression: reduce agent cost without losing reuse

Check cache reads before you shorten a prompt. How stable prefixes, cache writes and compression interact, and why cold and warm runs need separate numbers.

How to reduce LLM costs in an agent that already works

Pick the one change worth testing first from your own usage data. A symptom to experiment map for caching, compression, tool output, model choice, and retries.

02

Coding agents

03

Context compression

04

AI gateways

05

Model routing

06

Agent observability

07

Agent frameworks