Skip to content

Planner Executor Agent

Planner Executor Agent coordinates other agents to solve tasks with several parts. When you ask for something complex, it prepares a plan with the steps needed and the agent that will take care of each one, and shows it to you before starting. You can approve it or reject it. Once approved, it carries out the steps in order, gives each agent what it needs and, at the end, writes a final answer that brings all the results together.

If you only ask a question or have a simple conversation, it answers directly without preparing a plan.

When to use it

  • You want a report that requires finding data, analysing it and writing up the result, each part handled by a different agent.
  • A multi-step task must get your approval before it runs.
  • You have specialised agents (sales, support, analysis) and want one that organises the work between them.
  • You need to see what was done in each step and which agent did it.

Configuration

FieldWhat it does
Agent NameThe agent’s name. It is used when you connect it as a tool or as an agent of another agent. Default: Agent.
Agent DescriptionWhat the agent does, in one sentence. It helps other agents decide when to use it.
User PromptThe text the agent receives. Default: {input}, which is replaced by whatever arrives at Input. You can add other variables in curly braces; each one appears as a new field.
InputThe user’s request, usually connected from a Chat Input.
ConnectionWhat to connect
Worker Agents (required)The Agent output of the agents that will do the work, for example Agent, Code Task Agent or Simple Report Agent. The planner knows them by their Agent Name and Agent Description, so give each one a different name and a clear description of what it can do.
Model (required)The AI model that prepares the plan and the final answer, for example OpenAI.

Advanced options

FieldWhat it does
Use memoryMakes the agent remember the conversation. Turn it on: the agent needs it to remember the plan between the message where it proposes it and the message where you approve it. When you turn it on, the Memory connection appears, where you can connect a memory component such as Postgres Memory. Default: off.
Stop on ErrorIf a step fails, stops the run and writes the answer with what was achieved up to that point. When off, it skips the failed step and goes on with the next one. Default: off.
Recursion LimitThe maximum number of internal steps the agent can take for each answer. Default: 1000.
StreamShows the progress of each step in the chat while the plan runs. Default: off.

Batch processing

With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.

Using it as an agent tool

You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.

Approving the plan

When the agent proposes a plan, reply in the chat:

  • yes, ok or approve to run it.
  • no, cancel or reject to discard it.

If you want a different plan, reject it and ask for the task again in a new message, explaining what must change, for example without the translation step or with a final step to check the spelling.

Output

  • Response: the agent’s messages in the chat: the plan to approve and, afterwards, the final answer with the results of every step. Connect it to a Chat Output.
  • Agent: the whole agent, to connect it to another component that coordinates agents.
  • Tool: the agent as a tool, to connect it to another agent’s Tools input.

Example

A consultancy prepares a monthly competitor analysis for its clients.

  1. Add an Agent named researcher, with a web search tool, and a Simple Report Agent named writer. Connect the Agent output of both to Worker Agents.
  2. Connect an AI model to Model and turn on Use memory.
  3. Connect a Chat Input to Input and Response to a Chat Output.
  4. In the chat write: Prepare an analysis of the three main competitors of Mirador Hotels with their prices and news from the last month.

The agent proposes a plan, for example researching each competitor and then writing the report. When you reply approve, it carries it out and delivers the analysis.

Good practices

  • Describe each agent in Worker Agents well: the plan is only good if the planner understands what each one can do.
  • Review the plan before approving it. If a step is missing, reject it and ask for the task again in more detail.
  • Supervisor Agent: coordinates agents without going through an approved plan.
  • Agent: NappAI’s general agent, useful as a worker agent.