Starting with lmctl autorun

This small example prints the two provider-role markers as ordinary strings. Running it directly with lmscript does not contact a provider or create a session. When lmctl autorun runs a role-declaring script, it substitutes the marker values before checking and executing the script.

The autorun command requires a newer build than @lmctl-ai/lmctl 0.2.373. The direct lmscript command below works with the tutorial compiler.

Script: autorun-entry.lms

// autorun-role: Lead provider=claude model=claude-sonnet-5-5
provider = "@role(Lead.provider)";
model = "@role(Lead.model)";
println(f"Autorun role: {provider} / {model}");
println("Add your task here, then run this file with lmctl autorun.");

Run it

lmscript examples/autorun-entry.lms

Output

Autorun role: @role(Lead.provider) / @role(Lead.model)
Add your task here, then run this file with lmctl autorun.

Next: Writing an autorun script

Try it: download examples/autorun-entry.lms, save it under examples/ in a writable working directory, then run the command above from that directory.