Skip to content

Planner & Optimizer Tool

The Planner & Optimizer Tool is a special helper in Nappai that tells an AI agent how to break a big task into smaller steps and decide the best way to search for information. Think of it as a smart planner that writes a clear action plan and a concise search query for the next step in your workflow.

How it Works

When you add this component to a dashboard, you give it two pieces of information:

  1. Tool Description – a short paragraph that tells the AI exactly what it should do.
  2. Tool Name – the label that will appear in the workflow so you can refer to it later.

Internally, the component takes those inputs and builds a Tool object. That object can then be passed to other parts of your automation flow, such as a web‑search tool or a data‑retrieval component. No external APIs are called by this component itself; it simply prepares the instructions for the AI agent.

Inputs

  • Tool Description: A detailed instruction set for the AI agent. It explains when and how the agent should use this planner tool.
    Example value:
    MUST BE THE FIRST TOOL CALLED in any complex task. Use this tool to analyze the user's query, break it down into smaller problems, and create a clear action plan. The output of this tool is crucial for the following steps.
  • Tool Name: The name you want to give to the planner tool so it can be referenced later in the workflow.
    Example value: TaskPlanner

Outputs

  • Tool: A ready‑to‑use Tool object created by the build_tool method. This output can be fed into other components that expect a Tool, such as a search or execution step.

Usage Example

  1. Add the component to your dashboard and set the two inputs.

    • Tool Description:
      MUST BE THE FIRST TOOL CALLED in any complex task. Use this tool to analyze the user's query, break it down into smaller problems, and create a clear action plan. The output of this tool is crucial for the following steps.
    • Tool Name: TaskPlanner
  2. Connect the output (Tool) to the next component in your workflow, such as a web‑search tool. The AI will now use the plan and search query generated by this component to proceed.

  3. Run the workflow. The AI will first use the Planner & Optimizer Tool to create a step‑by‑step plan and an optimized search query, then move on to the next tool with that information.

  • Web Search Tool – Uses the search query produced by the Planner & Optimizer Tool to fetch relevant information.
  • Execution Tool – Takes the step‑by‑step plan and carries out the actions in order.

Tips and Best Practices

  • Keep the Tool Description concise but complete; it should clearly state that this tool must be the first step in a complex task.
  • Use English for the search query part of the description to improve search accuracy.
  • Name the tool something memorable (e.g., TaskPlanner) so you can easily identify it in later steps.
  • Test the planner with a simple query first to ensure the AI generates a useful plan before adding more complex logic.

Security Considerations

This component only builds a tool object; it does not send data outside of Nappai. All information stays within your workflow, so there are no additional security risks beyond those of the downstream components that use the generated tool.