← Library08 Sources/DeepLearningAI Agentic AI

ai · agents · planning · multi-agent · status/growing

Module 5 — Planning and Multi-Agent Systems

08 Sources/DeepLearningAI Agentic AI/Module 5 - Planning and Multi-Agent Systems.md

Module 5 — Planning and Multi-Agent Systems

Lesson notes

Planning lets a model construct a task-specific sequence instead of following a fixed pipeline. A plan should be an inspectable artifact with steps, dependencies, success conditions, budgets, and permitted tools. Execution must update the plan when observations invalidate assumptions.

Planning workflow

flowchart TD G[Goal and constraints] --> P[Create plan] P --> V[Validate dependencies, budget, permissions] V --> E[Execute next step] E --> O[Observe result] O --> C{Goal met?} C -- yes --> F[Verify and finish] C -- no --> R{Plan still valid?} R -- yes --> E R -- no --> P

Plans are useful for open-ended tasks whose steps cannot all be known in advance. Fixed workflows remain preferable for stable, regulated, or high-volume processes.

Creating and executing plans

  • Keep steps concrete and testable.
  • Represent dependencies explicitly.
  • Separate planning from execution when review matters.
  • Re-plan from new evidence, not merely because a step failed once.
  • Limit plan depth, tool calls, wall time, and spend.
  • Preserve a trace of decisions and artifacts.

Planning with code execution

A planner can write and run code for calculations, data inspection, simulations, or artifact creation. Code execution is an implementation tool, not a permission bypass: sandbox it, inspect outputs, and require approval for consequential actions.

Customer-service application

The agent identifies intent, gathers account/order evidence, consults policy, proposes a resolution, executes only permitted reversible actions, verifies the result, and escalates exceptions. Policy and authorization must be enforced in code rather than entrusted to a prompt.

Multi-agent workflows

Use multiple agents when meaningful specialization, independent perspectives, or parallel work outweigh coordination cost. Common structures:

  • Sequential handoff: each role transforms the previous artifact.
  • Coordinator–workers: a manager decomposes, assigns, and synthesizes.
  • Parallel specialists: independent research or analysis is merged.
  • Review/debate: one agent challenges another against a rubric.

Agents need narrow roles, input/output contracts, shared state rules, and a single owner of the final result. More agents do not automatically produce more intelligence; they can multiply duplicated work, latency, and correlated mistakes.

Market-research team

A coordinator defines questions and evidence standards. Specialist agents examine customers, competitors, market signals, and risks in parallel. A synthesizer reconciles conflicts, cites evidence, exposes uncertainty, and produces recommendations. Independent source gathering is useful; uncontrolled agent conversation is not.

Communication patterns

Prefer structured artifacts over long free-form chat. Pass claims with evidence, decisions with rationale, open questions, and completion status. Use shared storage for stable outputs and messages for coordination. Prevent circular delegation with ownership and depth limits.

Autonomy safety envelope

  • Allowed tools and data sources
  • Read/write permissions
  • Spend, time, and step budgets
  • Reversible versus consequential actions
  • Approval checkpoints
  • Stop and escalation conditions
  • Audit trail and rollback plan

Related

Knowledge connections