
---
title: "Caveman — the token-efficient stack for agent-native development"
description: "Caveman is an efficiency operating stack for AI agents. It watches your agent"
canonical: https://caveman.so
last-updated: 2026-09-05
---

# Caveman — the token-efficient stack for agent-native development

Caveman is an efficiency operating stack for AI agents. It watches your agent
traffic, applies the optimizations that traffic qualifies for — caching,
compression, routing — and then proves what it actually saved.

The open-source Caveman skill has 74k stars on GitHub and reached #1 on Hacker
News. The measured anchor behind the headline claim: **65% fewer output tokens,
measured across 10 prompts**, with code, commands, and errors byte-for-byte
exact.

## The stack: one engine, five layers

Each layer measures, governs, or reduces eligible context. It is the same
engine, deeper in your stack. Start free at the top; prove dollars only at the
verified layer.

| # | Layer | Status | What it is |
| --- | --- | --- | --- |
| 01 | [Caveman Skill](https://caveman.so/products/caveman) | live | MIT skill. Install once and Claude Code, Codex, Cursor and 30+ agents answer in 65% fewer output tokens. |
| 02 | [Caveman Proxy](https://caveman.so/products/caveman-proxy) | live | One command launches your agent with recoverable local context compression. No account needed. |
| 03 | [Caveman Agent SDK](https://caveman.so/products/caveman-agent) | live | More work, per dollar, with Caveman. TypeScript runtime: programmatic tools, memory, compaction, receipts, eval-gated builds. |
| 04 | [Caveman Platform](https://caveman.so/products/platform) | in development | Point traffic at one URL. Caching, compression and routing run eval-gated, on autopilot. |
| 05 | [Caveman Enterprise](https://caveman.so/enterprise) | in development | The same stack in your cloud or datacenter. Signed receipts, OEM embed, zero data retention. |

## Install

```bash
# Claude Code skill (MIT, ~30 seconds)
curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.sh | bash

# Caveman Code — terminal coding agent
npm install -g @juliusbrussee/caveman-code

# Cavemem — persistent agent memory over MCP
npm install -g cavemem
```

A browser extension covers ChatGPT, Claude and Gemini.

## Visibility

One workspace over all your AI traffic. Spend is provider-reported usage priced
against the public model catalog — a subtotal, not an invoice. Unknown models
stay visibly unpriced; they are never guessed and never averaged. Every dollar
resolves per member, per key, per workflow and per model.

## Optimization

The gateway applies only the optimizations your traffic qualifies for, behind
eval gates.

- **Compression** — nine compressors for what agents actually send: JSON, logs, code, tables, diffs, search results, bulk context. Originals are stored before replacement and are always recoverable.
- **Caching** — provider-native cache hints on every qualifying request, added to the upstream request only. Model-visible bytes are untouched. This is the only path producing verified dollars today.
- **Routing** — the cheapest model in your pool that passes your evals, or traffic stays where it is. In development; its savings stay inferred until provider-causal evidence exists.

## Verification

Savings climb a ladder and a number never skips a rung.

1. **inferred** — modelled from your own traffic, as a clearly labelled per-day rate. Never re-projected to a month.
2. **replayed** — the fix re-run against the provider on real requests. The delta is measured, not modelled. Still not booked.
3. **verified** — provider-causal evidence only, signed into the ledger, active on live traffic or it does not exist.

`verified_savings = $0.00` until a change is active on real traffic. Receipts
are Ed25519-signed and hash-chained; export is manual today, and automatic
signing stays off until the ledger can attest complete days.

## Autopilot

The autopilot ranks engineering-grade waste in your traffic and delivers each
fix as a pull request carrying its own evidence bundle and measured delta. You
merge; Caveman verifies. A pull request never merges itself and never books
savings by itself.

## Where your data goes

Prompts and responses go from your machine straight to your provider. Caveman's
cloud is not in that path — it receives token counts, model names and savings
numbers, never prompt or response bytes. On Enterprise it receives nothing at
all: zero data retention is enforced at write time and the uplink refuses the
upload.

## For agents

- [Agent index and when-to-use guidance](https://caveman.so/llms.txt)
- [OpenAPI 3.1 specification](https://caveman.so/openapi.json)
- [API index](https://caveman.so/api)
- [OAuth 2.0 authorization server metadata](https://caveman.so/.well-known/oauth-authorization-server)

## Elsewhere

[Products](https://caveman.so/products) ·
[Developers](https://caveman.so/developers) ·
[Enterprise](https://caveman.so/enterprise) ·
[Labs](https://caveman.so/labs) ·
[News](https://caveman.so/news) ·
[About](https://caveman.so/about) ·
[Contact](https://caveman.so/contact) ·
[GitHub](https://github.com/JuliusBrussee/caveman)

## Before you install

### What does Caveman do?

Caveman helps AI agents use fewer tokens. The skill asks for shorter replies. The local proxy compresses eligible context and keeps the original available for recovery. Start with the part that matches your workload, then compare completed tasks before and after.

[Find the right cost reduction](https://caveman.so/guides/reduce-llm-costs)

### Can I keep my coding agent?

Yes. Caveman wraps supported agents including Claude Code, Codex, and Gemini CLI. The skill also works with agents such as Cursor. Skill support and proxy support differ, so check the setup guide for your agent before installing.

[Check your agent's setup](https://caveman.so/guides/coding-agent-setup)

### Do I need a Caveman account?

The local CLI, skill, and compression tools work without a Caveman account. You still need the credentials or subscription required by your model provider or coding agent. Caveman Platform and Router require private access.

[Set up the local tools](https://docs.caveman.so/docs/quickstart)

### Will fewer tokens lower my bill?

It depends on how you pay. Fewer billable tokens can reduce metered API spend, but cached input, retries, and recovery calls affect the result. A flat monthly subscription may cost the same. Compare total cost per successful task and check provider billing before claiming savings.

[Measure cost per successful task](https://caveman.so/guides/measure-agent-cost)

### Can I use Caveman with my existing AI gateway?

Often, yes. Gateways handle jobs such as credentials, routing, and traffic policies. Caveman's local tools can reduce eligible context before it reaches a gateway. Compatibility depends on the API path and recovery support. Each switching guide covers a bounded trial, validation, and rollback.

[Compare your current stack](https://caveman.so/compare)
