Skip to main content
A .method file is YAML (JSON also works). New files use format: method/3.4. Files in method/3.1 to method/3.3 load and run unchanged. The specification and JSON Schema define the format. method schema prints a short field reference.

A complete Method

The quickstart example (download) runs one script and one check script:
format, name, goal, steps, and result are required. Everything else is optional.

Top-level fields

The top of the shipped support-triage example:

Steps

Each step has exactly one of do or ask. The do kinds are:
  • run: a script, with runtime (node or python), entrypoint, and optional args.
  • call: one model request, with prompt and an optional model.
  • agent: a model with tools, with prompt, tools, and an optional model.
  • classify: a classifier answer. See Classify steps.
A step’s model is a name from models:, a model ID, or absent (the account’s default hosted model). Any other name is the error unknown_model. Other step fields: name, purpose, in (local names for references, such as text: inputs.text), out (typed outputs), check, limits, changes, effects, when (a boolean reference), after, each (once for each item of a list), concurrency (items at the same time, with each), repeat, and accept (accepted warnings, see The issue checker). Types are text, number, boolean, record (with fields), list (with items or fields), and file (a value with path and sha256). Prompts can insert declared inputs with {{name}} or {{customer.name}}.

Effects

An external change is confirmed by reading the changed system, not by trusting the script’s receipt.
  • A files connection in changes needs nothing: the runtime reads the folder before and after the step.
  • A step that changes another connection (a service, email, a browser that sends) needs effects, or a one-sentence no_effect_reason.
  • An effect has an intent, optional in bindings, and an observe reader. The built-in observers http, sqlite, and file need no script.
From the support-triage example:
A contradicted effect fails the run. When no reading confirms the change in time, the run is unconfirmed and the CLI exits 3. method observe makes later readings. Observed effects are a different thing: a record of what a script process did. See Observed effects.