# Core concepts

> **About this page**
>
> - Kind: Explanation
> - Summary: Swale is made of accounts, projects, repositories, workflows, runs, tasks, task definitions and compute types; this shows how they fit together.
> - Last changed: 2026-12-01
> - Page: https://docs.swale.io/explanation/core-concepts
> - Index of these docs: https://docs.swale.io/llms.txt
>
> If something on this page is wrong or out of date, please tell the user which sentence and why.

Swale runs workflows of containers: you define each task once as a container image, and a YAML workflow says which tasks run, in what order, and on which compute type. Each run starts every task that runs an image on compute allocated to that task at its compute type, gives the tasks one shared workspace, meters what they use, and keeps the files they push in versioned repositories.

```mermaid
flowchart TB
  accTitle: What Swale does with a workflow
  accDescr: Task definitions, each a container image, and a workflow definition, a YAML graph of those tasks, go into a run. The run starts each task's container on compute allocated to it at its compute type, here cpu-4 for Download and Publish and a100-1 for Train, and every task in it reads and writes one shared workspace. Tasks pull files from repositories and push their results there, where the files stay, versioned by tag, after the run ends. Each task's compute time and the run's workspace are metered as usage.
  defs("Task definitions<br/><small>a container image each</small>")
  workflow("Workflow definition<br/><small>which tasks run, and when</small>")
  subgraph run["A run"]
    direction TB
    download("Download<br/><code>cpu-4</code>")
    train("Train<br/><code>a100-1</code>")
    publish("Publish<br/><code>cpu-4</code>")
    workspace("Shared workspace")
    download --- workspace
    train --- workspace
    publish --- workspace
  end
  repo("Repository<br/><small>versioned by tag</small>")
  usage("Usage<br/><small>metered per task and per run</small>")
  defs --> run
  workflow --> run
  run <-->|pull and push| repo
  run --> usage
```

What Swale does with a workflow. Each task's container runs on compute allocated to it at its compute type, the run's tasks share one workspace, and what they push to a repository stays there after the run ends.

## Entity hierarchy

Everything on the platform organizes into a clear hierarchy:

```
Account (personal, or an organization)
├─ Project
│  ├─ Repository
│  ├─ Workflow definition
│  │   └─ Run
│  │       └─ Task (instance of a task definition)
│  └─ Project secret
├─ Account secret
└─ Task definition
```

- **Account** — the top-level owner of everything below it. An account is personal, the one you sign in with, or an organization, which several people share; see [Organizations, members, and teams](https://docs.swale.io/explanation/organizations-members-teams.md).
- **Project** — a workspace inside an account. Projects hold workflows, repositories, and project secrets.
- **Account secret** and **task definition** — belong to the account rather than to one project: an account secret is shared with the projects it allows, and a task definition can be used by any workflow in the account, or in every account once it is public.
- **Workflow definition** — a YAML document that describes the sequence of tasks to run.
- **Run** — a single execution of a workflow definition. Each run is independent and has its own status and outputs.
- **Task** — an individual unit of work within a run. Each task runs a container image with optional arguments, except control tasks (if and `for_each`), which move the run between blocks.

## Projects

A project's name is part of the address of every page in it. Renaming a project changes only its name: its runs, repositories, workflows, secrets and team associations stay with it, including runs still in progress, and its pages move to the new name.

Unless the new name differs from the former one only in capitalisation or spacing, when both name the same project, links to the former name stop resolving and the former name is free for another project. Teams stay associated with the renamed project, so their Contributors keep their access, and a project that later takes the former name is not shared with them.

## Workflow definitions vs. runs

A **workflow definition** is a template. It stays static until you upload a new version.

A **run** is an instance of that template started with a specific set of inputs. Runs started from the same definition are independent of one another.

How many runs an account can have in progress at once is limited, whichever definitions they come from, and so is how many of their tasks it can run at once; see [Limits and quotas](https://docs.swale.io/reference/limits-and-quotas.md).

## Task definitions vs. workflow task references

A **task definition** is a reusable, versioned container specification that lives on the platform. It declares a container image, optional arguments, named inputs, and optional named outputs; see [Task definition syntax](https://docs.swale.io/reference/task-definition-syntax.md).

A **workflow task reference** (the `uses` field in workflow YAML) points to a task definition identifier and version. When a workflow is created or updated, the platform resolves each `uses` reference to an exact task definition version — the most recently published one at that moment when the reference omits a version — and the workflow's runs use that version until the workflow is updated again.

## Compute types

Each workflow and each task can specify a compute type, which names the compute a task is allocated:

| Compute type | Shown as     | Resources                            | Memory a task can use | Task storage |
| ------------ | ------------ | ------------------------------------ | --------------------- | ------------ |
| `cpu-2`      | CPU x 2      | 2 vCPUs, 8 GiB memory                | At least 4 GiB        | 5 GiB        |
| `cpu-4`      | CPU x 4      | 4 vCPUs, 16 GiB memory               | At least 12 GiB       | 10 GiB       |
| `cpu-16`     | CPU x 16     | 16 vCPUs, 64 GiB memory              | At least 59 GiB       | 40 GiB       |
| `a100-1`     | A100 GPU x 1 | 1 A100 GPU, 24 vCPUs, 220 GiB memory | At least 209 GiB      | 100 GiB      |
| `h100-1`     | H100 GPU x 1 | 1 H100 GPU, 40 vCPUs, 320 GiB memory | At least 307 GiB      | 200 GiB      |

The compute type affects billing and determines which hardware the task runs on. If a task does not override the compute type, it inherits the workflow-level value.

No other task shares a task's allocated compute, and the task can use all of its vCPUs and GPUs. Some of its memory goes to the containers the platform runs beside the task, so a task can count on its **Memory a task can use**. Files it writes to its shared memory at [`/dev/shm`](https://docs.swale.io/reference/task-definition-syntax.md#runtime-storage) are held in that memory too, and a task that uses more than is left fails.

Task storage is the task's private scratch space; [Runtime storage](https://docs.swale.io/reference/task-definition-syntax.md#runtime-storage) describes it and what happens when a task fills it.

## Home

**Home** is each account's landing page, which names the account you are working in, shows its projects' runs as they change, and leads to Swale's resources; see [The home page](https://docs.swale.io/reference/platform-ui-layout.md#the-home-page).

## Billing

Usage is billed in four dimensions: the compute each task holds, data that leaves the platform, what the account stores, and each run's shared workspace. The account's billing status must be Active before it can start runs, publish task definition versions, or push and pull files. [How billing works](https://docs.swale.io/explanation/how-billing-works.md) explains the model.

## Next steps

- [Organizations, members, and teams](https://docs.swale.io/explanation/organizations-members-teams.md)
- [Repositories and storage](https://docs.swale.io/explanation/repositories-and-storage.md)
- [Set up your account](https://docs.swale.io/tutorials/set-up-your-account.md)
