Skip to content
Talk to our solutions team

Run your first automation

A piece of automation running, and its result where you can see it.

When you finish you will have the edit-run loop every other guide here builds on, on both surfaces.

The alternative to a direct runner is testing your logic by running the thing that uses it.

Without thisWith this
To test a five-line transform you run a whole pipelineYou run the five lines
A syntax error surfaces after a deployIt surfaces in under a second
The feedback loop is minutesIt is milliseconds

The kis CLI. Nothing else — no service, no network.

hello.yaml:

name: hello
tasks:
- name: greet
print:
message: "hello, {{name}}"

A flow is a list of named nodes. This one has a single node that writes into the run log, and {{name}} reads a run variable.

Terminal window
kis flow -f hello.yaml -v name=world
hello, world
execution engine instance Status: completed Completed Nodes: [greet]

-v sets a run variable. The last line is the part worth reading: the engine reports which nodes completed, which is the record a flow keeps and a script does not.

A flow’s output is whatever its nodes write, plus the completion line. To carry a value between nodes, capture it with setvar and read it back with {{ }}:

name: hello
list: true
tasks:
- name: whoami
shell:
script: whoami
setvar: user
- name: greet
print:
message: "hello, {{user}}"

Note list: true. A flow is a graph and there is no fall-through — without it, or without next: on each node, only the first node runs and the run still reports completed. See Graphs and sequences.

These are not alternatives you must choose between at the start. A script runs unchanged inside a flow, with the same entry point and the same arguments:

name: hello
list: true
tasks:
- name: greet
script:
language: javascript
file: ./hello.js
args: ["world"]
setvar: out
- name: show
print:
message: "{{out.greeting}}"
hello, world
execution engine instance Status: completed Completed Nodes: [greet show]

That is the working order most people settle on: prototype as a script because the loop is a second long, then move it into a flow when it needs to run somewhere other than your terminal.

SurfaceYou should see
FlowYour message, then Status: completed naming every node you expected
ScriptYour object on the Result: line

If the flow reports completed but ran fewer nodes than you wrote, that is the fall-through trap — add list: true or next:. If the script printed a timing line and nothing else, you omitted --debug.

ChangeFlowScript
Pass values in-v k=v, or -e file.yamlpositional args, or --vars k=v
Choose what runs-n <flow-name>, -t <nodes>--func handler
Longer-running worklet the node run; the flow has no wall clock of its own--timeout ms, default 5000
See more-l debug--debug