# Workflow instance
Source: https://www.inngest.com/docs/reference/workflow-kit/workflow-instance

A workflow instance represents a user configuration of a sequence of [workflow actions](/docs/reference/workflow-kit/actions), later provided to the [workflow engine](/docs/reference/workflow-kit/engine) for execution.

Example of a workflow instance object:

```json
{
  "name": "Generate social posts",
  "edges": [
    {
      "to": "1",
      "from": "$source"
    },
    {
      "to": "2",
      "from": "1"
    }
  ],
  "actions": [
    {
      "id": "1",
      "kind": "generate_tweet_posts",
      "name": "Generate Twitter posts"
    },
    {
      "id": "2",
      "kind": "generate_linkedin_posts",
      "name": "Generate LinkedIn posts"
    }
  ]
}
```

<Callout>

**How to use the workflow instance object**

Workflow instance objects are meant to be retrieved from the [`<Provider>`](/docs/reference/workflow-kit/components-api) Editor, stored in database and loaded into the [Workflow Engine](/docs/reference/workflow-kit/engine) using a loader.

Use this reference if you need to update the workflow instance between these steps.

</Callout>

## `Workflow`

A Workflow instance in an object with the following properties:

<Properties>
  <Property name="name" type="string">
     Name of the worklow configuration, provided by the end-user.
  </Property>
  <Property name="description" type="string">
     description of the worklow configuration, provided by the end-user.
  </Property>
  <Property name="actions" type="WorkflowAction[]" required>
     See the [`WorkflowAction`](#workflow-action) reference below.
  </Property>
  <Property name="edges" type="WorkflowEdge[]" required>
     See the [`WorkflowEdge`](#workflow-edge) reference below.
  </Property>
</Properties>

## `WorkflowAction`

`WorkflowAction` represent a step of the workflow instance linked to an defined [`EngineAction`](/docs/reference/workflow-kit/actions).

<Properties>
  <Property name="id" type="string">
     The ID of the action within the workflow instance.  This is used as a reference and must be unique within the Instance itself.
  </Property>
  <Property name="kind" type="string" required>
      The action kind, used to look up the `EngineAction` definition.
  </Property>
  <Property name="name" type="string" required>
     Name is the human-readable name of the action.
  </Property>
  <Property name="description" type="string">
     Description is a short description of the action.
  </Property>
  <Property name="inputs" type="object">
     Inputs is a list of configured inputs for the EngineAction.

    The record key is the key of the EngineAction input name, and
    the value is the variable's value.

    This will be type checked to match the EngineAction type before
    save and before execution.

    Ref inputs for interpolation are `"!ref($.<path>)"`, eg. `"!ref($.event.data.email)"`
  </Property>
</Properties>

## `WorkflowEdge`

A `WorkflowEdge` represents the link between two `WorkflowAction`.

<Properties>
  <Property name="from" type="string" required>
     The `WorkflowAction.id` of the source action.

     `"$source"` is a reserved value used as the starting point of the worklow instance.
  </Property>
  <Property name="to" type="string" required>
     The `WorkflowAction.id` of the next action.
  </Property>
  {/* <Property name="conditional" type="object">
     `WorkflowAction.id` of the next action.
  </Property> */}
</Properties>