Agents and AutomationLesson 13 of 72

Module 2 · The machinery: transcript, tools, loop

The instruction block that has to survive forty turns

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 4 of 11 in this chapter

This chapter’s goalTrace any agent run from its message list (tool definitions going in, tool results coming back) and explain from the transcript alone why the model chose each step.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

Why agent prompts are a different craft

In a chat, the system prompt sits close to the only user message and its influence is obvious. In an agent it sits at the top of a transcript that grows by a tool result every few seconds. It is re-sent on every call (it does not fall out of the window, it is the last thing anyone drops) but by turn eighteen it is one paragraph among forty thousand tokens of recent, vivid, specific evidence about the task at hand.

This is the mechanism behind the most common complaint in agent development: it followed the rule at the start and stopped following it later. Nothing was forgotten. The rule was outvoted.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Context Engineering exam.

Stuck on something?Ask Mai, your AI tutor

How to cite: Addaly (2026) ‘The instruction block that has to survive forty turns’, in Agents and Automation. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/agents-and-automation/system-prompts-for-agents (Accessed: 29 November 2026).