Learn AI. Do. Grow.
← All modules

Deep dive · module 86 of 100

Agent architectures (ReAct, plan-and-execute)

Understand two commonly used ways agents approach tasks.

After this lesson

You can explain the difference between ReAct and plan-and-execute.

In view · Side by side

Two ways to order steps

  1. Choose an action, view the outcome, and determine the next step based on that.

  2. First create a plan and then execute the planned steps.

  3. Monitor boundaries and adjust when the situation deviates.

Remember: The appropriate approach depends on the task and the uncertainty along the way. Open het volledige schema ↗

ReAct

The agent thinks, acts, observes the result, and thinks again. Step by step.

Plan-and-execute

The agent first creates a plan and then executes it.

When to use which?

ReAct is more flexible in unexpected situations. Plan-and-execute is clearer for known tasks.

New practice example

From explanation to a usable result.

A fixed schedule and an agent that chooses new steps while working require different checks.

Fictional practice situation

A fictitious task is to summarise an approved document and create a draft email. Another task must first determine which of three permitted documents is relevant.

View a possible solution

This is how it can be done

For the first task, a fixed chain with a check before sending suffices. For the second, a limited search step can help. Also ensure only permitted sources are chosen there and stop as soon as the source is missing or the action falls outside the scope.

Why this works

More autonomy is not an improvement in itself. You must be able to explain why an extra choice option helps the task.

Make it slightly more difficult

Describe the two workflows in words and mark exactly where source selection, human control, and a stop condition are located.

Extra practice, at your own pace. You do not need to submit anything. This does not count towards an automatic assessment.

Your workplace · learning by doing

Make something. See what changes.

Ende, your light pink practice buddy

The fictitious source is included. Only when selecting ‘Let Ende answer’ do you send your assignment to the AI service. Do not use private data.

Checking the AI connection… You can already view the written example.

Your result

No answer yet

Present your assignment to Ende.
Read the answer, change one thing, and compare.

You remain in control

What do you want to improve in your next attempt?

My own check

On this device only. AI answers remain only in this page memory. This is self-review, not a grade.

Why this approach works

More autonomy is not an improvement in itself. You must be able to explain why an extra choice option helps the task.

A step further

Describe the two workflows in words and mark exactly where source selection, human control, and a stop condition are located.

A prompt to get you started

Briefly explain the difference between a ReAct agent and a plan-and-execute agent.

Apply it

A research agent only knows which follow-up question is meaningful after opening a source.

After the source, a new question follows. Illustration for the question.

Which approach best fits this situation?

  • Always enforce an immutable plan, even if a source contradicts it.
  • Give the agent unlimited attempts and access.
  • Let follow-up steps depend on observations, with fixed boundaries and stop criteria.

With JavaScript, you can check your approach and receive immediate feedback.

Test your insight

An agent and its next step. Illustration for the question.

What is a characteristic of ReAct?

  • The agent alternates between thinking and acting based on intermediate results.
  • The agent always creates a complete plan first.
  • It is only for simple tasks.
Extra practice

Choose a task and indicate which architecture would fit better, with a short reason.

A research agent that needs to find sources: ReAct, because the next step depends on what is found.

A question? I'll help you on your way.

Drag Aldo to move it. Use the arrow keys on Aldo with the keyboard, Enter to save the position and Escape to cancel.