# Core concepts

> The ideas you need before building in Sommatic AI — artifacts, workflows and their versions, nodes, ports and envelopes, runs, tasks, governed AI and traceability — and how they fit together.

Source: https://docs.sommatic.ai/en/get-started/concepts/ (updated 2026-11-26)

Sommatic AI has a small vocabulary. Once you know how an event becomes a run, how a run moves through a graph and where
people and AI enter, every other page reads as a detail of this one.

## From event to result

Diagram: From event to result: the run is recorded while its nodes run one at a time, a port chooses the edge and a task reaches a person without stopping the run.

1. **An event arrives.** A system calls a webhook, a schedule is due, a mailbox receives mail or another workflow
   chains into this one.
2. **A trigger starts a run.** The trigger is the first node of the workflow. Its output becomes the input of the next
   node.
3. **Nodes run one at a time.** Each node runs one operator from the [catalog](https://docs.sommatic.ai/en/nodes.md): classify a text, call an
   HTTP API, branch on a condition, transform data, open a task.
4. **Ports choose the path.** Each node returns an envelope with a port (`out`, `true`, `error`…). The engine follows
   the edges connected to that port.
5. **People decide when needed.** A node such as [`human.task.create`](https://docs.sommatic.ai/en/nodes/human.task.create.md) opens a task for a
   person.
6. **The run is recorded.** The run, each node execution and the final result are stored and can be inspected.

## Artifacts

Artifacts are the units Sommatic AI runs and governs. Each one is versioned and has an owner organization.

- **Workflows**: orchestrate steps under context and governance. Their execution is deterministic and reconstructible.
- **Agents**: pursue a goal with explicitly authorized tools and limits of time, cost and scope. An agent can propose or act, but a critical action always has an explicit path that does not depend on inference.
- **Apps**: are operational surfaces with their own interface and input and output contracts. A workflow can hand a case to an app through a task.

## Workflows: definition, draft, version

A workflow lives as a **flow definition**. You edit its **draft** (the nodes and edges you save in the studio or sync
from Git). When the draft is ready you **publish** it, which creates an immutable **flow version** with the next
number. Production traffic runs the latest published version; tests run the draft. See
[Lifecycle](https://docs.sommatic.ai/en/workflows/lifecycle.md).

## Nodes, ports and envelopes

A node has a `label`, a stable `node_id`, an `operator_slug` that names what it runs and a `config`. When it runs, it
returns an **envelope**:

```json
{ "ok": true, "data": { "label": "billing" }, "port": "out" }
```

`data` becomes `$json` for the next node, and `port` selects the edges to follow. An edge connects a port of one node
to the next node. See [Ports and envelope](https://docs.sommatic.ai/en/workflows/ports-and-envelope.md).

Nodes read data from the trigger and from earlier nodes with [expressions](https://docs.sommatic.ai/en/expressions.md), for example
`{{ $('Classify request').item.json.label }}`.

## Runs

Each time a workflow starts, Sommatic AI creates a **flow instance** (the run and its status), records a **node
execution** per node and keeps a **flow instance result** with the final envelope, the duration and a summary of the
steps. A run ends `completed` or `failed`; the rules are on [Errors](https://docs.sommatic.ai/en/workflows/errors.md).

## People in the loop

A task is a contract, not a notification: it has an assignee, a priority, an SLA, a payload and an expected output.
Workflows open tasks when a case carries risk or ambiguity. See [Human in the loop](https://docs.sommatic.ai/en/human-in-the-loop.md).

## Governed AI

AI nodes do not call a model directly with an inline prompt. They use what your organization registers:

- **LLM providers**: : a concrete model deployment the nodes reference by id.
- **Prompt templates**: : reusable prompts with variables and expected output fields.
- **Knowledge resources**: : content and rules with versions, bound to projects, workflows, nodes, agents or apps.

See [AI artifacts](https://docs.sommatic.ai/en/ai.md).

## Explicit execution and inference

Sommatic AI separates two modes. **Explicit execution** runs a known command or contract with no interpretation.
**Inference** helps you discover or route, for example the Command Center proposing a command from what you typed. The
platform must remain operable without inference, so explicit commands always exist.

## Identity and traceability

Veripass is the identity authority. Every sensitive operation is bound to an actor, an organization, a role and its
context. Runs and node executions are stored, and when one workflow chains into another, both runs share a
correlation id so you can follow the case end to end.

> **Tip: Credentials never go in a node**
>
> Secrets live in **Credentials** and are resolved on the server when a node runs. Nodes reference them through a
> credential picker (`connection_id`), never as literal values.

## Next steps

- [Quickstart](https://docs.sommatic.ai/en/get-started/quickstart.md): Put these concepts to work in the portal.
- [Glossary](https://docs.sommatic.ai/en/get-started/glossary.md): Every term in one list.
- [Workflows](https://docs.sommatic.ai/en/workflows.md): The full guide to designing and running workflows.
