II · Planning & Control FlowEmerging

Hybrid HTN + Generative Agent

also known as HTN-Backbone Generative Agent, Hierarchical-Task-Network Hybrid

Hierarchical Task Network decomposition provides the procedural backbone; the generative LLM is invoked only at leaf nodes for the parts of the task that are genuinely open-ended.

Context

A team has a task whose structure is well-known (HTN-style decomposition exists) but whose leaves require open-ended language understanding or generation. Pure LLM-driven planning re-invents the structure each run; pure HTN cannot handle the open-ended leaves.

Problem

Pure-LLM planning is expensive and inconsistent for tasks with known structure. Pure HTN cannot handle the leaves that require natural-language reasoning. Neither alone fits tasks with both well-known structure and open-ended leaves.

Forces

  • HTN backbone requires upfront task decomposition.
  • Generative leaves are unpredictable; HTN expectations may not match.
  • Hybrid increases system complexity — two planning paradigms in one agent.

Example

A legal-research agent's task decomposes via HTN: research-question → [find-cases, find-statutes, find-commentary] → [for each: search, filter, summarize]. HTN structure is fixed. At each leaf (e.g. 'summarize this case'), the LLM is invoked. Parent nodes assemble leaf summaries deterministically. Pure LLM planning would re-invent this decomposition every run; pure HTN couldn't summarize.

Diagram

Solution

Therefore:

HTN decomposition specifies the task structure: root task → sub-tasks → ... → leaves. Internal nodes are deterministic decomposition (no LLM). Leaf nodes invoke the LLM for the open-ended work (drafting text, classifying ambiguous input, summarizing). LLM outputs at leaves feed back into the HTN structure (parent nodes assemble leaf outputs). Pair with goal-decomposition, hierarchical-agents, deterministic-control-flow-not-prompt, plan-and-execute.

What this pattern forbids. HTN decomposition is deterministic; LLM invocation is restricted to leaf nodes; non-leaf nodes may not invoke the LLM.

And the patterns that stand alongside it, or against it —

  • complementsGoal Decomposition★★Decompose a goal into sub-goals recursively until each leaf is directly actionable.
  • complementsHierarchical Agents★★Organise agents in a tree where higher-level agents decompose tasks for lower-level agents, recursively.
  • complementsDeterministic Control Flow, Not PromptBranching decisions live in deterministic application code while the LLM is invoked at strategic points to produce structured signals that the code branches on.
  • alternative-toPlan-and-Execute★★Plan all the steps once with a strong model, then execute each step with a cheaper model under the plan.
  • complementsHybrid Symbolic-Neural RoutingPer query, route between a symbolic path (rule engine, knowledge graph) and a neural path (LLM), using the LLM for interpretation and the symbolic layer for exact constraints.

Neighbourhood

Click any neighbour to follow the language. Scroll to zoom, drag to pan.

References

Provenance