Inferensys

Glossary

Sequential Task

A sequential task is a compound task in hierarchical planning whose subtasks must be executed in a strict, predefined linear order.
Product manager reviewing autonomous task execution dashboard on laptop, completed tasks visible, casual work session.
HIERARCHICAL TASK NETWORKS

What is a Sequential Task?

A Sequential Task is a compound task within a Hierarchical Task Network (HTN) whose subtasks must be executed in a strict, predefined linear order.

In Hierarchical Task Network (HTN) planning, a Sequential Task is a compound task defined by a decomposition method that imposes a total ordering on its subtasks. This means the planner must generate a plan where subtask A is completed before subtask B can begin, creating a deterministic, linear execution path. This structure is fundamental for modeling processes where steps have causal dependencies or temporal prerequisites, such as assembling hardware or processing data through a pipeline.

The ordering constraints within a Sequential Task are explicitly defined in its method within the HTN domain description. During task decomposition, the planner respects these constraints to build a valid solution plan. This contrasts with Parallel Tasks or tasks with conditional branches. Sequential ordering is critical for plan verification and reliable plan execution in domains like manufacturing, software deployment, and clinical workflows, where procedural correctness is non-negotiable.

HIERARCHICAL TASK NETWORKS

Key Characteristics of Sequential Tasks

Sequential tasks are fundamental constructs in hierarchical planning, defined by strict, linear dependencies between their constituent subtasks. Understanding their properties is essential for designing predictable and reliable agent workflows.

01

Strict Linear Ordering

The defining property of a sequential task is that its subtasks must be executed in a single, predetermined linear sequence. This creates a total order where each subtask has exactly one predecessor (except the first) and one successor (except the last).

  • Example: The task Bake Cake decomposes into the strict sequence: [Preheat Oven] → [Mix Ingredients] → [Pour Batter] → [Bake] → [Cool]. The Bake subtask cannot logically occur before Mix Ingredients.
  • This contrasts with parallel tasks (concurrent execution) or unordered tasks (any order is valid).
02

State Dependency & Preconditions

Each subtask in the sequence establishes a specific world state that serves as the precondition for the next. Execution fails if a subtask's preconditions are not met by the state produced by its predecessor.

  • Mechanism: If subtask T_i has effect E, and subtask T_(i+1) has precondition P, then the planner must ensure E → P (E implies or establishes P).
  • Example: In a Print Document task, the subtask [Load Paper] has the effect paper_loaded=true, which is a direct precondition for the subsequent [Start Print Job] subtask.
03

Deterministic Execution Path

Given a fixed initial state, a sequential task has a single, deterministic decomposition path. There is no branching or choice in the order of operations, which simplifies plan verification and guarantees reproducible outcomes.

  • Planning Implication: HTN planners do not need to evaluate alternative orderings for the subtasks within a single sequential compound task, reducing the search space.
  • Use Case: This is ideal for encoding rigid standard operating procedures (SOPs), safety-critical protocols, or physical processes where the laws of physics dictate order (e.g., assembly).
04

Temporal Constraints as Ordering

The sequence itself represents a set of implicit temporal constraints. Formally, for a sequence [T1, T2, T3, ..., Tn], the constraint T_i < T_(i+1) holds for all i, meaning T_i must end before T_(i+1) begins.

  • Contrast with Explicit Constraints: In more complex hierarchical plans, explicit before(T_a, T_b) constraints may link tasks across different branches. In a pure sequential task, these constraints are inherent to the decomposition.
  • Scheduling: This simplifies execution scheduling for agents, as the timeline is fully prescribed by the decomposition.
05

Failure Propagation & Atomicity

A failure in any subtask typically renders the entire sequential task incomplete or failed. The sequence acts as a logical atomic unit where success requires the success of all constituent parts in order.

  • Error Handling: This characteristic necessitates robust replanning strategies. If T_k fails, the system must either retry T_k, repair the state to satisfy its preconditions, or decompose an alternative high-level task.
  • Example: In a Process Customer Order task, if the [Charge Credit Card] subtask fails, the subsequent [Dispatch to Warehouse] subtask cannot be executed, and the entire order process halts.
06

Composition with Other Structures

Sequential tasks are rarely isolated; they are nested within larger HTN structures. A high-level sequential task may contain subtasks that are themselves compound tasks (sequential, parallel, or iterative).

  • Hierarchical Design: A top-level task [Assemble Product] might be sequential, but its [Test Subsystem] subtask could be a compound task that decomposes into a parallel set of diagnostic checks.
  • Formal Representation: In PDDL (Planning Domain Definition Language) or similar, this is represented as a method whose subtask network is a totally-ordered list.
SEQUENTIAL TASK

Frequently Asked Questions

Questions and answers about Sequential Tasks, a core concept in Hierarchical Task Network (HTN) planning where subtasks must be executed in a strict, predefined order.

A Sequential Task is a type of compound task within a Hierarchical Task Network (HTN) whose subtasks must be executed in a strict, predefined linear order. It is a fundamental control structure in automated planning that enforces a mandatory temporal sequence, where each subtask's execution is a prerequisite for the next. This contrasts with Parallel Tasks or tasks with flexible ordering constraints. The sequence is defined within the task's decomposition method, which specifies the exact order of subtasks as part of the domain description. Sequential tasks are ubiquitous in workflows where steps have inherent dependencies, such as 'Bake Cake' requiring 'Mix Ingredients' to occur before 'Put in Oven'.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.