Letting a model write and run code is powerful: it can do exact arithmetic, transform data and chain many steps in one program instead of dozens of tool calls. It is also risky, because the code is untrusted. It might read files, open network connections, loop forever or exhaust memory, whether by mistake or because a prompt injection told it to.
A sandbox runs that code in isolation, usually a container with no network, a read-only file system and limits on time, memory and processes. These guides show how to set up such a sandbox in Python, how code-action agents write one program in place of many tool calls, and how Program-of-Thought prompting hands calculations to code that runs safely.
The library lists all guides with filters for topic, level, category and reading time.