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

# Workflow spec

> What's known about the JSON format AgentFlow stores each workflow in.

export const DocMeta = ({type, applies, owner}) => {
  const LABELS = {
    tutorial: "Tutorial",
    "how-to": "How-to guide",
    explanation: "Explanation",
    reference: "Reference"
  };
  return <div className="e6-meta">
      <span className={type === "how-to" || type === "tutorial" ? "e6-eyebrow" : "e6-eyebrow e6-eyebrow--quiet"}>{LABELS[type] || type}</span>
      {applies ? <span>Applies to: {applies}</span> : null}
      {owner ? <span>Owner: {owner}</span> : null}
    </div>;
};

<DocMeta type="reference" applies="All deployments" />

<Note>
  The full field-by-field schema is being written. This page lists the rules that apply today.
</Note>

## The document

* A workflow is a versioned JSON document stored in your durable storage.
* Each version records its author and carries a compiler version.
* A version must compile with the runtime compiler to be saved, whether it's created in chat or edited in the visual builder.
* One version is marked current; any version can be selected for a run.

## Steps

A workflow is a graph of typed steps. See [Step types](/agentflow/reference/step-types) for the ten types, what each step can declare, and the legacy fields that are rejected.

## Inputs

| Input definition | At run time |
| - | - |
| Has a non-null default | Prefilled and optional |
| `required: false` | Optional |
| A bare type, no default, or a `null` default | Mandatory |

## References between steps

Large intermediate results travel as `FileRef`, `S3PathRef` or `ArtifactRef` instead of being inlined in every step's context.

## Actions

A terminal `action` step takes a static directive or the Slack directive source, and `approval: false`, `approval: true` or an approval-policy ID. See [Actions and approvals](/agentflow/automate/actions-and-approvals).


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