Reference

The API is the filesystem and the engine

Casa is local-first, so its programmatic surface is not a hosted REST API. It is the engine CLI, the brain files, and their formats: stable interfaces any script, agent, or harness can drive.

Note: No hosted API

There is no capx.ai endpoint to call and no API key to manage. Everything on this page runs on your machine, against your repository.

Engine CLI

The deterministic engine ships as Node CLIs with zero runtime dependencies. The reference harness's skills wrap these commands; any shell-capable agent or script can call them directly.

Engine commandsshell
node casa/engine/casa.mjs route # compute the eligible playbook setnode casa/engine/casa.mjs next # rank ready work against the constraintnode casa/engine/casa.mjs state get # read canonical state as JSONnode casa/engine/casa.mjs gates check # list actions waiting on a human
CommandReadsWrites
routebuild-map.json, state.jsonNothing; pure
nextstate.json, pulse, ledger.jsonlNothing; pure
state getstate.jsonNothing
state setstate.jsonstate.json, via validated transition
gates checkdials.json, ledger.jsonlNothing
Tip: Pure by default

Engine commands that answer questions never mutate. The only engine writer is state set, and it validates every transition against the same rules the reference harness uses.

Attestation commands

Rendering, signing, and checking an attestation are local operations. Casa renders. The sidecar signs. There is no network step.

Attestation commandsshell
node caf/keygen.mjs company-brainnode scripts/brain.mjs attest company-brainnode caf/sign.mjs company-brainnode caf/check.mjs company-brain
CommandReadsWrites
caf/keygen.mjsNothing (creates keys)A local signing identity
brain.mjs attestThe company brainA CAF projection
caf/sign.mjsThe projectionA signed envelope
caf/check.mjsThe signed envelopeNothing; offline self-check
A self-check, not a verdict

caf check is a self-check, not a verdict. Passing means the record is internally coherent and structurally legal. It does not mean the record is true.

File formats

FileFormatContract
NOW.mdMarkdownHuman-first operating summary, regenerated each session
profile.jsonJSONConfirmed company identity; changes only with your approval
build-map.jsonJSONThe selected, sequenced playbook graph
state.jsonJSONCanonical state; one writer, validated transitions
ledger.jsonlJSONLAppend-only events: activity, approvals, learnings
dials.jsonJSONPer-department autonomy settings
outputs/MarkdownOperator deliverables, organized by department

Exit codes

CodeMeaning
0Success
1Invalid input or unreadable brain
2Refused: the action is behind a human gate
3State conflict: the transition is not valid from the current state

Stability

  • Brain file formats are versioned; changes are additive wherever possible
  • Engine commands and flags stay stable within a major version
  • Anything not documented here is internal and may change without notice

Next steps