100% found this document useful (1 vote)
639 views12 pages

Guide To Planning AI Agents

Uploaded by

JAZZiNGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
639 views12 pages

Guide To Planning AI Agents

Uploaded by

JAZZiNGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Guide to

Agentic AI
Planning
Pattern

Dipanjan (DJ)
Planning Agents

The Planning Pattern has the following main components:


1. Planning
In this initial stage, the AI agent interprets the prompt and devises an overall plan to tackle
the problem, including high-level goals
2. Generate Task
From the plan, the AI system generates specific tasks that must be executed. Each task
represents a smaller, manageable portion of the overarching goal
3. Single Task Agent
The Single Task Agent is responsible for completing each task generated in the previous
step. This agent executes each task using predefined methods like ReAct (reflect-then-act)
or ReWOo (rework-oriented operations).
Once a task is completed, the agent returns a Task Result, which is sent back to the
planning loop.
4. Replan
The Replan stage evaluates the Task Result to determine if any adjustments are needed.
If the task execution does not fully meet the desired outcome, the system will replan and
possibly modify the tasks or strategies.
5. Iterate:
This part of the pattern is a loop connecting Generate Task and Replan.

Source: What is Agentic AI Planning Pattern?


Planning Agent
Example

The above-given illustration depicts a sequential image understanding process,


with steps that align with the agentic AI planning pattern
Evaluation and Iteration (Combining Results)
Processing and Aggregating Information: The results from detection (bounding
boxes and object types) and captioning (descriptive text) are combined. The agent
evaluates its outputs, confirming both object detection confidence levels and the
coherence of the description.
Agentic AI Element: The agent reviews its predictions (detection scores and
bounding boxes) to ensure they align with the task’s demands.

Goal Achievement (Answer Presentation)


Output Presentation: The agent finally provides an answer that includes a count
of detected objects, a list of identified objects with confidence scores, and a
descriptive caption.
Agentic AI Element: The agent completes the goal by synthesising its perception
and planning outcomes into a coherent response. In agentic AI, this step is about
achieving the task’s overarching goal and generating an output that addresses the
user’s initial question.

Source: What is Agentic AI Planning Pattern?


Planning Agent
Example

The above-given illustration depicts a sequential image understanding process,


with steps that align with the agentic AI planning pattern
Evaluation and Iteration (Combining Results)
Processing and Aggregating Information: The results from detection (bounding
boxes and object types) and captioning (descriptive text) are combined. The agent
evaluates its outputs, confirming both object detection confidence levels and the
coherence of the description.
Agentic AI Element: The agent reviews its predictions (detection scores and
bounding boxes) to ensure they align with the task’s demands.

Goal Achievement (Answer Presentation)


Output Presentation: The agent finally provides an answer that includes a count
of detected objects, a list of identified objects with confidence scores, and a
descriptive caption.
Agentic AI Element: The agent completes the goal by synthesising its perception
and planning outcomes into a coherent response. In agentic AI, this step is about
achieving the task’s overarching goal and generating an output that addresses the
user’s initial question.

Source: What is Agentic AI Planning Pattern?


Task Decomposition
for Agentic AI Planning

Decomposition-First: A structured, step-by-step approach where all


sub-goals are planned before any execution. Suitable for stable
environments where the task is well-defined and unlikely to
change during execution.
Interleaved: A flexible, adaptive method where planning and
execution happen concurrently. This approach is ideal for dynamic
environments where real-time feedback and adjustments are
essential.

Source: What is Agentic AI Planning Pattern?


ReAct Framework

The ReAct framework combines Reasoning and Acting within a single loop.
Here, the language model alternates between Reasoning Traces and Actions in
the environment.
Process:
The model first reasons about the task, creating a “thought” or hypothesis about
what should be done next.
It then takes an action in the environment based on its reasoning.
After performing the action, the model observes the outcome in the environment,
which it incorporates into its next reasoning step.
This cycle of reasoning, acting, and observing continues iteratively, allowing
the model to learn and adapt based on real-time feedback from the
environment.
Significance: By integrating reasoning and acting, ReAct allows the model to
break down complex, multi-step tasks into manageable steps, adjust based on
outcomes, and work towards solutions that require both planning and
interaction.

Source: What is Agentic AI Planning Pattern?


Planning Pattern using
ReAct with LangChain

Source: What is Agentic AI Planning Pattern?


Planning Pattern using
ReAct with LangChain

Source: What is Agentic AI Planning Pattern?


Planning Pattern using
ReAct with LangChain

Source: What is Agentic AI Planning Pattern?


ReWOO Framework

Planner:
The Planner is responsible for creating an entire plan at the beginning. It determines the
sequence of actions or steps needed to solve the task.
For each action step, the Planner specifies:
Tool: The specific tool or function required for the step.
Arguments (args): The input values or variables needed for the tool.
The plan is defined using variable substitution, where the output of one tool (e.g., #E1) can be
used as an argument in another tool (e.g., #E2), creating dependencies across steps.
Importantly, this planning process occurs in a single LLM call, making it more efficient by
reducing token consumption than iterative, observation-based reasoning.
Worker:
The Worker is responsible for executing the actions per the plan the Planner generated.
The Worker takes the arguments provided for each step, invokes the specified tool, and
returns the result.
This execution can be looped until the task is solved, ensuring each tool action is completed
in the correct order as outlined in the plan.
The Worker functions independently of the LLM, meaning it simply follows the Planner’s
instructions without additional calls to the LLM at each step.

Source: What is Agentic AI Planning Pattern?


ReWOO Framework

Solver:
The Solver is the final component that interprets the results of the tools used by the
Worker.
Based on the observations gathered from tool executions, the Solver generates the
final answer to the user’s query or task.
This part may involve a final LLM call to synthesize the information into a coherent
response.

Source: What is Agentic AI Planning Pattern?


Detailed Article

Check out the


detailed article
here

You might also like