-
Notifications
You must be signed in to change notification settings - Fork 3
Running
theirish81 edited this page Dec 29, 2025
·
1 revision
Running a plan is a synchronous activity, while in reality many levels of asynchronicity happen under the hood.
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.yamlThe output will be printed to the console. Please consult the CLI help to learn about other options, such as output formats and output destination.
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:
-
ProgMapis a map, but you can use any map or struct - the
ResourceLoaderis an instrument to load resources such as files. We'll discuss it in another chapter - The
nilpassed to theRunmethod refers to plan parameters. We'll discuss them in another chapter.