---
title: "Caveman"
description: "Take AI further. Spend less."
canonical: https://caveman.so
last-updated: 2026-10-07
---

# Caveman

Take AI further. Spend less.

The tools and infrastructure to get more work from your AI. Caveman is two
products:

- **Caveman** is free and open source. It makes the agents you run and the
  agents you build do the same work with fewer tokens.
- **Caveman Cloud** is in private preview. It is for the company paying for the
  agents: it shows what they cost, finds what is still wasted, and proves each
  saving.

## What we do

Caveman cuts the cost of every agent turn. Caveman Cloud shows what every run
costs, finds the waste, and improves it on Autopilot.

Caveman sits in the path of every agent you run or build. It reads less, says
less and picks the model for each turn, and requests go straight to your model
provider. Caveman Cloud watches the live traffic, finds what is still wasted,
tests each fix on your own work, and counts a saving once production proves it.
Tested fixes flow back into how Caveman runs.

## Caveman

For the agents you run, and the ones you build.

| | |
| --- | --- |
| For | Developers. No caveman experience required. |
| Runs | Entirely locally, or in your production apps. Requests go straight to your provider. |
| Works with | Claude Code, Codex, OpenCode, Gemini CLI and 30+ coding agents; TypeScript and Python apps |
| Price | $0. Adaptive model selection is in early access. |

### Agents you run

Claude Code, Codex or OpenCode. Any model. Half the bill. Keep the agent you use.

```sh
npm i -g @caveman-ai/cli && caveman setup --install
caveman claude   # or codex · gemini · opencode
```

- **Reads less.** Logs, test output, JSON and diffs shrink before the model
  reads them, and the original stays on disk if the agent asks for it. Whole
  sessions used 33.2% fewer input tokens, with 18 of 18 answers right.
- **Says less.** Replies drop the filler; code, commands and errors come back
  byte for byte. 65% less readable output on a 10-prompt benchmark. That is not
  a cost saving: on long-horizon coding tasks it is about 10% fewer tokens in
  total.
- **Picks the model.** Adaptive model selection gives each turn the cheapest
  model and effort that gets it right, and keeps the frontier model for hard
  work. Routed Claude Code cost 0.46× as much per task as always running Opus
  5.5 at max effort, with the same solve rate, on 85 paired agentic coding tasks
  from SWE-Interact and SWE-Together (interim run, list-price estimates). It is
  in early access and needs a free Caveman account; if the router is missing,
  slow or fails, the task runs exactly as the agent asked.

### Agents you build

You built your agent. Keep every part of it. Caveman sits where tool results
become model input: your framework still runs the show and your provider still
gets the call.

```sh
npm install @caveman-ai/middleware @caveman-ai/sdk          # TypeScript
pip install 'caveman-middleware[langchain]' caveman-sdk     # Python
npm i -g @caveman-ai/cli && CAVEMAN_MODE=compress caveman start   # local runtime
```

```ts
const result = streamText(withCaveman(existingOptions, { runtime, scope }));
```

- **Smaller tool results.** Eligible logs, JSON, diffs and documents shrink
  before the model call.
- **The original stays in reach.** In supported agent loops, the model can ask
  for the exact original.
- **Nothing else changes.** A local runtime runs beside your app. Same
  framework, provider, keys and saved history.

