In plain words
A sandbox is a controlled space for running software. In AI applications, it can let an agent execute code or use tools while restricting access to files, networks, and other resources.
A closer look
The surrounding software enforces the boundaries. For example, a sandbox may allow edits only within a project folder and connections only to approved websites. Asking a model to be careful in a prompt does not create this isolation.
Sandboxing can reduce the impact of mistakes or prompt injection and let an agent work more independently within defined limits. Its protection depends on which operations are covered and how tightly access is restricted.
In practice
You ask an AI coding assistant to test a website change. In a sandbox configured for that task, it can edit a copy of the project and run tests, but cannot read your private documents or connect to unapproved servers.
A useful distinction
A sandbox does not guarantee correct results or eliminate every risk. Files and services allowed inside its boundaries can still be affected. A test folder alone is not a security boundary unless software enforces the restrictions.