CourseAgentic AI Engineer: The Complete Course · Module 10: Environments and Execution · part 58 of 97
Part 58 · Module 10: Environments and Execution

Lab: A sandbox, a courier check and dry runs

45 min read·13 Oct 2026
Module 10 · Lab · About 80 minutes · Needs: the Module 3 lab's tools.py, and lessons 1, 2 and 3 (run_limited, summarise and code mode; the guarded browser and check_courier_tracking; dry_run, review and apply)

What you are building

RETURNS-DESK/ AFTER THIS LAB sandbox.py run_python courier.py courier check dry_run.py plan, review, apply tools.py Module 3's, imported BrightCartSystems model 6 tests
The finished piece: three new files of your code (blue) that all go through Module 3's tools.py (grey, kept as it was) to the simulated systems, with six tests (green) pinning the walls.

This lab moves the three lessons' code into the returns-desk/ repository as three files that import Module 3's tools.py and never replace it. returns_desk/sandbox.py runs model-written Python inside walls and lets scripts call the read tools. returns_desk/courier.py gives R-1005 its courier check. returns_desk/dry_run.py runs the agent against a copy, turns its writes into a plan, and applies only a plan Priya approved. Tests pin every wall. Everything at BrightCart is simulated.

One warning first: a subprocess with limits is not a sandbox. It runs as you, on your kernel, and can read any file you can. The Python shows how each wall behaves; Docker gives real walls, and step 3 gives the exact command.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.