---
title: Workflow
description: 'A defined sequence or graph of activities, decisions, states, and transitions used to achieve an outcome.'
canonical_url: 'https://darkfactory.dev/glossary/workflow'
markdown_url: 'https://darkfactory.dev/glossary/workflow.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Workflow


## Definition

A workflow is a defined sequence or graph of activities, decisions, states, and transitions used to achieve an outcome. It can be deterministic, human-operated, agentic, or mixed.

Useful workflows make inputs, ownership, transitions, outputs, and exception paths explicit. They can contain model judgment inside a bounded step while ordinary code controls security-sensitive routing and completion.

The workflow should represent failure as carefully as success. Timeouts, retries, cancellation, compensation, human escalation, and partial completion determine whether the process behaves safely in production.

## Distinguish it from nearby terms

A workflow prescribes process structure. An agent may choose actions dynamically within a step or route. Orchestration coordinates workflow execution, and a state machine formalizes its states and valid transitions.

## Check your understanding

A claims workflow uses a model to summarize documents, deterministic rules to calculate eligibility, and a human to approve exceptions. It mixes agentic judgment, software control, and accountable review without treating any one layer as the whole system.

## Related terms

- [Control graph](https://darkfactory.dev/glossary/control-graph)
- [Execution graph](https://darkfactory.dev/glossary/execution-graph)
- [Directed acyclic graph (DAG)](https://darkfactory.dev/glossary/directed-acyclic-graph)
- [State machine](https://darkfactory.dev/glossary/state-machine)

## Related factory areas

- [Orchestration, state, concurrency & recovery](https://darkfactory.dev/factory/orchestration-state)

## Evidence and further reading

- [Codex Orchestration (Symphony)](https://openai.com/index/open-source-codex-orchestration-symphony/)
- [A Methodology for Selecting and Composing Runtime Architecture Patterns for Production LLM Agents](https://arxiv.org/abs/2605.20173)
