A session is a unit of belonging
A session holds related workflows together, such as everything for one project, one pipeline or one assistant’s work. It has a name, optional descriptive metadata (who made it, which project path it works in, free-form tags), and a map of workflows. You create a session by sending its whole definition at once, and sending the same session id again replaces it. That is a deliberate, simple model: the session is the document, and what you send is what exists. It also means that applying a session is a bigger act than saving one workflow, which is why assistants are asked to confirm first. See AI-assisted configuration.A session is a unit of fairness and access
Because runs belong to sessions, two other things hang off them.- Fairness. Concurrency limits can apply per session. When starts are queued, the session with the fewest running runs goes first, so one busy session cannot starve the others.
- Access. An API key can be limited to some sessions, so a key held by a build bot reaches the build session and nothing else. See Security model.
A workflow has versions
A workflow is identified by its session plus its own id. Each time you save a changed definition, it becomes a new version, and the newest 20 are kept. An identical definition does not create a new version. Versions answer the question “what exactly was running when that failed?”. Each run records a hash of the graph it ran, so its progress, history and log always say which definition produced them. You can compare two versions, annotate one, roll back to an earlier one, or run a saved version without changing the current one. Before any step runs, a definition is checked: it must be acyclic, ids must be unique, every edge must point at existing nodes and ports, and the size must be within limits. A bad workflow is refused at save time, not discovered at 2 a.m. Twenty versions is a safety net for recent changes, not an archive. Keep your definitions in git if you need history beyond that.Where sessions live
By default sessions, definitions and versions are in memory and vanish on restart. That is right for trying things out and wrong for anything you depend on. You can keep them in files or in PostgreSQL (both in the Plus edition), or reapply your definitions from a folder at every start, which works in every edition. See Durability and high availability.Related
- How Yukta works and Runs.
- Define a workflow and Validate and roll back.
- Workflow JSON reference: every session and workflow field.