Martin Keen maps four agent loops in this nine-minute IBM Technology explainer, using library upgrades as a running example.

The shared cycle

  • A goal leads to an action, an observation of the result, and an adjustment before the next action.
  • Autonomy depends on who supplies the goal, starts the run, decides it has finished and reviews the output.

1. Interactive: a person judges each turn

  • A human gives the prompt, inspects the result and decides whether to ask for another iteration.
  • “Upgrade library X” can finish when the person accepts the change.
  • Fuzzy tasks suit this arrangement because a person can judge an evolving finish line.
  • Repetitive work creates a review bottleneck.

2. Delegated: specify the stopping condition

  • A human supplies both the goal and a completion rule: upgrade outdated libraries and stop when the build turns green.
  • An AI check decides whether to continue the loop or hand back the completed work.
  • The human reviews the final result after the agent finishes its iterations.

3. Scheduled: a clock starts recurring work

  • Write the goal once and run it nightly, retaining the completion check and human review.
  • This suits work that becomes stale over time, such as dependencies that need regular upgrades.
  • The human still adjusts or cancels the schedule when its results stop being useful.

4. Event-driven: review by exception

  • An event, such as a newly opened pull request, starts a run tailored to that event.
  • A separate reviewer agent checks the output with fresh context, potentially using a different model.
  • Approval ends the run; requested changes restart it; uncertainty escalates to a human.
  • Human review shifts to exceptions in Keen’s most autonomous example.

Caveat: these are teaching patterns. An event trigger alone says nothing about whether human approval is required, and a green build checks only part of correctness.

“Who sets the goal? And who decides when the loop’s done?” — Martin Keen, 1:10