- Home
- Skills
- Agents & Orchestration
- Hierarchical Task Planning Agent
Works with the AI Agents you already use
Hierarchical Task Planning Agent
Implement Hierarchical Task Network (HTN) planning, goal decomposition, and dynamic re-planning for autonomous agents.
$15
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
- Implement the
task_fetch_sec_filingsworker using your preferred SEC API client. - Map the
replanning_triggersto your agent's global error handling loop. - Validate the
analysis_payload_readystate 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
- Analyze input goal to identify the primary objective and required sub-tasks.
- Construct the DAG by mapping task relationships and execution order.
- Define conditions for each node to ensure valid state transitions.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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 installationorelevated privileges required.
File System Read/Write (strictly scoped to current project workspace `./`).
Permissions
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.