Skip to content

dev-formata-io/stof-weave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StofWeave

Smart, composable AI workflows in a single declarative Stof file.

What is StofWeave?

Simple, modular, and composable Stof workflows with built-in validation, defaults, units, logic, and more, with no extra glue code required.

Example

import "@weave";

Weave workflow: {
    str out: ""

    jobs: [
        () => {
            let out = &self.out;
            out.push("first");
        },
        {
            #[run]
            fn fourth() {
                self.async_handle(async {
                    sleep(5ms);
                    let out = &self.weave().out;
                    out.push("\nfourth");
                });
            }
        },
        {
            #[run(0)]
            fn second() {
                let out = &self.weave().out;
                out.push("\nsecond");
            }

            #[run(1)]
            fn third() {
                let out = &self.weave().out;
                out.push("\nthird");
            }
        },
    ]

    finalize: () => {
        let out = &self.out;
        out.push("\nfinal");
    }
}

#[main]
fn run_workflow() {
    self.workflow.run();
    pln(self.workflow.out);
}
stof run example.stof
first
second
third
fourth
final

Differentiators

  • Simplicity
  • Built-in Validation & Healing
  • No Glue Code
  • Composability
  • Stof units, types, logic, etc.

License

Apache 2.0. See LICENSE for details.

Package Stof CLI Command

Run this Stof CLI command to create a pkg file for use.

stof pkg . dist/weave.pkg

Install (unpackage) StofWeave

Run this Stof CLI command to unpack the weave.pkg file into you "stof" folder. After execution, StofWeave will be available as import '@weave'; in your Stof code.

stof unpkg dist/weave.pkg

Feedback & Community

  • Open issues or discussions on GitHub
  • Chat with us on Discord
  • Star the project to support future development!

Reach out to info@stof.dev to contact us directly

About

Simple, composable AI workflows in a single declarative Stof file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published