# Caveman > Documentation for the open Caveman stack: the agent skill, the compression engine, and cavemem. What each layer does, what it costs, and how every number is counted. Caveman is an efficiency stack for AI agents, in four layers. Skill (00) shapes what the agent writes. Engine (01) compresses payloads and keeps the originals recoverable. Memory (02) stores context so it is not resent. Cloud (03) is the managed plane and is the only paid layer. Layers 00 to 02 run on the reader's own machine and their source is public. Measurement vocabulary. These three words are fixed and are not interchangeable: - `inferred`: A local, per-run estimate computed on your own machine from an offline token counter. Every public Caveman tool emits this and nothing else. Not a saving, not a dollar figure, and never valid to multiply into a monthly or annual total. - `measured`: Traffic that was actually observed, rather than estimated from bytes. Not proof that a dollar was saved. Observing a request is not comparing it to its alternative. - `verified`: A saving confirmed against a real bill by a hosted rollout system that ran both arms of the comparison. No tool documented on this site can emit it. There is no configuration, flag or account tier that upgrades a local number to this. Every tool documented here emits `inferred`. None of them can emit `verified`, and no setting changes that. Local figures are never multiplied into a monthly total and never converted to money. How to read this site without HTML: - Append `.md` to any page URL, for example https://docs.caveman.so/docs/engine.md - Or send `Accept: text/markdown` to the page URL itself and get the same thing back - https://docs.caveman.so/llms-full.txt is every page in one file - https://docs.caveman.so/llms-index.json is a machine index: headings, anchors, licences and last-changed dates Last changed: 2026-08-26T04:05:35+02:00 ## Start - [Overview](https://docs.caveman.so/docs): What Caveman is, which parts are open, and where to start reading. - [Quickstart](https://docs.caveman.so/docs/quickstart): Install the skill and compress a real payload in about five minutes. - [Architecture](https://docs.caveman.so/docs/architecture): The path a request takes through the stack, and where the open-core line falls. - [How numbers are counted](https://docs.caveman.so/docs/counting): Inferred against verified, per run against per month, and the four rules the code follows. ## 00 Skill What the agent does before it calls out. - [Skill](https://docs.caveman.so/docs/skill) [MIT]: A set of instructions that changes how your agent spends tokens. No runtime, no proxy. - [caveman learn](https://docs.caveman.so/docs/skill/learn) [MIT]: Profile a local agent session and rank what is actually eating the budget. - [caveman explore](https://docs.caveman.so/docs/skill/explore) [MIT]: Read a repository without dragging every file into context. - [Agent profiles](https://docs.caveman.so/docs/skill/profiles) [MIT]: The registry of coding agents the skill knows how to configure. ## 01 Engine What the payload weighs when it leaves. - [Engine](https://docs.caveman.so/docs/engine) [BSL-1.1]: Content-aware compression that keeps the parts an answer depends on. - [Compressors](https://docs.caveman.so/docs/engine/compressors) [BSL-1.1]: One router per content shape: JSON, logs, code, diffs, search results, prose. - [Recoverable compression](https://docs.caveman.so/docs/engine/recoverable) [BSL-1.1]: Why lossy stays honest: every removed byte can be fetched back. - [Token counting](https://docs.caveman.so/docs/engine/tokens) [BSL-1.1]: The offline counter behind every ratio the engine reports. - [caveman-shrink](https://docs.caveman.so/docs/engine/shrink) [MIT]: Shrink command output before it reaches the model. ## 02 Memory What you never have to send twice. - [Memory](https://docs.caveman.so/docs/memory) [MIT]: cavemem holds the context you would otherwise paste into every session. - [Recall and offload](https://docs.caveman.so/docs/memory/offload) [MIT]: Moving a heavy instruction file out of the prompt and into recall. ## 03 Cloud What a fleet can put in front of finance. - [Cloud](https://docs.caveman.so/docs/cloud) [Commercial]: The managed plane: fleet visibility, spend attribution, and verified numbers. ## Build with it - [CLI](https://docs.caveman.so/docs/cli) [MIT]: The command surface: compress, detect, learn, and agent setup. - [TypeScript SDK](https://docs.caveman.so/docs/sdk/typescript) [MIT]: Compress payloads and read spend from Node. - [Python SDK](https://docs.caveman.so/docs/sdk/python) [MIT]: The same surface for Python agents. - [Agent SDK](https://docs.caveman.so/docs/agent-sdk) [MIT]: Build an agent that is efficient by construction. - [MCP server](https://docs.caveman.so/docs/mcp) [MIT]: Expose compression and recall as tools any MCP client can call. - [caveman-browse](https://docs.caveman.so/docs/browse) [BSL-1.1]: Read web pages as compressed accessibility trees instead of raw HTML. ## Reference - [Licensing](https://docs.caveman.so/docs/licensing) [MIT]: Which surfaces are MIT, which are BSL 1.1, and what that means for you. - [Telemetry](https://docs.caveman.so/docs/telemetry) [MIT]: What the CLI sends, what it never sends, and the three ways to turn it off. - [Eval graders](https://docs.caveman.so/docs/evals) [MIT]: The grader set used to check that compression did not change an answer. - [Provider catalog](https://docs.caveman.so/docs/provider-catalog) [MIT]: The model price table every cost figure is read from. ## Optional - [Caveman](https://caveman.so): the product site, pricing, and the Cloud waitlist. - [Product index for machines](https://caveman.so/llms.txt): that site's own llms.txt. - [Source](https://github.com/JuliusBrussee/caveman): the public repository behind everything documented here.