liveBook · Manning

Planning module

As explained in AI Agents in Action, Second Edition

A cognitive-agent component that selects a strategy, reviews relevant experience, and constructs a plan for task execution.

A planning module reads a task representation, selects a strategy, reviews relevant experience, and constructs the plan that drives execution. Unlike a standard agent with one fixed tool-calling path, it adapts its approach to task type and complexity. section 10.2.4 section 10.2.1

Choose a strategy that matches the problem:

  • Use DIRECT for simple lookups with low complexity and one tool call. section 10.2.4
  • Use DECOMPOSE for multistep problems, ordering subtasks and identifying dependencies. section 10.2.4
  • Use EXPLORE for ambiguity, gathering information before committing to an approach. section 10.2.4
  • Use HYPOTHESIS_TEST for contradictions, generating competing explanations and tests for each. section 10.2.4

Memory improves planning without replacing it. Relevant past experiences can make a plan more efficient, while contradictory evidence should trigger replanning rather than blind adherence to the original decomposition. section 10.1.1 section 10.2.4

Diagnosing intermittent failures under load

For a contradictory troubleshooting task, the planner selects HYPOTHESIS_TEST and uses a memory about connection-pool exhaustion. It proposes tests for connection limits, health-check races, and resource contention, then lets evaluation update the next step. section 10.3.3

Figure 10.5 Planning module strategy selection

A strategy-selection decision tree makes the relationship between task type, complexity, contradictions, memory, and plan choice inspectable. section 10.2.4

How AI Agents in Action, Second Edition covers it

How deep it goes
Defines four strategies, decision inputs, memory use, replanning triggers, and plan output, without detailing model internals.
Examples
Uses lookup, multistep, ambiguous, and contradictory tasks, including troubleshooting hypotheses about connection pools and health checks.
What it assumes
Assumes a task representation and shared workspace, while teaching strategy selection and memory-informed planning.
What you can do after
Build an adaptive execution plan that incorporates task complexity, contradictions, and relevant past experience.
How it connects
Connects the perception module, memory module, evaluation module, execution module, and cognitive workspace.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action, Second Edition. The section links point to the parts of the book it draws on.