Caveman Cloud· Hosted & VPCBuild & Deploy Agents
AGENT.md Format and Deterministic Builds
Complete reference for AGENT.md frontmatter keys, folder layout, lazy skills, subagents, custom tools, determinism rules, and cvm agent build.
An agent build is a folder containing AGENT.md (YAML frontmatter plus Markdown instructions), or a single .md agent file. Running cvm agent build compiles that folder offline into a deterministic agent.json manifest and SHA-256 digest matching the public schema https://caveman.so/schemas/agent-build.schema.json.
Folder layout#
my-agent/
├── AGENT.md # Frontmatter + instructions (required)
├── skills/
│ └── refunds/
│ └── SKILL.md # Lazy-loaded skill (every file under skills/<name>/)
├── agents/
│ └── security/
│ └── AGENT.md # Nested subagent (every file under agents/<name>/)
├── tools/
│ └── prorate_refund.mjs # Custom code tool annotated with // @caveman-tool
└── evals/
└── basic.eval.json # Eval files (*.eval.json, *.eval.yaml, *.eval.yml)Anything outside those conventions is reported as excluded from the build. With no path argument, cvm agent build builds ./AGENT.md, or a single agent located under .caveman/agents/ (<name>.md or <name>/AGENT.md).
Build and inspect locally (no network)#
cvm agent build ./my-agent
cvm agent build ./my-agent --out ./dist-buildWithout --out, nothing is written to disk. --out requires a new or empty directory and writes agent.json plus all included build files.
Frontmatter keys#
cvm agent build parses fourteen frontmatter keys directly:
---
name: support-triage
description: Route billing tickets and draft refunds
engine: caveman
model: claude-sonnet-5-5
computer: none
connectors:
linear:
tools: [list_issues, create_issue]
after_untrusted: approve
drives:
/kb: support-kb
/memory: { drive: support-memory, write: true }
secrets: [STRIPE_KEY]
budgets:
tools: 4000
channels:
slack:
events: [app_mention, direct_message]
thread_mode: session
approvals: interactive
schedules:
daily-audit:
cron: "0 9 * * 1-5"
timezone: "UTC"
task: "Summarize open escalations."
concurrency: skip
budget_usd: 2
output_schema:
type: object
required: [verdict, summary]
properties:
verdict: { type: string }
summary: { type: string }
---
Your agent instructions go here.Frontmatter syntax rules#
Frontmatter supports plain and quoted scalars, inline arrays [a, b], inline objects {a: b} (single-line or indented), block lists, nested block maps, or a single JSON object.
The parser fails closed (exit 2) with an exact line number on:
- YAML block scalars (
|,>), anchors, aliases, or tags - Tab indentation
- Multi-line scalar continuations
- Unrecognized connector fields or out-of-range tool budgets
Determinism and size limits#
Two identical folders always produce the exact same agent.json SHA-256 digest:
- Files are sorted bytewise by relative path.
- No timestamps, git commits, local machine paths, or credentials enter
agent.json. - Refused (exit
2): symlinks, non-UTF-8 binary files, any file over2 MiB,AGENT.mdoragent.jsonover256 KiB, or a total build over8 MiBor1,000files.
Compile from TypeScript#
@caveman-ai/agent exposes the exact same folder compiler programmatically:
import { compileAgentFolder } from "@caveman-ai/agent";
const build = compileAgentFolder("./my-agent");
console.log(build.digest);Verify and undo#
Validate a folder without touching the network:
cvm agent build ./my-agent --format jsonNext: test locally and ship with Deploy, Run & Rollback.