On this page
Sommatic Docs
Open portal

Workflows

A workflow is a versioned graph of nodes that Sommatic AI runs step by step when a trigger fires. Design it in the studio or in Git, test the draft, publish a version and follow every run.

View as Markdown
Open in

A workflow turns an event into work: an email arrives, a webhook is called or a schedule ticks, and Sommatic AI runs a graph of nodes that classify, transform, call systems and, when the case needs a person, open a task. Every run is recorded node by node, so you can always answer what happened, with which data and why.

How a workflow is built

A workflow is a graph: nodes connected by edges.

  • A node runs one operator from the node catalog (ai.classify, io.http, flow.if…). It has a label, a stable node_id, its config and its output ports.
  • An edge connects the port of one node to the next node: { "from": { "node_id": "…", "port": "out" }, "to": { "node_id": "…" } }.
  • The first node is a trigger: it decides how a run starts (webhook, schedule, mailbox, queue, another workflow or by hand).

Nodes read data from earlier nodes with expressions, for example {{ $('Classify request').item.json.label }}.

Draft, version and run

ObjectWhat it is
Flow definitionThe workflow you edit. Its draft (draft_nodes, draft_edges) changes every time you save.
Flow versionAn immutable snapshot of the draft, created when you publish. Production runs use the latest published version.
Flow instanceOne run: its status, its variables and the node it is on.
Node executionThe record of one node inside a run: its output, port and timing.

How a run moves

Sommatic AI’s engine runs the graph one node at a time:

  1. The trigger creates the instance and its input becomes $json for the first node.
  2. The engine runs the current node. The node returns an envelope: { ok, data, port, meta? }.
  3. The port picks the edge to follow (out by default; true/false in flow.if; error when something fails).
  4. The instance state is saved after every node, so a run can be inspected and resumed.

A run stops when no edge leaves the chosen port. One tick runs at most 100 steps, a ceiling that protects you from accidental loops.

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs