Enrollments Closing Soon for the Agentic AI Program.

Book A Free Session with the Mentor Now
Skip to content

SHORT COURSE 2 OF 6 · BEGINNER · 4 GUIDED LESSONS

Build the agent's control loop.

A tool request is a proposal. Build the code that validates it, executes an allowed operation, retains the observation, and stops. Then decide which information belongs in temporary state and which may be kept.

How does a decision become an observable action?

YOUR FIRST STEP

A tool needs a clear contract

Define a tool's purpose, argument schema, returned fields, and permitted effects.

Start this course
0 / 4 lessons complete
Checking your saved progress…

Your four lessons

  1. 1Your next small stepA tool needs a clear contractDefine a tool's purpose, argument schema, returned fields, and permitted effects.
  2. 2Watch · try · explainDecide → act → observeDispatch an allowed tool request, feed its result back, and finish within a turn limit.
  3. 3Watch · try · explainWhat should the agent remember?Separate current task state, an interaction's history, and deliberately retained memory.
  4. 4Watch · try · explainReturn something another program can useParse and validate a result, preserve its evidence fields, and handle an error without inventing success.
What you’ll buildThe skills these four lessons connect

A bounded controller and a result validator that distinguish missing data, unsupported answers, and failed reads.

  • Reject invalid tool arguments before execution.
  • Use an observation to change the next controller turn.
  • Separate data shape, supporting evidence, and memory lifetime.
Before you startHelpful background and how the code works

Use functions, objects, conditions, and explicit success checks from phase 1.

Watch a short video, try the code, then explain what happened. You can pause, turn on captions, or read the lesson instead.

Your JavaScript and local tools really run. Model choices and classroom records are prepared examples, so no API key is needed for these browser labs. The optional SDK project runs separately on your computer with its own setup.

Your course checkpointAfter the four lessons, connect what you learned

Run the loop with a one-turn allowance, then inspect a well-shaped result that names a room absent from the catalog.

  • Explain why one completed read may still leave the loop unfinished.
  • Point to the observation that prevents a repeated read.
  • Show that passing a shape check does not establish factual support.

Use your experiment inputs and lab notebooks as evidence. This is a self-review: only lesson questions and checked code cases count toward your progress.

Research into practiceThe ideas behind this short course

Original teaching informed by primary research and official engineering guidance. Our exercises isolate mechanisms so you can test them; they do not reproduce a research system or its reported performance.

Yao et al. · ICLR · 2022 preprint · ICLR 2023

ReAct: Synergizing Reasoning and Acting in Language Models

Interleave model-generated reasoning and actions with observations from tools or an environment.

A classroom action trace is not private model reasoning. A deterministic teaching loop does not reproduce the paper's models, experiments, or results.

Anthropic · 11 September 2025

Writing effective tools for agents — with agents

Design distinct tools with clear parameters, relevant returned information, and evaluations of how the agent actually uses them.

A description or schema does not guarantee the right action. A live tool can return different data for the same arguments as its environment changes.

Google · Agent Development Kit · Reviewed 13 September 2026 · undated documentation

Conversational Context: Session, State, and Memory

Separate the current interaction's events and state from searchable information that can span sessions. Choose services according to the required storage lifetime.

In-memory stores lose data on restart. Stored or retrieved information is not automatically true, relevant, persistent, or safe to share between users.

Meta research team · 31 July 2024 · revised 23 November 2024

The Llama 3 Herd of Models

Tool definitions and descriptions guide proposed calls; executed results return to model context. The report covers sequential, nested, and parallel function calls.

This historical model-training report is not a current SDK contract. Generating a call does not execute or authorize it, and benchmark results do not describe classroom performance.

Want to build with an instructor?Explore the workshop and longer program

Your JavaScript really runs. The model decisions and school data are authored simulations, so you can learn without an API key. Every workspace also includes a separate real SDK example to explore next. Passing the lab’s cases is practice, not proof that an agent is ready for real-world use.