Skip to content

Generate, Run & Replay

The core generate → run loop, plus exporting chains to disk and replaying past runs. Generation and execution call a model, so they take from a few seconds to several minutes and cost money on a paid endpoint.

Generate a chain from a free-form task description.

Terminal window
maestro generate "weather report for SF" --save weather --output /abs/weather.json
maestro generate "summarise a PDF report" --mode deep --json
FlagPurpose
--mode fast|deepGeneration mode. Without it the generator’s own default applies.
--save NAMESave the chain to Memory under NAME (a new entity). Without it nothing is saved.
--output PATHWrite the chain to a file; format from the extension (.json / .py).
--output-format json|pythonOverride the export format.
--jsonPrint the chain as JSON instead of a summary line.

If generation fails on authentication or an expired token, the CLI prints one hint pointing at maestro init (re-seed credentials) and maestro doctor (check the endpoint) instead of a traceback.

Fetch a saved chain from Memory and preflight it. Preflight reports the tools, MCP servers and skills the chain needs and which are missing; it calls no model. Add --execute to run the chain.

Terminal window
maestro run weather # preflight only
maestro run weather --execute --input city=Paris --save-result paris-run
maestro run report-digest --execute --file /abs/report.pdf
maestro run weather --export /abs/chain.py # export, don't run
FlagPurpose
--channel NAMEVersion channel to read (default latest).
--executeExecute the chain after preflight. Needs the carl extra and a model key.
--task TEXTOverride outer_context. Without it the stored task description is used.
--input KEY=VALUEAdd a pair to context.memory['input'] (repeatable).
--file PATHAttach a file’s contents under its basename (repeatable).
--classify-files heuristic|modelHow to decide which skill steps read an input file: heuristic (keyword match, default, deterministic) or model (asks the model, needs a key).
--save-result NAMESave a run digest as a memory_card tagged run-record and chain:<id>. Requires --execute.
--export PATHAlso write the fetched chain to a file (.json / .py).
--export-format json|pythonOverride the export format.
--jsonPrint the preflight result as JSON.
--log PATHAppend a structured debug log of the run (invocation, fetch, preflight, export, execution, persistence).
--log-level debug|infoinfo (default) logs milestones; debug adds tracebacks and the fetched chain.

Step through a saved ReasoningResult / RunRecord JSON from an earlier run. Use - to read from stdin.

Terminal window
maestro replay /abs/run.json # whole session, one block per step
maestro replay /abs/run.json --step 2 # only step 2 (0-indexed)
cat run.json | maestro replay -
FlagPurpose
--step NRender only step N (0-indexed).
--jsonStructured payload (chain metadata + every step) instead of the walkthrough.

When STARM solver servers are configured, the generator can plan solve_sudoku, solve_maze and the other solver tools into a chain, and run --execute calls them. On the CLI a solver failure comes back as text for the next step, and an answer that fails the local check is marked REJECTED by a local check. See STARM solvers.

Run maestro <command> --help for the authoritative flag set.