Core Concepts
The ideas behind taskflow's declarative DAG model.
This chapter is the mental model behind taskflow. It does not list every field — that is the Syntax Reference — and it does not walk through a host install — that is the Guides. Instead it explains the six ideas that make a taskflow different from an imperative script you write by hand:
- work is a graph, not a sequence of calls;
- the graph is built from ten phase types;
- data moves between phases through interpolation;
- the whole graph is verified before a token is spent;
- intermediate output is isolated from your context;
- and a run can be resumed across sessions.
Read these once and the rest of the docs click into place.
Suggested reading order
The concepts build on each other. Read them top to bottom the first time:
The DAG Model — why work is a graph of dependsOn edges, and why array order is not an edge.
Phase Types — the ten building blocks (agent, map, gate, loop, …) and when to reach for each.
Interpolation — how {steps.X.output} and friends move data between phases, deterministically and zero-token.
Verification — the static analysis pass that catches cycles, dead ends, and dangling refs before any agent runs.
Context Isolation — why only the final phase reaches your conversation, and how to peek when you need to.
Resume — how a failed run picks up where it stopped, and how cross-run memoization reuses last week's work.
Already comfortable with DAGs and build systems like Make or Bazel? You can skim the first two pages and start at Verification — that is where taskflow's safety story really begins.
The concepts
The DAG Model
Why a graph of task nodes, and how dependsOn builds it.
Phase Types
The 10 building blocks of every taskflow.
Interpolation
How data flows between phases.
Verification
Catching errors before tokens are spent.
Context Isolation
Why only the final result reaches you.
Resume
How cross-session replay works.
Last updated on
Was this helpful?
Help us improve the docs or ask a question in the community.