Caveman
Agent toolkitin development

Caveman Agent SDK

Agent declares goal. Caveman picks cheapest plan that passes

An efficiency-native TypeScript agent framework. You declare behavior, tools, and evals; Caveman chooses the cheapest plan that passes every gate you declared. Locked adapters drop it into Vercel AI SDK, Eve, and Mastra. Caveman Code is the standalone proof of the approach; Cave Agent, the Cloud optimizer, is a different product. Implemented and pack-tested; not yet published to npm.

Product demo / Caveman Agent SDK

real code from the README · not yet on npm
the smallest agentverbatim from the README
import { agent, auto } from "@caveman/agent";

export default agent({
  id: "support",
  instructions: "Answer from policy. Never invent policy.",
  model: auto(),
});
run itverbatim from the README
import { run } from "@caveman/agent";

const result = await run(support, "Can I get a refund?");
console.log(result.text);
console.log(result.contextBill);
what the runtime does with that
declared gates

you state behavior, tools, and evals; the runtime picks the cheapest plan that passes every one

context bills

every run returns a content-blind bill for what its context cost

cache-safe routing

model choice never breaks a warm prompt cache

cave builds

immutable builds; local results stay inferred, verified stays $0 until production gates pass

locked adapters
Vercel AI SDK 7.0.43Eve 0.29.2Mastra 1.55.0
the proof it's worth it

Caveman Code, our standalone agent with the whole caveman stack built in, measured 1.93× fewer tokens across 25 matched coding tasks, passing 14 of 25 against the reference's 15.

Capability ledger

06
  1. 01Declarative agents: you state behavior, tools, and evals; Caveman picks the cheapest plan that passes every declared gate
  2. 02Typed context semantics with content-blind context bills
  3. 03Cache-safe runtime routing and isolated tools
  4. 04Locked adapters for Vercel AI SDK 7.0.43, Eve 0.29.2, and Mastra 1.55.0
  5. 05Immutable Cave Builds; local results stay inferred, and verified savings stay $0 until production rollout gates pass
  6. 06Zero-provider-call readiness check before your first request

Product ledger

02
Language
TypeScript
License
MIT

Product index

07