Skip to content
Cavemandocs
01Proxy/BSL-1.1

Configure

Feature flags, caveman.yaml, local storage, and how mode is chosen.

Two files, two jobs. Feature configuration tells caveman wrap which switches are on. Proxy configuration tells caveman start how the listener binds and which provider endpoints it may call. API keys belong in neither file.

Feature file
Printed by caveman tools config path
Proxy file
~/.caveman/caveman.yaml
Usage store
~/.caveman/caveman.db
Recovery store
~/.caveman/ccr.db

Feature configuration#

Inspect the resolved path and a single key:

terminal
caveman tools config path
caveman tools config get think.mode
caveman tools config set think.mode compress

A project may add a restricted overlay at ./.caveman/config.json. The overlay can set think.toon, think.shrink, remember.*, and execute.*. It cannot change think.mode, think.core, or pixel settings. A checked-in project file is not allowed to silently turn on a more invasive transform.

KeyDefaultMeaning
think.modecompresscompress, record, or pixel
think.coretrueCore context compression
think.toontrueAllow TOON when it is smaller
think.shrinktrueShrink command output where supported
think.pixel.models[]Models allowed to receive pixel context
think.pixel.densitybalancedconservative, balanced, or max
remember.memtrueLocal memory integration
remember.offloadautoauto, on, or off
remember.recallfalseAutomatic memory recall
execute.mcpautoMCP recovery wiring
execute.browse_tooltrueBrowser tool integration
execute.browse_clifalseBrowser command integration
execute.delegatefalseDelegation integration
execute.proxytrueRoute supported agents through the local proxy

Environment overrides beat the stored file. Use them for one session; use config set for a choice you want to keep.

VariableKey
CAVEMAN_WRAP_MODEthink.mode
CAVEMAN_COREthink.core
CAVEMAN_TOONthink.toon
CAVEMAN_SHRINKthink.shrink
CAVEMAN_MCPexecute.mcp
CAVE_PIXEL_MODELSthink.pixel.models
CAVE_PIXEL_DENSITYthink.pixel.density

CAVEMAN_MODE also overrides wrap and start mode when it is set.

Proxy configuration#

Default path: ~/.caveman/caveman.yaml. CAVEMAN_CONFIG loads a different file. A missing file is valid: the listener starts in record on 127.0.0.1:8787.

yaml
label: local
mode: record
listen: 127.0.0.1:8787
optimizers: {}
subscription_compress: live_zone
toolschema_strip: off
breakpoint_plan: frontier
providers: {}
compat: {}
FieldMeaning
labelTag on local usage rows. Trials set this through CAVEMAN_LABEL.
modeRuntime mode. Unknown values become record.
listenLoopback host:port only.
optimizersPer-id overrides. Three provider-cache planners default on.
subscription_compresslive_zone (or empty) allows eligible subscription compression. off and any unknown value disable it.
toolschema_stripOnly annotations turns this on. Everything else, including empty, is off.
breakpoint_planCache-breakpoint planner. Default frontier. Explicit off disables it. Unknown values become off.
providersEndpoint, billing tier, and region overrides. No secrets.
compatNamed OpenAI-compatible mounts.

The three planner ids that default on are anthropic-cache-breakpoints, openai-prompt-cache-key, and bedrock-cache-points. Set any one to false to disable it. Planner metadata does not change model-visible bytes. Record mode stays an unconditional pass-through even when they are on.

yaml
providers:
bedrock:
region: eu-west-1
azure:
base_url: https://example-resource.openai.azure.com

compat:
local-model:
base_url: http://127.0.0.1:11434/v1
api_key_env: LOCAL_MODEL_API_KEY

caveman start flags for one run:

terminal
caveman start
caveman start --port 8787 --host 127.0.0.1
caveman start --config /path/to/caveman.yaml

--host still has to be loopback. The binary refuses anything else.

Environment the binary reads#

VariableRole
CAVEMAN_CONFIGPath to caveman.yaml
CAVEMAN_MODEOverride YAML mode
CAVEMAN_LISTENOverride listen address
CAVEMAN_LABELOverride row label
CAVEMAN_HOMEOverride the ~/.caveman directory
CAVEMAN_PROXY_BINExplicit path to the proxy binary
CAVEMAN_SUBSCRIPTION_COMPRESSOverride subscription_compress
CAVEMAN_TOOLSCHEMA_STRIPOverride toolschema_strip
CAVEMAN_BREAKPOINT_PLANOverride breakpoint_plan
CAVEMAN_OBSERVE_ESTIMATERecord-mode observe-only estimation
CAVE_SSRF_ALLOWLISTExact hosts allowed as private or loopback upstreams
CAVE_BEDROCK_REGIONBedrock region, before AWS_REGION
CAVE_BEDROCK_MANTLE_ENABLEDEnable /bedrock/anthropic

Companion binaries resolve in this order: the matching CAVEMAN_*_BIN override, then PATH, then ~/.caveman/bin.

Local storage#

Default state lives under ~/.caveman:

PathContents
bin/Verified companion binaries
caveman.dbRequest usage, prefix-replacement cache, trials, learn data
ccr.dbExact recovery payloads and typed working-memory objects
caveman.yamlProxy configuration
receipts/Local native-agent run receipts when produced

CCR defaults to 512 MiB of payloads, tunable with CAVEMAN_CCR_MAX_BYTES. At the cap, new lossy transforms pass through. Existing handles are never evicted. See Recoverable compression.

Protect these files the way you protect agent transcripts. They can contain recovered prompts.

Stats#

terminal
caveman stats
caveman stats --json
caveman-proxy stats
caveman-proxy stats --recent 20

Rows are local and inferred. They do not become a monthly total or a dollar field.

Precedence#

Feature configuration resolves from defaults, then the global file, then the allowed project overlay, then environment. Proxy mode resolves from default, then YAML, then CAVEMAN_MODE. Command flags (--off, --pixel) select one session.

When resolution fails or a mode is unknown, the runtime uses record or original-byte behaviour. It does not guess.