In Hierarchical Task Network (HTN) planning, a Method is a schema that specifies a possible way to decompose a compound task into a network of subtasks, but only if certain preconditions are met in the current world state. It is the fundamental rule that encodes domain-specific knowledge about how to achieve complex goals, transforming abstract intentions into concrete, executable steps. Each method provides one valid recipe for task reduction, and a planner selects among applicable methods to find a workable plan.
Glossary
Method (HTN)

What is Method (HTN)?
A Method is the core decomposition rule in Hierarchical Task Network (HTN) planning, defining how to break down an abstract, high-level task into a structured network of subtasks.
A method formally consists of a task head (the compound task it decomposes), a set of preconditions (logical conditions that must be true for it to be applicable), and a task network (the resulting set of subtasks with ordering constraints). This structure allows HTN planners to perform task decomposition recursively, replacing high-level objectives with increasingly specific actions until only primitive tasks (directly executable operators) remain, forming a complete solution plan.
Key Components of an HTN Method
A Method in Hierarchical Task Network planning is a schema that defines a single, conditional way to decompose a compound task into a network of subtasks. It is the core mechanism that encodes procedural knowledge.
Compound Task Head
Every method is associated with a specific compound task it can decompose. The method's head matches the name and parameters of this abstract, high-level task. For example, a method with the head Transport(Package, CityA, CityB) provides a way to achieve the goal of transporting a package between two cities. A single compound task may have multiple methods, each representing a different strategy for accomplishing it.
Precondition
A logical expression that must evaluate to true in the current world state for the method to be applicable. Preconditions gate the use of a specific decomposition strategy.
- Example: A
Fly(Passenger, AirportA, AirportB)method may have the preconditionHasTicket(Passenger) AND Operational(Airplane). If the passenger has no ticket, this method is invalid, and the planner must seek an alternative (e.g., aDrivemethod). - Preconditions are evaluated during planning, enabling context-sensitive decomposition.
Subtasks (Task Network)
The core body of the method: a partially ordered network of new tasks that replace the original compound task. These subtasks can be:
- Primitive Tasks: Directly executable actions (operators).
- Compound Tasks: Requiring further decomposition by other methods.
- The network can include ordering constraints (e.g.,
Subtask1 BEFORE Subtask2) and causal links to ensure the preconditions of later tasks are met by the effects of earlier ones.
Decomposition Process
The planner applies a method by instantiating its subtask network and inserting it into the evolving plan in place of the matched compound task. This process is recursive: new compound subtasks are selected and decomposed until the plan contains only primitive, executable actions. This recursion builds a decomposition tree, which is later flattened into a linear sequence of actions for execution.
Method vs. Operator
It is critical to distinguish a Method from an Operator in HTN planning.
- Operator: Represents a single, atomic, executable action in the world (e.g.,
PickUp(Object),NavigateTo(Location)). Defined by its preconditions and direct effects on the world state. - Method: A decomposition rule for an abstract task. It has no direct world effects. Its "effect" is to introduce more plan structure. Methods provide the "how-to" knowledge, while operators provide the "what-can-be-done" knowledge.
Domain-Specific Knowledge Encoding
The collection of methods in an HTN domain description encodes expert procedural knowledge, making HTN planning highly efficient for known domains. For instance, methods for AssembleProduct would encode the specific, correct assembly steps for that product. This contrasts with classical planners that search through all possible action sequences; HTN planners search through known, sensible decomposition paths, which is often far more constrained and directed.
How Does a Method Work in HTN Planning?
A method is the core decomposition rule in Hierarchical Task Network planning, defining how to break down an abstract, compound task into a network of subtasks.
A method is a schema that defines a single, valid way to decompose a specific compound task into a network of smaller subtasks, provided its preconditions are satisfied in the current world state. It acts as a procedural recipe, encoding domain-specific knowledge about how to achieve a high-level objective. Each method essentially answers the question: "Given these conditions, here is one way to accomplish this abstract task." The planner selects applicable methods to recursively replace compound tasks until only primitive tasks (executable actions) remain.
The structure of a method includes a head (the compound task it decomposes), a set of logical preconditions, and a body (the resulting task network). This network can contain new compound or primitive tasks with ordering constraints between them. During planning, the algorithm searches through the space of possible method applications. The choice of method determines the plan's structure, making methods the primary mechanism for injecting expert knowledge and controlling the planner's search, leading to highly efficient and domain-appropriate solutions.
Frequently Asked Questions
Common questions about Methods, the core decomposition rules in Hierarchical Task Network (HTN) planning that define how abstract tasks are broken down into executable actions.
A Method in Hierarchical Task Network (HTN) planning is a schema that defines a possible way to decompose a compound task into a network of subtasks, provided certain preconditions in the current world state are satisfied. It is the core procedural knowledge that drives the task decomposition process, transforming high-level goals into executable plans. Each method consists of a head (the compound task it decomposes), a set of preconditions, and a body (the resulting network of subtasks, which can be other compound or primitive tasks). The planner selects applicable methods to recursively break down tasks until only primitive, directly executable actions remain.
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 Method is a core schema within the HTN formalism. To fully understand its role, it's essential to grasp the related concepts that define the planning domain, the decomposition process, and the resulting plan structures.
Compound Task
A Compound Task is a high-level, abstract goal within an HTN that cannot be executed directly. It serves as a placeholder that must be decomposed into a network of smaller subtasks using applicable Methods. For example, the task DeliverPackage is compound; it requires decomposition into subtasks like NavigateToDestination, ConfirmRecipient, and HandOverPackage. The planner's primary job is to recursively decompose compound tasks until only primitive tasks remain.
Primitive Task
A Primitive Task (or Operator) is the atomic, executable unit in an HTN. It corresponds directly to an action that can be performed in the world, such as MoveRobot or GraspObject. Unlike a compound task, a primitive task is not decomposed further. It is defined by:
- Preconditions: Logical conditions that must be true for the action to be applicable.
- Effects: The changes to the world state that result from executing the action. The planning process is complete when all tasks in the network are primitive.
Task Decomposition
Task Decomposition is the fundamental process in HTN planning. It is the act of replacing a Compound Task in the current plan with a network of subtasks by applying an applicable Method. This process is recursive; newly introduced compound subtasks are further decomposed. The decomposition is guided by the method's Preconditions, which ensure the chosen decomposition is valid for the current world state. This creates a Decomposition Tree, visually mapping the high-level goal to executable actions.
Precondition
A Precondition is a logical expression that defines the circumstances under which a planning Operator (primitive task) or a Method is applicable. For a method, preconditions guard its use; the method can only be selected to decompose a task if its preconditions are satisfied by the current world state. For example, a method for ChargeDevice may have the precondition BatteryLevel < 20%. Preconditions are critical for ensuring plans are contextually appropriate and feasible.
Skeletal Plan
A Skeletal Plan is a partially specified, abstract plan generated during the intermediate stages of HTN planning. It contains a mix of Compound Tasks awaiting decomposition and Primitive Tasks that are ready for execution. The skeletal plan is progressively refined through Task Decomposition until it becomes a fully concrete Solution Plan. This concept highlights the hierarchical refinement nature of HTN planning, as opposed to constructing a plan purely from sequential actions.
SHOP (Simple Hierarchical Ordered Planner)
SHOP is a seminal, forward-search HTN planning algorithm. It operates by performing Task Decomposition in a depth-first, progressive manner, interleaving planning with state progression. As SHOP decomposes tasks, it immediately applies the effects of chosen primitive actions to a simulated world state. This allows subsequent preconditions to be evaluated against an updated state, making the planning process highly efficient and grounded. SHOP exemplifies how methods are procedurally applied to find an executable sequence.

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