Use this as a concise reference while authoring agent configs.
version- format:
YYYY-MM-DD.rN(example:2026-03-03.r1)
- format:
inputsagent_schemaactions
inputsis an ordered array with at least one entry- supported input
typevalues:texturlimage
textentries requiretexturlentries requireurlimageentries requirepath- runtime overrides use:
--input-modewithreplace,append, orprepend--input-text--input-url--input-image
- if runtime input flags are provided without
--input-mode, they replace config-definedinputs --input-mode appendkeeps baked inputs first;--input-mode prependkeeps runtime inputs first
agent_schema.typemust be"object"agent_schema.propertiesmust be an object
Supported property type values:
stringnumberintegerbooleanarrayobject
Optional top-level property metadata and constraints:
descriptionon any supported fieldenumonstringfields onlyminimum,maximum,exclusiveMinimum, andexclusiveMaximumonnumberandintegerfieldsenumvalues are exact and case-sensitive- lower bounds may use
minimumorexclusiveMinimum, but not both - upper bounds may use
maximumorexclusiveMaximum, but not both arrayfields must be homogeneousobjectfields must declare their shape explicitly- arrays may contain supported scalar item types or declared-shape object items
- object properties inside structured tool-bound fields may be scalar or
scalar | null
These should fail fast during hatch --check:
- nested arrays
- deeper nested objects
- union types other than
scalar | nullon object properties inside structured tool-bound fields
actionsis an array- each action includes
name,logic, andrun - run steps may use
kind: "exec",kind: "agent",kind: "tool",kind: "email_me", orkind: "generate_image" run[*].argsmust be an array of literal strings and/or{ "var": "field_name" }objectsrun[*].args[*].varmust reference a top-level field declared inagent_schema.properties- structured top-level fields may flow only into tool params
- scalar-first surfaces such as
logic,when,run[*].args, string-part interpolation, and childrun_varsreject structured field references run[*].platformis optionalrun[*].platformmay be a single string or an array of strings- supported platform values are
macos,linux, andwindows - platform values are normalized case-insensitively and should be authored in lowercase in configs/docs
- omitted
platformmeans the step runs on every runtime OS
- every
{ "var": "..." }must match a key inagent_schema.properties - comparison operators (
==,!=,>,>=,<,<=) are validated for operand compatibility
- Validate only:
cargo ai hatch <agent-name> --config <config.json> --check
- Build and export:
cargo ai hatch <agent-name> --config <config.json>
- Overwrite existing exported binary if needed:
cargo ai hatch <agent-name> --config <config.json> --force