A sandbox is an environment for running a program separately from other systems, with limits on access to files, networks, or other resources. In AI, it can be used for an agent’s tool use or the execution of generated code. A virtual machine is one technology for creating an independent computing environment; a sandbox describes the isolated execution environment rather than a specific technology.
In everyday use, a sandbox is also a box of sand for children to play in.