> Source: https://builder-docs.ema.ai/api-reference/workflows/workflow-data-model
> Title: Workflow Data Model

# Workflow Data Model

This page defines the protobuf data structures used to define and configure workflows in the Ema platform.

## WorkflowDef

The top-level workflow definition.

Field

Type

Description

`workflow_name`

RegisteredWorkflowName

Unique identifier for the workflow

`actions`

repeated ActionInstance

List of action instances in the workflow

`enum_types`

repeated EnumType

Enum types used in this workflow

`workflow_inputs`

map<string, WorkflowInput>

Map of workflow input definitions

`display_settings_workflow_inputs`

DisplaySettings

Display settings for workflow inputs

`results`

map<string, ResultDef>

Map of workflow result definitions (legacy)

`named_results`

map<string, NamedOutput>

Map of named output definitions (preferred)

`display_name`

string

User-friendly display name

`description`

string

Description of the workflow

`named_results_editable`

bool

Whether named results are editable

`named_results_enabled`

bool

Whether named results protocol is active

### RegisteredWorkflowName

Field

Type

Description

`namespace`

repeated string

Namespace path (e.g., `["ema", "personas", "<id>"]`)

`name`

string

Workflow name within the namespace

`version`

string

Version string

## ActionInstance

An instance of an action within a workflow, including its input bindings.

Field

Type

Description

`name`

string

Unique name of this action instance

`action_type`

RegisteredActionName

Reference to the registered action type

`input_bindings`

map<string, InputBinding>

Map of input parameter name to binding

`condition`

Condition

Optional condition for execution

`display_name`

string

User-friendly display name

`description`

string

Description of what this instance does

`tool`

Tool

Optional tool configuration

`input_parameter_override`

InputParameterOverride

Overrides for input parameters

### RegisteredActionName

Field

Type

Description

`namespace`

repeated string

Namespace path

`name`

string

Action name (e.g., `search`, `call_llm`)

`version`

string

Version string (e.g., `v2`)

## InputBinding

Defines how an action input receives its value.

Field

Type

Description

`source`

oneof

The source of the binding (see below)

### Source Types

Source Type

Fields

Description

`action_output`

`action_name`, `output_name`

Output from another action

`workflow_input`

`input_name`

Workflow-level input

`static_value`

`value`

A constant Value

`condition_binding`

`condition`, `if_true`, `if_false`

Conditional source selection

### ActionOutputBinding

Field

Type

Description

`action_name`

string

Name of the source action instance

`output_name`

string

Name of the output parameter

## Tool

Configuration for an external tool used by an action.

Field

Type

Description

`tool_name`

string

Name of the tool

`tool_config`

object

Tool-specific configuration

`integration_id`

string

Integration identifier

## Condition

A condition that determines whether an action executes.

Field

Type

Description

`operator`

ConditionOperator

Comparison operator

`left`

ConditionOperand

Left operand

`right`

ConditionOperand

Right operand

### ConditionOperator Enum

Value

Description

`EQUALS`

Exact equality

`NOT_EQUALS`

Not equal

`CONTAINS`

Left contains right

`NOT_CONTAINS`

Left does not contain right

`GREATER_THAN`

Numeric greater than

`LESS_THAN`

Numeric less than

`IS_TRUE`

Boolean true check

`IS_FALSE`

Boolean false check

Complete list of ConditionOperator values.

## TypeReference

A reference to a data type used in inputs and outputs.

Field

Type

Description

`well_known`

WellKnownType

A well-known primitive type

`enum_ref`

string

Reference to an EnumType by name

`array_of`

TypeReference

Array of the referenced type

## EnumType

A custom enum type used within a workflow.

Field

Type

Description

`name`

string

Name of the enum type

`values`

repeated string

Allowed values for the enum

## WorkflowInput

An input parameter for the workflow.

Field

Type

Description

`type`

TypeReference

Data type of the input

`display_name`

string

User-friendly name

`description`

string

Description of the input

`required`

bool

Whether the input is required

## ResultDef (Legacy)

A result definition for the legacy output protocol.

Field

Type

Description

`action_name`

string

Name of the action producing the result

`output_name`

string

Name of the output parameter

## NamedOutput (Preferred)

A named output definition for the preferred output protocol.

Field

Type

Description

`action_name`

string

Name of the action producing the output

`output_name`

string

Name of the output parameter

`display_name`

string

User-friendly name for the output

`type`

TypeReference

Data type of the output

## Related

-   [Workflow Overview](/legacy-docs/api-reference/workflows/overview) -- Concepts and architecture
-   [Action Data Model](/legacy-docs/api-reference/workflows/action-data-model) -- Action type structures
-   [Workflow API](/legacy-docs/api-reference/workflows/workflow-api) -- API endpoints
