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.

FieldTypeDescription
workflow_nameRegisteredWorkflowNameUnique identifier for the workflow
actionsrepeated ActionInstanceList of action instances in the workflow
enum_typesrepeated EnumTypeEnum types used in this workflow
workflow_inputsmap<string, WorkflowInput>Map of workflow input definitions
display_settings_workflow_inputsDisplaySettingsDisplay settings for workflow inputs
resultsmap<string, ResultDef>Map of workflow result definitions (legacy)
named_resultsmap<string, NamedOutput>Map of named output definitions (preferred)
display_namestringUser-friendly display name
descriptionstringDescription of the workflow
named_results_editableboolWhether named results are editable
named_results_enabledboolWhether named results protocol is active

RegisteredWorkflowName

FieldTypeDescription
namespacerepeated stringNamespace path (e.g., ["ema", "personas", "<id>"])
namestringWorkflow name within the namespace
versionstringVersion string

ActionInstance

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

FieldTypeDescription
namestringUnique name of this action instance
action_typeRegisteredActionNameReference to the registered action type
input_bindingsmap<string, InputBinding>Map of input parameter name to binding
conditionConditionOptional condition for execution
display_namestringUser-friendly display name
descriptionstringDescription of what this instance does
toolToolOptional tool configuration
input_parameter_overrideInputParameterOverrideOverrides for input parameters

RegisteredActionName

FieldTypeDescription
namespacerepeated stringNamespace path
namestringAction name (e.g., search, call_llm)
versionstringVersion string (e.g., v2)

InputBinding

Defines how an action input receives its value.

FieldTypeDescription
sourceoneofThe source of the binding (see below)

Source Types

Source TypeFieldsDescription
action_outputaction_name, output_nameOutput from another action
workflow_inputinput_nameWorkflow-level input
static_valuevalueA constant Value
condition_bindingcondition, if_true, if_falseConditional source selection

ActionOutputBinding

FieldTypeDescription
action_namestringName of the source action instance
output_namestringName of the output parameter

Tool

Configuration for an external tool used by an action.

FieldTypeDescription
tool_namestringName of the tool
tool_configobjectTool-specific configuration
integration_idstringIntegration identifier

Condition

A condition that determines whether an action executes.

FieldTypeDescription
operatorConditionOperatorComparison operator
leftConditionOperandLeft operand
rightConditionOperandRight operand

ConditionOperator Enum

ValueDescription
EQUALSExact equality
NOT_EQUALSNot equal
CONTAINSLeft contains right
NOT_CONTAINSLeft does not contain right
GREATER_THANNumeric greater than
LESS_THANNumeric less than
IS_TRUEBoolean true check
IS_FALSEBoolean false check

Complete list of ConditionOperator values.

TypeReference

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

FieldTypeDescription
well_knownWellKnownTypeA well-known primitive type
enum_refstringReference to an EnumType by name
array_ofTypeReferenceArray of the referenced type

EnumType

A custom enum type used within a workflow.

FieldTypeDescription
namestringName of the enum type
valuesrepeated stringAllowed values for the enum

WorkflowInput

An input parameter for the workflow.

FieldTypeDescription
typeTypeReferenceData type of the input
display_namestringUser-friendly name
descriptionstringDescription of the input
requiredboolWhether the input is required

ResultDef (Legacy)

A result definition for the legacy output protocol.

FieldTypeDescription
action_namestringName of the action producing the result
output_namestringName of the output parameter

NamedOutput (Preferred)

A named output definition for the preferred output protocol.

FieldTypeDescription
action_namestringName of the action producing the output
output_namestringName of the output parameter
display_namestringUser-friendly name for the output
typeTypeReferenceData type of the output

Last updated: Jul 3, 2026