Caveman Agent SDK· Open sourceAgent SDK & Harness v4
Evals, 30 Fail-Closed Graders, Session Protocol, and Recipes
Grade agent outputs offline with @caveman-ai/evals (30 fail-closed graders), inspect Session Protocol v1 schemas in @caveman-ai/protocol, and run the 5 starter recipes.
@caveman-ai/evals (MIT) and @caveman-ai/protocol (MIT) ship open-source contracts and graders that run identically offline in CI and on Caveman Cloud.
30 fail-closed graders (@caveman-ai/evals)#
Install the TypeScript grader package (or caveman-evals for Python parity):
npm install @caveman-ai/evalsEvery grader fails closed on missing fields, schema mismatches, or invalid targets. Categories include:
- Deterministic text & JSON checks:
exact_match,contains,regex,json_schema,json_path, forbidden substring checks. - Agent tool-call checks:
tool_called, ordered tool assertions, argument validation,cost_threshold, latency and token bounds. - Metric & retrieval graders: BLEU, ROUGE, localization F1.
- Webhook & rubric judges: SSRF-pinned webhook graders and bias-guarded LLM rubric judges.
Session Protocol v1 (@caveman-ai/protocol)#
@caveman-ai/protocol exports the canonical types and JSON Schemas shared across Harness v4, Caveman Code, and Caveman Cloud:
SessionEventandUserEventwire envelopes- Headless exit codes
0..6 agent-build.schema.json(deterministicAGENT.md->agent.jsonmanifest)eval-file.schema.json(one-file*.eval.jsonCI suites)grader-registry.json(canonical grader option schemas)
React hooks & external framework adapters#
@caveman-ai/react: React hooks for streamingSessionEventtimelines and interactive Caveman Gate approval dialogs.@caveman-ai/adapter-kit: Interfaces for adapting external agent runtimes onto the Caveman Session Protocol.
Five verified starter recipes#
Every recipe under examples/basics/ in caveman-ai/agent-sdk is a standalone 30 to 65 line TypeScript file verified offline in CI:
Next: gate pull requests on Caveman Cloud with Evals & CI Gates.