Awesome Testing

Agent lesson 01 · The controlled loop

What makes an LLM response become an agent run?

Shared teaching scenario · fictional product data

Research three laptops under €900, verify current evidence, and write laptop-comparison.md. Do not purchase anything or contact a vendor.

Prior knowledge
Basic LLM and API concepts help. You do not need experience with an agent framework.
Study time
2–3 hours guided · about 7 hours of optional deep dives
By the end
Design and review an agent loop with bounded tools, durable state, observable actions, recovery paths, and evaluation.

01 · Smallest useful mechanism

An agent is a controlled loop, not a more intelligent chat response.

A useful agent alternates between model calls and an application-controlled runtime. The runtime packages the goal and current evidence, asks the model for a response, validates any requested tool call, executes only allowed effects, and appends the result to the next turn. Critical gates can be deterministic even though tools, networks, policy services, and scheduling may not be. The loop stops on a verified answer, an explicit failure, a budget boundary, or a human decision.

The model proposes the next move; the harness owns state, mediates permitted actions, records observations, and applies continuation and stopping rules.

02 · Experiment

Test the prediction

Deterministic browser simulation

The controlled loop experiment uses inspectable, repeatable teaching data. It does not claim to be a live agent trajectory.

Loading the experiment…

03 · Production-minded practice

Prove the mechanism under failure

Use your own stack or a contained mock environment. Do not point failure drills at real accounts, people, or irreversible services.

  1. Build

    Draw a trace with separate events for proposal, policy decision, tool start, observation, verification, and terminal state.

  2. Break it on purpose

    Make one product read time out after the request is sent. Mark the outcome unknown, apply the retry policy, and choose a safe next step.

  3. Evidence of completion

    A reviewer can tell what happened, whether an effect may have occurred, why the loop continued, and which check allowed it to stop.

Your learning artifact

Write the argument you would defend

Stored only in this browser. No account required; course reset does not delete it.

04 · Check your understanding

Who should decide whether a proposed tool call actually executes?

Optional referenceDeep dive / reference chapterOpen the complete essay, diagrams, mathematics, exercises, glossary, and sources when you want more depth.

Next: Once one loop is visible, we can safely ask when parts of the work should be delegated to bounded workers.