Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Hierarchical Task Planning Agent

    1

    Implement Hierarchical Task Network (HTN) planning, goal decomposition, and dynamic re-planning for autonomous agents.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Hierarchical Task Planning Agent

    Hierarchical Task Planning Agent

    Example session with this skill installed

    Decompose the goal 'Research a company and generate a financial report' into a hierarchical task network with pre-conditions.

    • Read your context and instructions
    • Compiled the hierarchical task planning

    I have decomposed the financial research goal into a Hierarchical Task Network (HTN). The resulting Directed Acyclic Graph (DAG) includes primitive tasks, compound tasks, and the required logic for state transitions and re-planning.

    Hierarchical Task Plan: Financial Research & Reporting

    {
      "plan_id": "fin-research-001",
      "goal": "Generate Comprehensive Financial Report",
      "root_task": "task_execute_report_workflow",
      "nodes": {
        "task_execute_report_workflow": {
          "type": "compound",
          "subtasks": ["task_data_acquisition", "task_data_analysis", "task_report_generation"],
          "ordered": true
        },
        "task_data_acquisition": {
          "type": "compound",
          "subtasks": ["task_fetch_sec_filings", "task_scrape_news"],
          "ordered": false
        },
        "task_fetch_sec_filings": {
          "type": "primitive",
          "pre_conditions": {
            "api_key_valid": true,
            "ticker_symbol_provided": true
          },
          "post_conditions": {
            "raw_filings_available": true
          },
          "retry_policy": "dynamic_replan_on_auth_fail"
        },
        "task_data_analysis": {
          "type": "primitive",
          "pre_conditions": {
            "raw_filings_available": true,
            "raw_news_available": true
          },
          "post_conditions": {
            "analysis_payload_ready": true
          }
        },
        "task_report_generation": {
          "type": "primitive",
          "pre_conditions": {
            "analysis_payload_ready": true
          },
          "post_conditions": {
            "report_pdf_created": true
          }
        }
      },
      "replanning_triggers": [
        {
          "condition": "api_quota_exceeded",
          "action": "switch_to_backup_provider"
        },
        {
          "condition": "task_data_acquisition_timeout",
          "action": "re-evaluate_data_sources"
        }
      ]
    }
    

    Next steps

    1. Implement the task_fetch_sec_filings worker using your preferred SEC API client.
    2. Map the replanning_triggers to your agent's global error handling loop.
    3. Validate the analysis_payload_ready state before initiating the generation task.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Complex agentic workflows often collapse when tasks aren't properly sequenced or when environmental conditions change mid-execution. This skill implements Hierarchical Task Network (HTN) decomposition to turn high-level goals into resilient, dependency-aware execution graphs.

    What it does

    • Goal decomposition breaks down high-level objectives into a Directed Acyclic Graph (DAG) of compound and primitive tasks.
    • Dependency management establishes strict pre-conditions and post-conditions for every node in the task tree.
    • Dynamic re-planning generates triggers to handle runtime failures when environmental conditions shift.
    • State schema generation produces clean JSON planning schemas and execution loop controllers for your agentic system.

    How it works

    1. Analyze input goal to identify the primary objective and required sub-tasks.
    2. Construct the DAG by mapping task relationships and execution order.
    3. Define conditions for each node to ensure valid state transitions.
    4. Generate execution logic including the re-planning triggers and JSON controllers.

    Frameworks & tools

    This skill focuses on agentic AI architectures, specifically Hierarchical Task Networks (HTN) and Directed Acyclic Graphs (DAG). It outputs logic compatible with modern agent frameworks and uses JSON for planning state schemas.

    Why this beats prompting it yourself

    Writing prompts for multi-step logic often results in linear lists that break easily. This skill applies formal HTN algorithms to ensure tasks are logically sound, dependency-mapped, and capable of recovery, which is difficult to maintain through manual prompting.

    Use cases

    • Building autonomous agents that require multi-step planning and error recovery.
    • Creating dependency graphs for complex data pipeline automation.
    • Implementing execution controllers for multi-agent swarm coordination.

    Known limitations

    Outputs are focused on planning logic and JSON schemas rather than full boilerplate for specific external libraries. Environment-specific tool integrations must be mapped to the generated task nodes manually.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Focuses on logic and JSON schemas. Requires manual mapping of generated nodes to specific environment-dependent tool executions. Project-scoped runners only.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    Software
    Zero global installation
    orelevated privileges required.

    File System Read/Write (strictly scoped to current project workspace `./`).

    Permissions

    Read Files

    Target Use Cases: - Design a hierarchical task planning system for AI agents. - Build a dynamic re-planning engine using DAG dependency graphs. - Create an HTN goal decomposition architecture for autonomous agents.

    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This skill uses Hierarchical Task Network (HTN) logic to break complex goals into manageable sub-tasks with strict dependencies. It prevents agents from getting stuck in linear loops or failing when one step in a multi-stage process deviates from the plan.

    The skill outputs structured JSON execution schemas and DAG logic that can be integrated into any framework supporting custom agentic workflows, such as LangGraph, AutoGPT, or custom Python-based orchestrators. It is designed to be model-agnostic and works with any high-reasoning LLM.

    You will receive the core HTN planning logic, state schema generators, and the dynamic re-planning trigger templates. These assets allow your agent to build, validate, and repair its own execution graphs during runtime.

    While the skill generates the logical sequence and JSON schemas, you will need to manually map your specific API calls or functions to the task nodes. The skill focuses on the 'brain' of the operation—the planning and logic—rather than providing pre-built integrations for external third-party tools.

    Yes, the dynamic re-planning component is specifically designed to detect when post-conditions aren't met. If a task fails, the agent uses the generated logic to reassess the current state and trigger a partial or full re-plan of the remaining task tree.

    New in Agents & Orchestration