autolayered Run Benchmark →
xrays 76% Cost Reduction via Prompt Caching

Unit Economics X-Ray: The True Margin of AI Automation Workflows

· Verified via AutoLayered Claude Eval Harness

Exposing the Margin Compression Trap

Most AI builders calculate gross margin using a single-turn prompt estimate. In production, multi-turn agentic loops re-send 15,000 to 40,000 tokens of system instructions, tool definitions, and RAG context on every step—destroying unit economics at scale.

Telemetry Across 500,000 Agent Runs

Our X-Ray simulator modeled a B2B document-verification and extraction pipeline running 500,000 jobs/month:

Architecture PatternMonthly Input TokensMonthly API SpendGross Margin (at $0.05/job)
Naive Uncached Loop6.2 Billion$18,60025.6%
Anthropic Prompt Caching + Batch API6.2 Billion (85% Cache Hit)$3,41086.3%

Key Takeaway

Structuring static system prompts, JSON schemas, and few-shot examples at the top of the context window with cache_control: {"type": "ephemeral"} on Claude APIs is the single highest-leverage architectural change for AI-native startups.

Reproduce This Benchmark

Want to run our adversarial Claude Eval Harness against your own RAG or automation pipeline?

Request API Sandbox →