> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> What a workflow blob holds, how a run starts, and where each part is documented.

A **workflow** blob holds the definitions a revision runs and, in each session of that revision, the runs themselves. A
revision carries four categories of definition. A run happens in a session, as an execution, and everything it
writes lands in the session's objects and event stream.

```mermaid theme={null}
flowchart LR
  subgraph rev["Revision definitions"]
    wf["workflow"]
    li["listener"]
    pg["playground"]
    wg["widget"]
  end
  subgraph ses["Session"]
    direction TB
    ex["Executions"] --> obj["Session objects"]
    ex --> ev["Event stream"]
  end
  op["create_execution"] --> ses
  sc["Scheduler schedule"] --> ses
  wf -->|"runs"| ses
  li -->|"on an event"| ses
  pg -->|"on a post"| ses
  wg -->|"placed in"| pg
```

## What a revision holds

A revision holds definitions of four categories, each saved under an alias.

* **`workflow`**: the components and connections an execution runs. See
  [Definition Format](https://docs.blobhub.io/blob-types/workflow/workflows/definition-format.md) and
  [Components](https://docs.blobhub.io/blob-types/workflow/workflows/components.md).
* **`playground`**: the layout of widgets that shows a session. It places built-in widgets and the revision's own
  `widget` definitions, each by its type. See
  [Playground Definition Format](https://docs.blobhub.io/blob-types/workflow/playgrounds/definition-format.md).
* **`listener`**: a filter on a session's event stream that acts on each match. See
  [Listeners](https://docs.blobhub.io/blob-types/workflow/workflows/listeners.md).
* **`widget`**: a custom playground widget deployed into the revision, placed in a playground under its alias. See
  [Custom Widgets](https://docs.blobhub.io/blob-types/workflow/playgrounds/custom-widgets.md).

## What a session holds

A session holds the executions started in it, its session objects and its event stream.

* **Executions** run a workflow definition. See [Create Execution](https://docs.blobhub.io/blob-types/workflow/operations/create-execution.md).
* **Session objects** are typed, aliased values that components and callers share across executions. See
  [Session Objects](https://docs.blobhub.io/blob-types/workflow/session-objects/introduction.md).
* **The event stream** records each change in the session, in order. See
  [Session Events](https://docs.blobhub.io/blob-types/workflow/workflows/session-events.md).
* A session is open, closing, closed or deleting. See
  [Session Lifecycle](https://docs.blobhub.io/blob-types/workflow/workflows/session-lifecycle.md).

## How a run starts

* The operation [Create Execution](https://docs.blobhub.io/blob-types/workflow/operations/create-execution.md) starts a workflow definition in a
  session.
* A [playground](https://docs.blobhub.io/blob-types/workflow/playgrounds/definition-format.md) starts one on each post to a thread widget whose
  `responder` is `workflow`. See [Widgets](https://docs.blobhub.io/blob-types/workflow/playgrounds/widgets.md#data-thread).
* A declared [listener](https://docs.blobhub.io/blob-types/workflow/workflows/listeners.md) runs a workflow when an event in the stream matches
  its filter.
* A schedule of the [Scheduler](https://docs.blobhub.io/blob-types/scheduler/overview.md) starts one on a time-based cadence.

## Where to read next

| Group | Pages |
| :- | :- |
| Workflows | The definition format, the components map and a page for each component type, data types, messages and threads. |
| Generative AI | The language model and chat components, choosing a model, vendors, media, tools, history and streaming. |
| Runtime | Session lifecycle, the event stream, listeners and what an execution records. |
| Playground | The playground definition, its widgets and custom widgets. |
| Operations | Every command, grouped as definitions, sessions, executions and events and data. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.