Learn AI. Do. Grow.
← All modules

Deep dive · module 74 of 100

Multi-step agents with memory

Understand how an agent can take multiple steps and remembers intermediate results.

After this lesson

You can describe a simple multi-step agent with memory and stop points.

In view · An improvement loop

Multiple steps with working memory

  1. Define which result is needed and when the agent must stop.

  2. Save relevant outcomes so that the next step can build upon them.

  3. Assess progress and risky steps before the system proceeds.

Remember: An erroneous intermediate result must not unnoticedly guide the rest of the task. Open het volledige schema ↗

What is memory in an agent?

The agent remembers intermediate results and decisions within the task.

Multi-step

The agent executes steps, uses the result of the previous step, and continues.

Stop points

Build in moments where a human can check or adjust.

New practice example

From explanation to a usable result.

An agent with multiple steps must know which information is confirmed, proposed, or still unknown.

Fictional practice situation

A fictitious agent searches for a room, creates an invitation, and then wants to send it. The room has been requested, but there is no confirmation yet.

View a possible solution

This is how it can be done

Store the room status as requested and the invitation as a draft. The sending step remains blocked until a human has confirmed the room and the final text. Assign each step its own task number and outcome.

Why this works

Memory can also preserve an old error. An explicit status prevents a proposal from being used as a fait accompli later.

Make it slightly more difficult

Add a restart between request and confirmation. Which data must persist to continue working safely?

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

Memory can also preserve an old error. An explicit status prevents a proposal from being used as a fait accompli later.

A step further

Add a restart between request and confirmation. Which data must persist to continue working safely?

Try & discover · no obligation

Control an agent with a control port

Try to send before the check. Then also test a missing source or a malfunction.

Test the fictitious workflow

Choosing a different situation starts a new test and clears the previous approval.

The agent is waiting. You choose which step to test.
  1. Retrieve source
  2. Check draft
  3. Execute action
Starttoestand
Noapproval for this concept

What is happening?

  1. No source has been retrieved yet. Feel free to try the submit button first.

All tools, queues and submissions have been simulated. No message is sent and no external service is called.

This trial works locally with fictitious data and does not count towards your lesson completion. It starts anew with a new lesson or reload.

A prompt to get you started

Describe a multi-step agent that handles a customer query: summarising, creating a draft response, checking for promises, and stopping for approval.

Apply it

An agent restarts after an interruption. A previous step has already created a draft ticket.

Which approach best fits this situation?

  • Create another identical ticket without checking.
  • Clear the history and perform all external actions again.
  • Recover the step status and check if the action has already been performed.

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

Test your insight

What makes a multi-step agent manageable?

  • As many steps as possible without control.
  • Clear stop points for human control.
  • That the agent works completely independently.
Extra practice

Outline a multi-step agent for one of your tasks, with at least one stop point.

Agent: summarise document → mark outstanding questions → create draft email → stop for review.

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.