A4Advanced 60 minutes reading and codeLocked

The Agent Loop: Observe, Think, Act

Every agent in 2026 is a variant of the ReAct loop from 2022 — Claude Code, Cursor, Devin, Operator included. Reasoning tokens interleave with tool calls and observations until a stop condition fires. Learn this loop cold before touching any framework.

In this lesson

  1. 01Learning Objectives
  2. 02The Problem
  3. 03The Concept
  4. 04Build it
  5. 05Use it
  6. 06Exercises
  7. 07Key Terms
  8. 08Further Reading

About 1400 words of reading, with code, 7 quiz questions and the tutor.

The full lesson opens with an access code

You can see what this lesson covers and the milestone it sets. The full text, code, quizzes, the tutor and the AI reviews come with the K850 practice, along with weekly build sessions and code review.

Codes come with the K850 practice. Book a place

Milestone forAn observable back-office agent

A loop that always stops

Write the thought, action, observation loop yourself for one statement line: parse, look up candidates, decide or escalate. Bound it by steps, time and cost, and make it stop with a reason every time.

Done when

  • A hand-written loop with step, time and ZMW cost limits
  • A stop reason recorded for every run
  • Ten traced runs over real-looking lines, including at least two escalations

Stretch: Compare your loop with a framework agent on the same ten lines

Reviews open with an access code.

Interview practice

Questions on this topic that AI engineering interviews ask, with the companies reported to ask them. Answer the way you would out loud; Jev scores it and DeepSeek tells you what to add.

Scoring opens with an access code. You can still read the questions and prepare.

Adapted from open-source work: AI Engineering from Scratch by Rohit Ghumare (MIT, lesson text, code and quizzes); Awesome LLM Apps by Shubham Saboo (Apache-2.0, starter code); AI Engineering Interview Questions by Outcome School (Apache-2.0, interview questions). Capstones, milestones, data packs and Zambian context by Zambrite.

Chat on WhatsApp