Inferensys

Glossary

Domain Description (HTN)

A Domain Description in Hierarchical Task Network (HTN) planning is the formal specification that defines the set of tasks, decomposition methods, executable operators, and constraints for an autonomous agent to solve problems.
Product manager reviewing autonomous task execution dashboard on laptop, completed tasks visible, casual work session.
HIERARCHICAL TASK NETWORKS

What is a Domain Description (HTN)?

A Domain Description in Hierarchical Task Network (HTN) planning is the formal, declarative specification that defines the capabilities and rules for an autonomous agent or planning system within a specific problem area.

A Domain Description is the core knowledge base for an HTN planner, formally encoding the operators (executable actions), compound tasks (abstract goals), and methods (decomposition recipes) available to an agent. It defines the legal transformations of the world state through operator preconditions and effects, and it specifies how high-level objectives can be recursively broken down into executable steps. This specification is entirely separate from a specific problem instance, making it a reusable blueprint for a class of planning challenges, such as logistics, manufacturing, or robotic manipulation.

The precision of a domain description directly determines the soundness and efficiency of the resulting plans. It constrains the planner's search space by providing structured decomposition knowledge, which is more efficient than exploring all possible primitive action sequences. A well-engineered domain description balances expressiveness with computational tractability, often incorporating ordering constraints and logical conditions on method applicability. This formalism is foundational to systems like SHOP and is a critical component for building reliable, goal-directed autonomous agents in complex, structured environments.

HIERARCHICAL TASK NETWORKS

Core Components of an HTN Domain Description

An HTN Domain Description is the formal specification that defines the capabilities and logic for a Hierarchical Task Network planner. It acts as a rulebook, detailing what tasks can be performed, how complex goals can be broken down, and the conditions under which actions are valid.

01

Task Schemas

Task schemas are templates that define the classes of tasks the planner can reason about. They are the fundamental building blocks of the domain.

  • Primitive Task Schemas define directly executable actions, analogous to operators in classical planning. Example: drive(vehicle, location_a, location_b).
  • Compound Task Schemas define high-level, abstract goals that require decomposition. Example: deliver_package(package, destination). Each schema includes a name and a set of typed parameters, establishing the vocabulary for the planning problem.
02

Operators

Operators provide the executable semantics for primitive tasks. An operator is a grounded instance of a primitive task schema, defined by:

  • Preconditions: Logical conditions that must be true in the current world state for the action to be applicable. Example: At(vehicle, location_a) ∧ HasFuel(vehicle).
  • Effects: The changes applied to the world state upon successful execution. Effects add and delete predicates. Example: Add: At(vehicle, location_b); Delete: At(vehicle, location_a). Operators are the leaves of the decomposition tree, representing the actual steps in a final executable plan.
03

Methods

Methods are the core decomposition rules for compound tasks. A method specifies one way to achieve a high-level goal by breaking it into a network of smaller subtasks.

  • Each method is associated with a specific compound task schema.
  • It contains method preconditions that must hold for this decomposition to be valid.
  • Its body is a task network: a set of subtasks (which can be compound or primitive) and ordering constraints between them. For the compound task deliver_package(pkg, dest), a method might decompose it into: 1. load(pkg, truck) → 2. drive(truck, warehouse, dest) → 3. unload(pkg, truck).
04

Initial State & Task Network

These components define a specific planning problem instance within the domain.

  • Initial State: A complete snapshot of the world before planning begins, expressed as a set of grounded, true logical predicates. Example: {At(Truck1, Depot), In(PackageA, Warehouse), HasFuel(Truck1)}.
  • Initial Task Network (ITN): The goal specification for the planner. It is the set of high-level compound tasks that need to be accomplished. For a simple goal, the ITN might contain a single task like [deliver_package(PackageA, CustomerSite)]. The planner's job is to decompose this ITN into a sequence of executable operators.
05

Constraints

Constraints impose necessary relationships and limitations on the planning process, ensuring generated plans are logically consistent and feasible.

  • Ordering Constraints: Specify temporal precedence between subtasks within a method's network (e.g., A < B meaning A must precede B).
  • Logical Constraints (Preconditions): Ensure tasks and methods are only applied in valid states.
  • Resource Constraints: (In extended HTN formulations) Limit the use of consumable or reusable assets (e.g., battery_level > 20, uses(robot, gripper)). These constraints are evaluated during decomposition to prune invalid search paths.
06

Domain vs. Problem

A critical distinction in HTN planning separates the reusable domain knowledge from the specific scenario.

  • Domain Description: The permanent rulebook containing the task schemas, operators, and methods. It encodes the know-how for a field (e.g., logistics).
  • Planning Problem: The transient instance combining the domain with a specific initial state and initial task network. It asks: "Given these rules and this starting situation, how do I achieve this goal?" This separation allows a single, well-engineered domain description to solve an infinite variety of specific problems.
FOUNDATIONAL SPECIFICATION

How an HTN Domain Description Enables Planning

A Hierarchical Task Network (HTN) Domain Description is the formal, declarative blueprint that defines an agent's capabilities and the rules for structuring complex work.

An HTN Domain Description is a formal specification that defines the vocabulary and rules for a planning problem, enabling an agent to decompose abstract goals into executable actions. It comprises a task library of primitive tasks (executable operators) and compound tasks (abstract goals), linked by decomposition methods that act as recipes. This specification provides the planner with a structured knowledge base of what can be done and how high-level objectives can be systematically broken down, given logical preconditions and effects.

By encoding domain expertise into this declarative structure, the description separates strategic knowledge (the methods) from procedural control. The planner's algorithm, such as SHOP, uses this static domain model alongside a dynamic initial state and initial task network to perform task decomposition. This process recursively refines a skeletal plan into a hierarchical plan of primitive actions, ensuring every step is grounded in the domain's defined constraints and capabilities.

DOMAIN DESCRIPTION (HTN)

Frequently Asked Questions

A Domain Description is the formal specification that defines an HTN planning problem. It provides the rules and vocabulary for how an agent can decompose abstract goals into executable actions. Below are key questions about its structure and role in agentic systems.

An HTN Domain Description is the formal, declarative specification that defines the rules for a Hierarchical Task Network planning problem. It provides the complete set of task schemas, decomposition methods, and planning operators that an autonomous agent uses to reason about how to achieve complex, high-level goals by breaking them down into executable steps.

Think of it as the "rulebook" or "knowledge base" for a planning agent. It doesn't contain the specific problem to solve (the initial state and goal tasks), but rather the general capabilities and logic for solving any problem within its domain. A complete planning problem is created by combining this domain description with an initial state and an initial task network.

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.