a22a docs
Concepts

Projects

A project is a set of named workflows, deployed together as one document.

Deploying a project

A project is a set of named workflows. Deploy them together as one document; each deploy creates a new version, and runs in progress stay on the version they started with. Deploying a document identical to the latest version creates nothing and returns that version.

await a22a.projects.deploy({
  project: "acme",
  workflows: {
    summarise: { steps: [ … ] },
    translate: { steps: [ … ] }
  }
});
// { project: "acme", version: 2, workflows: ["summarise", "translate"] }
Runs keep their version
Deploy v1Invoke run AUses v1Deploy v2While run A is runningRun A endsStill on v1Invoke run BUses v2

The CLI builds the same document from a folder. A project is a folder under a22a/; each .json file in it is a workflow, named after the file.

a22a/
  acme/
    summarise.json
    translate.json

Retrieving a project

await a22a.projects.retrieve("acme");
// { id: "…", project: "acme", version: 2, manifest: { … } }

retrieve returns the latest version. A run is queued on the latest version at the moment it is invoked. A workflow left out of the latest version can no longer be invoked.

Names

Project, workflow and step names are lowercase letters, digits and dashes, up to 32 characters, starting and ending with a letter or digit. A workflow's URL is built from its project and its name:

POST https://api.a22a.sh/v1/run/<project>/<workflow>

On this page