21 adapters across TypeScript and Python, including the Vercel AI SDK, OpenAI,
Anthropic, LangChain, Mastra, LiteLLM and MCP.
[Full example](https://docs.caveman.so/docs/sdk/middleware).

### What people said

It started as a joke that made agents talk like cavemen. Then it went to #1 on
Hacker News (904 points) and #1 on GitHub Trending, with more than 108,000
stars on GitHub.

- "It is fun, and it costs you nothing measurable in quality." Denis Shiryaev,
  [JetBrains](https://blog.jetbrains.com/ai/2026/07/speak-to-ai-agents-like-cavemen-tosave-tokens/)
- "A senior OpenAI employee has contributed code to the project, simply called
  'caveman.'" Joseph Cox, 404 Media
- "The Elastic-Caveman initiative has successfully optimized AI response size
  without compromising quality or functionality." Sri Kolagani,
  [Elasticsearch Labs](https://www.elastic.co/search-labs/blog/elastic-caveman-ai-token-reduction)
- "Turns out, you can understand the caveman output just fine." Al Williams,
  Hackaday

Cited in research: [CAVEWOMAN](https://arxiv.org/html/2606.24083v1), Adeyemi,
Rossi & Dernoncourt. Free and open source under Apache-2.0. Verbatim excerpts,
each linked to its source; community reactions are not benchmarks.

## Caveman Cloud

See what every agent run costs, cut the waste, and improve on Autopilot.

| | |
| --- | --- |
| For | The company paying for the agents |
| Runs | Hosted, or in your VPC on Enterprise |
| Works with | Coding agents, your own SDK calls, LiteLLM |
| Price | Private preview. [Book a call](https://cal.com/caveman/chat). |

### Inside Caveman Cloud

A tour of the console, screen by screen. The screens show a demo workspace
with fictional data.

1. **Analytics. See what every agent costs.** One bill, split by agent, model
   and day: what your agents cost over the last 30 days, one colour per agent,
   and the money Caveman saved beside it. Green means verified.
2. **Traces. Every request, on the record.** Look up any call your agents
   made: which ones failed, and what each cost.
3. **Team. See who uses what.** Spend for each coding agent, across everyone
   on your team.
4. **Improvements. Caveman finds the waste.** Every fix it suggests says what
   it would save you, and is tried on your old requests first. On Autopilot,
   Caveman tries each change on a small share of traffic first, switches it
   back if quality slips, and asks you to keep it.
5. **Evals. Evals so easy, a caveman could do it.** Your own requests become
   tests, and every change gets graded before it ships. Pass a workload's
   quality gate and the higher Autopilot levels unlock.

[Try the demo](https://caveman.so/demo): a sample workspace, fictional data,
nothing to install.

### Govern

Set the limits. Keep the record. Soft and hard caps per project, rate limits
per key and workflow, and rules that mask or block what should never reach a
model. Owners and admins get an Inbox item and an email when a cap is crossed,
and every change lands in the audit log.

### What stays yours

- Your coding agents talk straight to your provider, with your key. Caveman
  gets a routing ask, never the request.
- On Enterprise, Caveman Cloud runs in your VPC, on your KMS and storage, with
  content sharing locked off.
- The local tools need no account and keep working if Cloud is unreachable.

## Savings

The calculator on the homepage takes your team size and monthly agent spend
and applies each layer in turn: reads less, says less, picks the model. The
figures come from separate studies and are multiplied, one after another; they
were not measured together, so the result is an estimate, not a bill.

## Get started

```sh
npm i -g @caveman-ai/cli && caveman setup --install
```

Free and open source, for the agent you run or the one you build. For your
team's agents, [book a call](https://cal.com/caveman/chat) or
[try the demo](https://caveman.so/demo).

## 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

[Caveman](https://caveman.so/caveman) ·
[Caveman Cloud](https://caveman.so/cloud) ·
[Pricing](https://caveman.so/pricing) ·
[Enterprise](https://caveman.so/enterprise) ·
[Compare](https://caveman.so/compare) ·
[Guides](https://caveman.so/guides) ·
[News](https://caveman.so/news) ·
[About](https://caveman.so/about) ·
[GitHub](https://github.com/JuliusBrussee/caveman)

## Before you install

### What does Caveman do?

Caveman helps AI agents do the same work with fewer tokens. It asks for shorter replies, 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. Shorter replies also work in agents such as Cursor. Support for shorter replies and for context compression differs by agent, so check the setup guide for yours before installing.

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

### Do I need a Caveman account?

The local CLI, shorter replies and context compression work without a Caveman account. You still need the credentials or subscription required by your model provider or coding agent. Adaptive model selection is in early access, and Caveman Cloud is in private preview.

[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)
