← AI glossary

AI glossary · Basic · AI security · Agents

Sandbox

A sandbox is a separate execution environment that keeps a program or AI agent moving only within a set boundary. Whatever it does inside, it cannot freely touch important files or systems outside.

About this term
Level
Basic · Technical terms you often meet in AI news
Added
2026-10-08
In plain words It is like a child who can dig and build all they want in a sandbox without messing up the living room. But just as sand can spill through gaps in the fence, a real sandbox can have gaps if it is set up carelessly.

How it works

A sandbox defines in advance which folders a program can see, which networks it can connect to, and which commands it can run. If the program tries to go beyond this scope, the operating system or execution tool blocks it or asks a human for permission. Some sandboxes use a fully separate computing environment such as a container or virtual machine, while others set up a lightweight boundary using only the operating system's permission features. When the work is done, the whole sandbox can be deleted so no traces remain.

How a command runs inside a sandboxAI agent → Command/code execution request; Command/code execution request → Permission check; Permission check → Execution result(In scope); Allowed scope → Permission check; Permission check → Block or request approval(Out of scope)AI agentCommand/codeexecution requestPermission checkFolders, network,commandsExecution resultAllowed scopePredefined rulesBlock or requestapprovalIn scopeOut of scope
How a command runs inside a sandbox A command issued by the agent is first checked against the allowed scope. If it is within scope, it runs; if it is outside, it is blocked or a human is asked for permission.

Why it matters

Today's AI agents do more than write text: they run code, edit files and access the internet directly. If an AI makes a mistake or is fooled by prompt injection (an attack that sneaks in malicious instructions), it could delete important files or send information such as passwords outside. A sandbox ensures that even if this happens, the damage stays inside the boundary. That lets people hand more work to agents without checking every step themselves.

Things to know

Having a sandbox does not make things completely safe. If the allowed scope is too broad, the boundary is pointless; if it is too narrow, the agent cannot do much. So sandboxes are usually combined with other measures, such as requiring human approval for risky actions (human-in-the-loop) and guardrails.

Example

Sandboxes are especially important for coding agents, because they run commands directly on the user's computer. As in the news covered on this site, 'GitHub, Copilot 로컬 샌드박싱 정식 출시,' developer tool companies are adding sandbox features so that AI coding assistants operate only within a set scope, even on a developer's own PC.

Where it came up on this site

Related terms