Skip to content

dev-formata-io/stof-weave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 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";

#[type]
#[extends("Job")]
First: {
    #[run]
    fn first() {
        self.async_handle(async {
            sleep(10ms);
            const diff = Time.diff(self.get("start"));
            self.set("first", diff);
        });
    }
}

#[type]
#[extends("Job")]
Second: {
    #[run(0)]
    fn second_0() {
        const diff = Time.diff(self.get("start"));
        self.set("second_0", diff);
        sleep(2ms);
    }

    #[run(1)]
    fn second_1() {
        const diff = Time.diff(self.get("start"));
        self.set("second_1", diff);
    }
}

Weave workflow: {
    jobs: [
        new First {},
        new Second {},
    ]
}

#[main]
fn run_workflow() {
    self.workflow.set("start", Time.now());
    self.workflow.run();

    assert(self.workflow.delete("start"));
    pln(stringify('toml', self.workflow.background));
}
stof test examples/simple
first = 10.0
second_0 = 0.0
second_1 = 2.0

Differentiators

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

License

Apache 2.0. See LICENSE for details.

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

Releases

No releases published

Packages

No packages published