---
title: "Caveman guides"
description: "Practical guides to AI agent costs, prompt compression, caching, model routing, and evaluations. Commands, checks, and ways to measure the result."
canonical: https://caveman.so/guides
last-updated: 2026-09-07
---

# Caveman guides

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

- [How to evaluate an AI agent optimization before rollout](https://caveman.so/guides/agent-evaluations): Create agent evaluations for compression, routing, prompt changes, and migrations. Preserve graders, test failure paths, count full-task cost, and inspect regressions.
- [Agent observability: connect requests, cost, and completed work](https://caveman.so/guides/agent-observability): Build an agent observability workflow that preserves task identity, provider usage, errors, attribution, and evaluation evidence. Find the cause behind an expensive run.
- [Caveman Agent SDK integration: source setup and migration boundaries](https://caveman.so/guides/agent-sdk-migration): Build the current Caveman Agent SDK from source, choose a native adapter or runtime lane, preserve upstream behavior, and validate one agent before a larger migration.
- [How to choose an AI gateway for agents](https://caveman.so/guides/choose-ai-gateway): Compare AI gateways on protocols, keys, routing, caching, observability, deployment, and failure behavior. Build a proof matrix before migrating agent traffic.
- [Use Caveman with Claude Code, Codex, Gemini CLI, and other agents](https://caveman.so/guides/coding-agent-setup): Install Caveman skill or local tools, choose from ten wrap profiles, verify recovery and active mode, and compare a real coding task with your normal launcher.
- [AI gateway migration: a reversible test plan for agent traffic](https://caveman.so/guides/gateway-migration): Migrate AI gateway traffic with explicit model, credential, protocol, policy, streaming, recovery, and usage checks. Test Caveman locally without losing the baseline.
- [How to reduce MCP token overhead in coding agents](https://caveman.so/guides/mcp-token-overhead): Separate MCP tool definitions, tool results, and repeated context. Trim the right layer, preserve tool contracts, verify recovery, and measure provider usage.
- [How to measure AI agent cost per completed task](https://caveman.so/guides/measure-agent-cost): Compare AI agent optimizations with paired tasks, provider usage, correctness checks, cache accounting, and a result you can reproduce.
- [Model routing for AI agents: quality, cache, and full-task cost](https://caveman.so/guides/model-routing): Design an LLM routing trial around model capabilities, held-out tasks, fallback cost, and cache continuity. Compare fixed models before adding a dynamic policy.
- [Prompt caching and compression: reduce agent cost without losing reuse](https://caveman.so/guides/prompt-caching): Understand provider prompt caching, cache reads and writes, stable prefixes, and how compression changes the economics. Measure cold and warm agent tasks separately.
- [Prompt compression for AI agents: setup, recovery, and measurement](https://caveman.so/guides/prompt-compression): Learn where prompt compression helps, how to test Caveman on tool output, verify exact recovery, preserve required context, and measure complete agent tasks.
- [How to reduce LLM costs in an agent that already works](https://caveman.so/guides/reduce-llm-costs): Find the expensive part of an AI agent task, then test caching, context compression, model choice, tool design, and retries without weakening the result.
