Skip to content
Talk to our solutions team

Atoms

Almost everything a platform does between “something happened” and “something changed” is automation: build a service, restore a backup, move a million rows, call a model and act on the answer. kis.ai treats that as a primitive, not a block. Blocks are capabilities a product switches on; operations are how work gets done, and every block uses them.

An operation is one unit of that work — run a shell command, upload to S3, query a database, sign a certificate, embed a document. The platform registers 121 of them across four libraries, and each one is available in two forms.

You reach an atom either declaratively, as a task in a flow, or imperatively, as a function in a script:

name: greet
tasks:
- name: say-hello
shell: echo "hello"
Terminal window
kis flow -f greet.yaml
hello

These are not two implementations that happen to agree. They are two adapters over one function. The shell atom lives in one place; a flow reaches it through a task adapter and a script reaches it through a namespace adapter. Behaviour, parameters and defaults are shared because the code is shared — see Tasks and functions.

That is why the tabs above appear throughout this section. When you see them, you are looking at one atom described twice, not two features to learn.

Neither is the advanced version of the other. They answer different questions.

Write a flow whenWrite a script when
The work is a sequence of steps you want to seeThe work is one computation with logic in it
Steps run on more than one machineIt all happens in one process
You need retries, resume, or restart-where-it-failedA failure means run it again
Someone will read the YAML to know what ranSomeone will read the code to know what it computed
Fan-out over a list is the pointBranching and arithmetic are the point
An operator, not the author, will run itYou are iterating on it right now

The honest short version: a flow is a plan, a script is a calculation. A flow that has grown a long chain of conditionals wants to be a script. A script that shells out five times in sequence and needs each step to be resumable wants to be a flow.

They compose, so the choice is not final. A flow runs a script with the script: task, and a script that outgrows its shell becomes a flow without being rewritten — the calling convention is the same on both sides.

Two engines execute what you write.

FlowsScripts
CLIkis flowkis script
You writeYAMLJavaScript, Lua, Starlark, Go, expr, CEL, or WebAssembly
Unit of worka node in a grapha function call
Atoms arrive astasks — shell:, s3:, db:namespaces — shell.execute(), s3.upload()
Statepersisted per run; resumablein-memory; one shot
Concurrencyworkers, fan-out nodeswhatever the language gives you
ReferenceFlowsScripts

Four flow engines are built on the same core, each with its own task set: Automate, AI Flow, Workflows and Datapipes. They differ in which atoms they expose, not in how they run. See Flow engines.

Atoms are grouped into libraries, and each engine binds its own set. This is the part that surprises people, so it is worth stating plainly: not every engine sees every atom.

EngineAtoms available
kis flow / AutomateThe common library, plus infrastructure operations
AI FlowThe common library, plus AI and streaming operations
WorkflowsThe common library
DatapipesPipeline operations only — the common library is not bound
kis scriptEvery namespace registered in the process

A shell: task works in an Automate flow and does not exist in a Datapipe. That is deliberate — a data pipeline moves records and is not a place to run shell commands — but it is the kind of thing you would otherwise discover from an error message. Libraries has the full mapping.

To understand the model

To write something

  • Flows — the flow file, node types, how execution works
  • Scripts — languages, calling convention, what a script may reach
  • Atom reference — every atom, as a task and as a function

To do a specific job

  • How-tos — guides by role, each showing both surfaces