Browse docsMenu

CLI

Workflows

Create workflow definitions, upload graphs, install triggers, start runs, and resume waits.

Workflow build order

  1. 1
    Design the SOP.
  2. 2
    Create tables, functions, and agents first.
  3. 3
    Run each function standalone and save the response shape.
  4. 4
    Create the workflow shell.
  5. 5
    Upload the graph with real function_name and agent_name values.
  6. 6
    Install the workflow if start type is scheduled, event, or datastore event.
  7. 7
    Run a realistic test and inspect run output.

Definition and graph

bashcopy
lemma workflow create --pod-id <pod-id> --payload-file ./payloads/workflow-create.json
lemma workflow graph-update expense-review --pod-id <pod-id> --payload-file ./payloads/workflow-graph.json
lemma workflow get expense-review --pod-id <pod-id>

Installs and runs

bashcopy
lemma workflow install-create expense-review --pod-id <pod-id> --schedule-type CRON --cron-expression '*/5 * * * *' --timezone UTC
lemma workflow run-start expense-review --pod-id <pod-id> --payload '{"input":{"expense_id":"exp_123"}}'
lemma workflow run-get expense-review <run-id> --pod-id <pod-id>
lemma workflow run-resume expense-review <run-id> --pod-id <pod-id> --payload-file ./payloads/resume.json