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.
Glossary
Sequential Task

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.
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.
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.
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 Cakedecomposes into the strict sequence:[Preheat Oven] → [Mix Ingredients] → [Pour Batter] → [Bake] → [Cool]. TheBakesubtask cannot logically occur beforeMix Ingredients. - This contrasts with parallel tasks (concurrent execution) or unordered tasks (any order is valid).
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_ihas effectE, and subtaskT_(i+1)has preconditionP, then the planner must ensureE → P(E implies or establishes P). - Example: In a
Print Documenttask, the subtask[Load Paper]has the effectpaper_loaded=true, which is a direct precondition for the subsequent[Start Print Job]subtask.
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).
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.
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_kfails, the system must either retryT_k, repair the state to satisfy its preconditions, or decompose an alternative high-level task. - Example: In a
Process Customer Ordertask, if the[Charge Credit Card]subtask fails, the subsequent[Dispatch to Warehouse]subtask cannot be executed, and the entire order process halts.
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.
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'.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
A Sequential Task is a fundamental structure within Hierarchical Task Networks (HTNs). These related concepts define the planning formalism, decomposition rules, and constraints that govern how such ordered tasks are represented and solved.
Hierarchical Task Network (HTN)
A planning formalism where complex problems are solved by recursively decomposing high-level compound tasks into networks of smaller subtasks until primitive tasks (executable actions) are reached. It is the overarching framework that defines Sequential Tasks.
- Core Concept: Represents knowledge as tasks, methods for decomposition, and operators for execution.
- Contrast with Classical Planning: HTNs specify how to achieve tasks (procedural knowledge), while classical planners only specify what the goal state is (declarative knowledge).
- Primary Use: Foundational for automated planning in logistics, robotics, and business process automation where standard operating procedures exist.
Compound Task
An abstract, high-level task that cannot be executed directly. It must be decomposed into subtasks using a method. A Sequential Task is a specific type of compound task where the subtasks have a strict linear order.
- Key Attribute: Serves as a placeholder for a procedure, defined by one or more methods that detail possible ways to achieve it.
- Example:
AssembleProductis a compound task. One method might decompose it into the sequential subtasks:[FetchComponents, AttachPartA, AttachPartB, QualityCheck]. - Planning Role: Provides the hierarchical structure; the planner's job is to find a chain of decompositions from compound tasks to a sequence of primitive actions.
Primitive Task
A task that corresponds directly to an executable action or operator in the planning domain. It is a leaf node in the decomposition tree and has defined preconditions and effects.
- Key Attribute: Has an associated operator that defines how it changes the world state. No further decomposition is possible or required.
- Contrast with Sequential Task: A Sequential Task is compound and abstract; a Primitive Task is concrete and executable. The final plan is a sequence of primitive tasks.
- Example:
PickUp(Object, Location)orSendHTTPRequest(API_Endpoint)are primitive tasks with clear preconditions (object must be at location) and effects (agent is holding object).
Method (HTN)
A decomposition rule that specifies one way to accomplish a compound task. It consists of a set of preconditions and a task network (a set of subtasks with ordering constraints). A method for a Sequential Task explicitly defines a total order over its subtasks.
- Mechanism:
Compound-Task -> Preconditions -> Subtask-Network. - Role in Planning: The planner searches through applicable methods to decompose abstract tasks. The choice of method determines the specific procedure used.
- Example: A method for
BrewCoffeemight have the preconditionHasWater==Trueand the totally ordered subtask network:[GrindBeans, HeatWater, PourWaterOverGrounds].
Ordering Constraint
A temporal relation specifying that one task must be performed before another within a plan. In a pure Sequential Task, ordering constraints form a total order (a strict sequence). More complex HTNs use partial orders for flexibility.
- Representation: Often denoted as
T1 < T2, meaningT1precedesT2. - Engineering Importance: These constraints encode critical procedural dependencies (e.g.,
ValidatePayment<ShipItem) and resource dependencies (e.g.,AcquireLock<WriteToDatabase<ReleaseLock). - Planning Impact: The planner must ensure the final sequence of primitive actions satisfies all ordering constraints derived during decomposition.
SHOP (Simple Hierarchical Ordered Planner)
A seminal and widely implemented HTN planning algorithm. It performs task decomposition in a forward-chaining, depth-first manner, interleaving planning with state progression. It is particularly efficient for domains with primarily sequential tasks.
- Algorithm Logic: Begins with the initial task network and state. Recursively selects a task, if it's primitive and its preconditions hold, it executes it (updating state); if it's compound, it selects an applicable method, decomposes it, and adds the new subtasks.
- Key Feature: Its forward search respects the current world state at each step, making it sound and complete for its formalism.
- Modern Use: The principles of SHOP underlie many contemporary AI planning systems and agentic workflow engines where hierarchical, procedural knowledge is key.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us