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 npmimport { agent, auto } from "@caveman/agent"; export default agent({ id: "support", instructions: "Answer from policy. Never invent policy.", model: auto(), });
import { run } from "@caveman/agent"; const result = await run(support, "Can I get a refund?"); console.log(result.text); console.log(result.contextBill);
you state behavior, tools, and evals; the runtime picks the cheapest plan that passes every one
every run returns a content-blind bill for what its context cost
model choice never breaks a warm prompt cache
immutable builds; local results stay inferred, verified stays $0 until production gates pass
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- 01Declarative agents: you state behavior, tools, and evals; Caveman picks the cheapest plan that passes every declared gate
- 02Typed context semantics with content-blind context bills
- 03Cache-safe runtime routing and isolated tools
- 04Locked adapters for Vercel AI SDK 7.0.43, Eve 0.29.2, and Mastra 1.55.0
- 05Immutable Cave Builds; local results stay inferred, and verified savings stay $0 until production rollout gates pass
- 06Zero-provider-call readiness check before your first request
Product ledger
02- Language
- TypeScript
- License
- MIT