Agentic AI trackLesson 3 of 6

The Four Design Patterns

Four building blocks, and how I read them against the one agent I have drawn so far.

By Parastoo Mosayebi8 min readBased on the Agentic AI course (opens in a new tab)

The short answer

Andrew Ng sorts the building blocks of agentic systems into four patterns: reflection, tool use, planning and multi-agent collaboration. Reflection and tool use are the more reliable pair. Planning and multi-agent collaboration are more powerful on open tasks and much harder to predict.

Why I like having names for them

As a web developer I know what a reusable pattern gives you: a name, a known shape and known trade-offs. Before you have the names, every agent looks like its own mystery. With them, you can look at a system and ask which of the four it uses, and why.

Ng's version comes from the series he published in The Batch in March and April 2024, and the course builds on it. I will go through the patterns one by one and then hold them against my Job-Match Agent.

More reliable

  • Reflection

    The LLM looks at its own work and finds ways to improve it.

    How it works
    You ask the model to write, then to critique what it wrote, then to rewrite using the critique. The loop can run again. It gets stronger when the feedback is real: running code against unit tests, or checking a claim with a web search. There is also a two-agent version, where one agent writes and another criticises.
    When it fits
    When a first draft is usually decent but not good enough, and you can say what "better" means.
    What to watch
    Every loop costs another call, and a critique with no real evidence behind it can be wrong.
  • Tool use

    The LLM gets functions it can ask to call.

    How it works
    The model writes a structured request, such as a search query or a line of code. Your code runs it and hands the result back as extra context. Typical tools are web search, running Python for exact maths, reading Wikipedia or arXiv, email and calendar, and image generation. When you have hundreds of tools, you can pick the relevant few for each step, much like retrieval does for long text.
    When it fits
    Whenever the model needs facts it does not have, or an exact result it should not guess.
    What to watch
    Tools need clear descriptions, and a model with too many tools to choose from gets confused.
DraftCritiqueRevise
Reflection as a loop: the model drafts, critiques its own draft, and revises. It can go around again.

More powerful, less predictable

  • Planning

    The LLM comes up with and carries out a multi-step plan.

    How it works
    Instead of you writing the steps, the model writes them: for example detect a pose first, then render the picture in that pose. Your software then runs the plan in order.
    When it fits
    When you cannot split the task into steps in advance. If the steps never change, you do not need a planner.
    What to watch
    Ng calls it powerful but less predictable, and less mature than reflection and tool use.
  • Multi-agent collaboration

    Several agents, each with a role, split a task between them.

    How it works
    You prompt one LLM, or several, with role instructions such as software engineer, product manager or QA. Each agent can have its own workflow and memory and can ask the others for help. Research and frameworks like AutoGen, ChatDev and MetaGPT report better results than a single agent, and a role helps because a focused subtask gets better attention.
    When it fits
    For complex jobs that split naturally into specialist parts.
    What to watch
    Quality is hard to predict, especially when agents use many tools and talk freely. Ng considers reflection and tool use more reliable.

Holding them against my Job-Match Agent

My agent from lesson 1 has six steps in a fixed order. Here is what I see when I check it against the four patterns. Only the first row is something I drew. The rest are my ideas and I have not built or tested any of them.

Holding them against my Job-Match Agent
PatternIn my agent today?My reading
Tool useYesSteps 3 and 4: web search to find job links, web fetch to read the full description.
ReflectionNoA possible addition: a second LLM call that checks each fit score against the job text, and asks whether the reasons are really in the ad.
PlanningNoThe order is fixed in code, so a planner would add unpredictability and nothing else.
Multi-agentNoOne job, six small steps. Splitting it into several role agents would cost more and I see no gain.

That fits the rule from lesson 2: stay as far left as the task allows. Reflection looks like the only pattern worth trying, and it should wait until I can measure whether the scores improve. That measuring is what lesson 5 is about.

What comes next

Lesson 4 is about task decomposition: how to get from a goal like "find me a job" to steps you can build, and which pattern each step needs.

Test yourself

Take a moment to guess each answer in your head, then open the correct answer and compare.

Question 1 of 5

What are Andrew Ng's four agentic design patterns?

Show the correct answer

Correct answer. Reflection, tool use, planning and multi-agent collaboration.

Question 2 of 5

How does reflection work, and what makes it stronger?

Show the correct answer

Correct answer. The model writes something, critiques its own output and rewrites it using that critique, and the loop can repeat. It gets stronger with external feedback, for example running code against unit tests or verifying a claim with a web search.

Question 3 of 5

What happens when an LLM uses a tool?

Show the correct answer

Correct answer. It writes a structured request, for example a search query or a line of code. Your code detects the request, runs the function and returns the result to the model as extra context.

Question 4 of 5

When do you need planning, and what is its downside?

Show the correct answer

Correct answer. When you cannot split a task into steps in advance. If the steps are always the same, a fixed workflow is enough. The downside is that planning gives less predictable results and is less mature than reflection and tool use.

Question 5 of 5

Which of the four patterns does the Job-Match Agent use today?

Show the correct answer

Correct answer. Only tool use: web search and web fetch. The order of its six steps is fixed in code, so it does not plan, and it has no reflection step or multiple agents.

Sources

Updated 21 October 2026

Update log

  • : First published.

Next in the track

Lesson 4: Task Decomposition: From a Goal to Steps

Coming soon

All lessons in this track →

Comments

No comments yet — be the first to add one.

Comments are reviewed before they appear.