import{c as t,Q as a,j as i,m as s}from"./chunks/framework.BPKcPtvA.js";const u=JSON.parse('{"title":"L1: Your First Agent","description":"","frontmatter":{},"headers":[],"relativePath":"labs/l1-first-agent.md","filePath":"labs/l1-first-agent.md","lastUpdated":1780488246000}'),o={name:"labs/l1-first-agent.md"};function l(n,e,r,h,c,p){return a(),i("div",null,[...e[0]||(e[0]=[s(`
Build a single-tool agent from scratch.
Module: M1 Foundations
Est. Time: 60 min
Files: starter.py, solution.py
Create an agent that reads a file and answers questions about its contents.
reasoning parametercd course/labs/L1-first-agent/
python starter.py test.txt "What is this file about?"The starter has TODO markers where you fill in:
read_file tool schemaexecute_tool functionrun_agent looppython solution.py test.txt "What is this file about?"Compare your implementation against the solution. Key differences to check:
MAX_ITERATIONS?reasoning?end_turn?