Workflow schema reference reference

Authoritative reference for the ArcFlow workflow specification type system used by workflows, agents, runs, and server API bodies. This page documents the JSON Schema and field semantics.

Validate workflows against schema in CI where possible until arcflow validate ships (CLI validate command).

Conceptual intro: Workflow specification.

Drift note (K-10): Some older HTTP summaries may lag the live server. Prefer this page and the HTTP API reference when integrating.

Core workflow types

WorkflowDefinition

FieldTypeRequiredNotes
idUUID stringYesWorkflow identity
namestringYesHuman-readable name
execution_mode"linear" | "graph"YesExecution strategy
stepsStepDefinition[]YesStep list
graphGraphDefinitionWhen graph modeDAG definition
external_bindingsExternalBinding[]NoWebhook/async bindings
retry_policyRetryPolicyNoWorkflow-level retries

StepDefinition

FieldTypeRequiredNotes
idUUID stringYesStep identity
agent_idUUID stringYesReferences AgentDefinition.id
orderintegerYesLinear sort order
fallback_step_idUUIDNoFallback step on failure
hitlHitlConfigNoHuman-in-the-loop gate
retry_policyRetryPolicyNoStep-level retries

AgentDefinition

FieldTypeRequiredNotes
idUUID stringYesAgent identity
namestringYesDisplay name
rolestringYesRole label in traces
instructionsstringYesSystem instructions (not in traces, trace data policy)
toolsToolDefinition[]NoRegistered tools
memory_configMemoryConfigNoMemory backend config
contextContextPolicyNoPrior step context limits
tool_executionToolExecutionConfigNoDefault llm_select
providerProviderConfigNoLLM provider selection

UUID ids throughout; do not reuse ids across agents and steps.

Graph types

GraphDefinition

FieldTypeRequiredNotes
entry_nodestringYesFirst graph node id
max_iterationsintegerYesLoop guard
nodesGraphNode[]YesNode list
edgesGraphEdge[]YesTransitions
join_nodesJoinNode[]NoParallel branch sync

GraphNode

FieldTypeNotes
idstringNode id
step_refstringReferences StepDefinition.id
inputsobjectOptional input mapping
outputsobjectOptional output mapping

GraphEdge

FieldTypeNotes
fromstringSource node id
tostring or nullTarget node; null ends branch
conditionstringOptional guard expression

JoinNode

FieldTypeNotes
idstringJoin id
wait_forstring[]Node ids to synchronize

Graph trace kinds in the workflow specification envelope: GraphNodeStarted, GraphNodeCompleted, GraphIterationLimitReached.

Memory and context

MemoryConfig

FieldTypeNotes
memory_typeenume.g. vector, session
scopeenumrun vs persistent
namespacestringRequired for persistent/vector
ttl_secondsintegerOptional TTL
embeddingobjectEmbedding model config
retrievalMemoryRetrievalConfigSearch mode
chunkingMemoryChunkingConfigIngest chunking

MemoryRetrievalConfig

FieldTypeNotes
modestringdense, sparse, hybrid
top_kintegerResult count
dense_weightfloatHybrid weight
sparse_weightfloatHybrid weight
rerankobjectOptional rerank provider

MemoryChunkingConfig

FieldTypeNotes
chunk_sizeintegerCharacters or tokens per policy
chunk_overlapintegerOverlap between chunks

ContextPolicy

FieldTypeDefaultNotes
include_prior_stepsboolPrior step outputs in context
include_run_inputboolOriginal user input
max_prior_step_charsinteger4096Truncation limit

ToolExecutionConfig

FieldTypeNotes
mode"llm_select" | "legacy_eager"Tool loop strategy
max_iterationsintegerTool loop cap

Control plane types

HitlConfig

FieldTypeNotes
approval_keystringApprove route key
timeout_secondsintegerInterrupt timeout

ExternalBinding

FieldTypeNotes
idstringBinding id for external POST
kindstringBinding type
attach_to_step_idUUIDStep attachment
modestringasync/monitor semantics
recoveryobjectRecovery policy on external failure

ProviderConfig

FieldTypeNotes
provider_idstringe.g. openai
modelstringModel id
api_key_envstringEnv var name for key
paramsobjectTemperature, max_tokens

ToolDefinition

FieldTypeNotes
namestringTool name in traces
input_schemaJSON SchemaArguments schema
permissionsstring[]Optional capability flags

Run envelope

RunRequest (server POST /v1/runs)

FieldTypeNotes
workflowWorkflowDefinitionInline definition
workflow_refobject{ name, version } semver range
agentsAgentDefinition[]Agent catalog
inputstringUser/run input
exec_configExecConfigRecovery, timeouts

Provide workflow or workflow_ref, not both.

RunResult

FieldTypeNotes
outputstringFinal text
statusExecutionStatusTerminal or in-flight
traceTraceEvent[]metadata-only trace events
errorobjectError code + message

ExecutionStatus

Pending, Running, Completed, Failed, Retrying, Cancelled, Interrupted.

ErrorCode

See Error codes.

Example minimal linear workflow

json
{
 "id": "00000000-0000-4000-8000-000000000001",
 "name": "demo",
 "execution_mode": "linear",
 "steps": [
 {
 "id": "00000000-0000-4000-8000-000000000010",
 "agent_id": "00000000-0000-4000-8000-000000000020",
 "order": 0
 }
 ]
}

Normative file index

PathContent
workflow schemaJSON Schema
Postgres schemaRecovery DDL (partial)
Provider configurationProvider API
workflow schemaIndex