knowledgesdk.com/glossary/planner
AI Agentsintermediate

Also known as: task planner, agent planner

Planner (Agent)

A reasoning component that decomposes a high-level goal into a sequence of sub-tasks or tool calls for an agent to execute.

What Is a Planner?

A planner is the component of an AI agent system responsible for taking a high-level goal and producing a concrete plan — a sequence of steps, tool calls, or sub-tasks that, when executed, will achieve the goal. The planner separates the "what to do" decision from the "how to do it" execution.

In simple agents, planning and execution are interleaved in a single ReAct loop. In more sophisticated systems, an explicit planner generates the full plan upfront (or iteratively), and separate executor components carry it out.

Why Explicit Planning Helps

Letting an agent make one decision at a time in a loop works for straightforward tasks. But for complex, multi-step goals, this approach has weaknesses:

  • Myopic decisions — The agent optimizes for the immediate next step without considering downstream consequences.
  • Inefficient sequencing — Without a plan, the agent may perform redundant steps or miss a more efficient approach.
  • No parallelism — The agent cannot identify which steps can run simultaneously without seeing the whole task.

An explicit planning step addresses all three by giving the system a global view of the task before execution begins.

Planning Approaches

Upfront Planning (Plan-and-Execute)

The planner generates a complete task list before any execution begins. The executor then works through the list sequentially or in parallel. Simple and predictable, but brittle — if the plan is wrong, the executor has no mechanism to adapt.

Iterative Planning

The planner generates the next step (or few steps) at a time, incorporating results from previously executed steps. More adaptive, but slower due to additional LLM calls.

Hierarchical Planning

A high-level planner decomposes the goal into major phases. Sub-planners within each phase further decompose into specific actions. Used in complex multi-agent systems where the problem space is large.

A Planning Example

Given the goal: "Research the pricing and feature differences between Salesforce, HubSpot, and Pipedrive."

An upfront planner might generate:

1. Extract Salesforce pricing page (https://salesforce.com/pricing)
2. Extract HubSpot pricing page (https://hubspot.com/pricing)
3. Extract Pipedrive pricing page (https://pipedrive.com/pricing)
4. Extract Salesforce features page
5. Extract HubSpot features page
6. Extract Pipedrive features page
7. Compare pricing tiers across all three
8. Compare feature sets across all three
9. Write summary report

Steps 1–6 can be parallelized. Steps 7–9 depend on 1–6. The planner's output makes this dependency structure explicit.

Planner Implementation

Planners are typically implemented as a specialized LLM call with a system prompt that instructs the model to output a structured task list — often in JSON or markdown — rather than immediately acting. Chain-of-thought reasoning is usually applied at the planning stage to improve decomposition quality.

For web research tasks, a planner working with KnowledgeSDK might generate a list of URLs to extract via /v1/extract, searches to run via /v1/search, and sitemaps to fetch via /v1/sitemap — before a single extraction call is made. This upfront planning makes the overall agent faster and more token-efficient by eliminating redundant or misordered steps.

Related Terms

AI Agentsintermediate
Orchestrator Agent
A top-level agent that coordinates multiple sub-agents or tools, routes tasks, and assembles final outputs from their results.
AI Agentsbeginner
Chain of Thought
A prompting technique that encourages LLMs to reason step-by-step before producing a final answer, improving accuracy on complex tasks.
AI Agentsintermediate
ReAct
A prompting framework that interleaves Reasoning traces and Action steps, enabling agents to plan while gathering information.
AI Agentsintermediate
Multi-Agent System
An architecture where multiple specialized AI agents collaborate, each handling a sub-task and communicating results to an orchestrator.
Parent-Child ChunkingPolite Crawling

Try it now

Build with Planner (Agent) using one API.

Extract, index, and search any web content. First 1,000 requests free.

GET API KEY →
← Back to glossary