Skip to content

Hierarchical Task

The Hierarchical Task component lets you define a single task that an agent will carry out.
You give it a short description of what the task is, what you expect the result to look like, and optionally a list of tools the agent can use. The component then creates a HierarchicalTask object that can be passed to other parts of your workflow.

How it Works

When you drop the component into your dashboard, it simply builds a HierarchicalTask instance using the values you provide:

  1. Description – a text field that explains the purpose of the task.
  2. Expected Output – a clear statement of what the task should produce.
  3. Tools – an optional list of tools or resources the agent can use while executing the task. If you leave this empty, the agent will use its default tool set.

No external APIs are called by this component; all processing happens locally within Nappai.

Inputs

  • Tools
    List of tools/resources limited for task execution. Uses the Agent tools by default.

  • Expected Output
    Clear definition of expected task outcome.

  • Description
    Descriptive text detailing task’s purpose and execution.

Outputs

  • Task – The component outputs a HierarchicalTask object that can be fed into agents or other workflow components.

Usage Example

  1. Add the component to your workflow.
  2. Fill in the fields:
    • Description: “Generate a monthly sales report for the marketing team.”
    • Expected Output: “A PDF file named SalesReport_Monthly.pdf containing sales figures, charts, and a summary.”
    • Tools (optional): Select the “PDF Generator” and “Data Fetcher” tools.
  3. Connect the output (Task) to an Agent component that will execute the task.
  4. The agent will read the task details, use the specified tools, and produce the report.
  • Agent – Executes the task created by this component.
  • Tool – Defines individual tools that can be attached to a task.
  • Task – Generic task component for simpler, non-hierarchical tasks.

Tips and Best Practices

  • Keep the Description concise but informative; it helps the agent understand the goal.
  • Write the Expected Output in measurable terms (e.g., file format, file name, key data points).
  • Only add Tools if the task truly needs them; unnecessary tools can slow down execution.
  • Test the task with a simple agent first to confirm that the description and expected output are interpreted correctly.

Security Considerations

  • Review the list of Tools to ensure no sensitive or restricted resources are exposed.
  • If the task involves handling confidential data, consider adding a Data Masking tool or setting appropriate permissions on the agent.