PTENES
Skip to content
TRACK 1

🧭 Fundamentals: what an agent loop is

Everyone draws an "agent loop" differently. This track shows the skeleton underneath all of them— reason → act → observe — the 6 elements every source agrees on, and the map of the 11 schools that confuse beginners. Each term is explained as it comes up.

Four diagrams of the same loop, viewed from different angles OBJECTIVE + what counts as "done" reason · think act · take action observe · see
3
Modules
19
Topics
~2h
Duration
Baseline
Level
Track progress: 0% 0 of 19

Track map

Detailed content

1.1~40 min

🧭 The skeleton: reason → act → observe

Under every complicated design, the loop is always the same three steps repeated until “done.”

What it is:

An AI that reasons about what to do, acts, and observes the result — repeating until the goal is achieved.

Why learn:

It's the foundation for everything; without it, “swarms” and “fleets” are just jargon.

Key concepts:

LLM, tool, iteration, objective.

What it is:

Think→Act→See, "model uses tools," "runs on its own," and "one boss, several helpers"—all the same idea.

Why learn:

You stop thinking they’re different things and see the single underlying structure.

Key concepts:

Same blueprint, four disguises.

What it is:

The step where the agent reads its own result instead of assuming it worked.

Why learn:

It's what makes the loop converge; without observing, it confidently delivers garbage.

Key concepts:

Observe = ground truth; the basis for checking "done?".

What it is:

An intern you don't micromanage: you give them the goal, they figure out the next step, and check their own work.

Why learn:

Helps calibrate what to delegate and what to verify.

Key concepts:

Objective given, steps discovered, self-correction.

What it is:

A single prompt = one response and done; a loop = many iterations until you verify it’s finished.

Why learn:

Most tasks are a single prompt; use a loop when there’s verification and iteration.

Key concepts:

One-shot × iterative; the cost of each.

What it is:

Each cycle is one step; the loop keeps running until the "ready?" check passes or a safety limit stops it.

Why learn:

Gives you the mental model that works for any agent tool.

Key concepts:

Turn = step; guardrail; course baseline glossary.

View Full
1.2~40 min

🧩 The invariant core: 6 elements

Remove the disagreements and what remains is this: the 6 pieces you connect to build any loop.

What it is:

An LLM at the center decides what to do on each turn. You don’t program the steps; the model chooses.

Why learn:

Remove the model and there is no loop, just a script.

Key concepts:

The model drives every iteration.

What it is:

The actions the model can take: read/write files, run commands and tests, search, call an API.

Why learn:

Without tools, the model only talks; it doesn't act. The craft is in the tools.

Key concepts:

Tool-calling; clear description of the actions.

What it is:

The result of each action returns to the context, so the next iteration is better informed than the previous one.

Why learn:

For long tasks, write the state to disk (a progress file + commits) so you can pick up between sessions.

Key concepts:

Context, context window, externalized state.

What it is:

A clear goal, written so the model knows when it's finished. "All tests pass" is a goal; "improve the code" isn't.

Why learn:

It's one of the few elements every source agrees is essential.

Key concepts:

Verifiable objective × vague objective.

What it is:

Before continuing, the agent checks its own work against the objective: runs the tests, rereads the requirement, confirms the file changed.

Why learn:

Anthropic calls "check your work" "the most underrated step." It's what separates a loop that converges from one that produces confidently wrong output.

Key concepts:

gather → act → verify → repeat.

What it is:

Something that ends the loop: the completed objective (tests pass) + a hard limit (maximum number of iterations).

Why learn:

The sources disagree here—that’s exactly why you need to define one deliberately. Don’t assume the model will stop on its own.

Key concepts:

max_turns; the objective is invariant, stopping isn't.

View Full
1.3~50 min

🗺️ The map of the field: 11 schools

There's no single definition of an "agent loop." Here's the map of the 11 in circulation—and where they disagree.

What it is:

Auditing 45 verified sources reveals 11 distinct mental models of the “loop”—your instinct that it was confusing was right.

Why learn:

Knowing they disagree immunizes you against "so-and-so said it, so it must be true."

Key concepts:

Minimum convergence × fractures at the edges.

What it is:

"An LLM using tools in a loop until the task is done" (Willison, Anthropic, LangChain). The loop is trivial; the craft is in the tools.

Why learn:

It's the baseline definition. But today it's also the “punching bag” practitioners attack for being too minimal.

Key concepts:

Agent = loop, in one sentence.

What it is:

Each cycle = think → act → observe, repeat. The only school that names an internal cognition cycle.

Why learn:

It's the vocabulary you'll encounter most often in documentation and papers.

Key concepts:

ReAct, “thought” (thinking without observation).

What it is:

Self-verification (the same agent checks) × separate evaluator (a second agent scores it until PASS).

Why learn:

It's the root of the maker→checker pattern you use in Track 2.

Key concepts:

Evaluator-optimizer; the generator never approves its own work.

What it is:

A Runner/orchestrator owns the loop (OpenAI/Google/Bedrock, with max_turns) × an autonomous loop that prompts itself and runs unsupervised (AutoGPT).

Why learn:

Shows that a “loop” can be a runtime object OR a scheduled system.

Key concepts:

Runner, max_turns, auto-prompt.

What it is:

“Design the loop, not the prompt”; memory loop between attempts (Reflexion); “loop isn’t the right primitive” (swyx); and the terminology trap: “loop” = human-in-the-loop.

Why learn:

Avoid copying an HITL guide when you think it’s a build standard.

Key concepts:

HITL = human supervision, not agent cognition.

What it is:

Who owns it, what ends the loop, whether “verify” is part of it, the scope of an iteration, whether tools are essential, and whether “loop” is the right primitive.

Why learn:

Knowing the axes lets you read any definition and see where it falls.

Key concepts:

6 axes; the invariant core underneath.

View Full
← Home Track 2: When to use a loop →