Skip to content

Running

theirish81 edited this page Dec 29, 2025 · 1 revision

Running a plan

Running a plan is a synchronous activity, while in reality many levels of asynchronicity happen under the hood.

CLI

Running a plan is straightforward. Let's assume you saved your plan as plan.yaml in the current directory. To run it just invoke:

frags run plan.yaml

The output will be printed to the console. Please consult the CLI help to learn about other options, such as output formats and output destination.

Go

Instantiate a Runner, assign it a SessionManager and run it:

runner := frags.NewRunner[frags.ProgMap](sm, frags.NewFileResourceLoader("."), ai)
res, err := runner.Run(nil)

Notes:

  • ProgMap is a map, but you can use any map or struct
  • the ResourceLoader is an instrument to load resources such as files. We'll discuss it in another chapter
  • The nil passed to the Run method refers to plan parameters. We'll discuss them in another chapter.

Clone this wiki locally