Start with a question you can check: did anything actually happen? Separate model responses from program actions, then use JavaScript to turn a small goal into a working rule. No coding background is assumed.
What is an agent, and what does the code actually do?
YOUR FIRST STEP
A model is one part of the system
Distinguish generated text, a fixed workflow, and a tool-using decision loop.
What you’ll buildThe skills these four lessons connect
A room-selection function that checks availability, capacity, and budget, with an explicit no-match result.
Explain what a model, controller, and tool each do.
Read input objects and write functions, conditions, and bounded loops.
Define success before selecting or ranking an answer.
Before you startHelpful background and how the code works
No coding or AI background required.
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
In the final lesson, make a room cost exactly the budget, then one cent more. Predict and run both inputs using the same code.
Show why the exact-budget room qualifies and the more expensive room does not.
Explain why returning null can satisfy the task.
Name one part of this task that ordinary code can solve without a model.
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.
Anthropic · 19 December 2024
Building effective agents
Distinguish fixed workflows from model-directed actions; start simply, use tool observations as feedback, and set stopping conditions.
The article notes that its tooling landscape has changed. Its patterns do not establish that a more autonomous or complex system is better for every task.
MDN Web Docs · Updated 7 November 2025
JavaScript Guide
Functions, objects, conditions, loops, and asynchronous code provide the programming foundations for an agent controller.
Ordinary JavaScript rules do not imply that a language model is running. An execution environment may support only part of the language or its host APIs.
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.