← Table of Contents · Page 666 of 868

PROJECT ONE - A MINIMAL HARNESS

Part 4 of 11

RUNNING AND OBSERVING YOUR FIRST AGENT Open the terminal in your project folder and run the two commands below. The first creates the data and the second starts the agent. [START OF BASH CODE] # Run the script that writes the fictional job posting and resumes to disk python make_sample_data.py # Run the main think/act/observe loop, which reviews every resume in turn python main_loop.py [END OF BASH CODE] You should see five lines like the following, one per resume. Your token numbers may differ slightly, and that is fine. [START OF PYTHON CODE] # Example printed outcome for the first resume: finished in 4 steps, using about 570 tokens {'resume': 'resume_01.txt', 'status': 'done', 'steps': 4, 'tokens': 570} # Example printed outcome for the second resume: finished in 4 steps, using about 552 tokens {'resume': 'resume_02.txt', 'status': 'done', 'steps': 4, 'tokens': 552} # The remaining resumes print similar outcome lines, one per resume ... [END OF PYTHON CODE] Now open the reports folder. You will find one file per resume, and the report for resume_01.txt reads like this. Jordan Sampleperson matches 4 of 4 required skills (Python, SQL, Airflow, Docker). Missing: none. Match level: strong. Next open logs/run_log.jsonl. Each line is one event, and together they tell the whole story: a model reply asking to read the file, a tool result, a reply asking to search the posting, and so on. Four steps per resume means three tool calls and one final reply. You have just watched a complete agent run, and you can reconstruct exactly what happened from the log alone, which is the test of a good log.
Advertisement
Read Aloud:
0:00 / 0:00