$10K cash or $15K in credits. Enter by 15 Dec →

What is an AI sandbox?

First published

Reviewed by Matt Swulinski, Head of Growth at Viktor on

The short answer

An AI sandbox is a place to run software used by an AI system with limits that keep the work apart from the rest of a computer. Those limits can control which files the software can read or change and where it can connect. For a business, a sandbox helps contain harm from faulty or untrusted code while useful work runs.

What happens when software runs inside a sandbox?

A sales lead asks for a cleaned spreadsheet of open deals. The AI system writes a short program to group rows that refer to the same deal and produce a new file. That program needs a place to run.

A sandbox supplies that place with limits on its reach. A language model is software that writes text, including code, while other software runs the program. Those are distinct steps. A model's promise to leave other files alone doesn't enforce a limit.

The surrounding system sets up the space and chooses what the program can reach. The operating system can enforce file and network rules, including rules for other programs that a command starts. An operating system, or OS, is the software that manages running programs and access to computing resources.

A file-processing task can proceed like this:

  1. The system prepares a space with the software needed for the task. The setup defines which folders it can access and where it can connect.
  2. The system places the chosen input files inside or grants access to chosen files outside. A folder can allow reading without allowing changes.
  3. The program runs against those inputs. Enforced rules limit its reach when a command tries to access a file outside the allowed area.
  4. The program produces results, such as a revised spreadsheet or an error. The surrounding system can collect files to send back.
  5. The space stops running or stays active under its service's rules. Files that need to survive must be saved where those rules keep them.

The final step varies. Some services discard their stored data when the space expires. A saved output file and a running program are different things, so ask about each.

Which limits apply beyond the working folder?

A program can cause trouble without changing files outside its folder. If it can read a private file and connect freely to the internet, it could send the contents away.

File isolation and network isolation work together. Isolation means keeping work apart by enforcing limits on its reach. File rules limit what a process can read or change. A process is a running program, including a script the AI system has asked software to run.

Network rules limit where a process can connect. File rules can also differ for reading and writing. A task that only needs to inspect a source spreadsheet doesn't need the right to change it. Read-only access keeps the source intact while allowing a new output.

Resource limits address a different failure. A faulty program can keep running or use too much memory. Control groups are an OS tool for tracking and limiting resource use, such as how much memory a process uses.

Resource limits don't decide whether a client file is private. File access rules don't decide how much memory a task can use. Ask which risks the limits cover instead of treating the word sandbox as a full account of its rules.

Is every sandbox a separate computer?

A sandbox doesn't have to be its own physical computer. Different designs enforce the limits in different ways.

A container runs software in its own space on a host. The host is the computer that supports the space. Container tools use OS controls to keep running programs apart and limit what they can see and do.

A virtual machine presents a virtual computer running its own OS kernel. The kernel is the core that manages access to computing resources.

Another design intercepts system requests. A system request is a program asking the OS for a service, such as access to a file. A software layer handles those requests instead of passing them straight to the host's kernel. The program can't directly control which host requests that layer makes on its behalf.

These approaches have trade-offs in which programs can run and how much resource they use. The design's name doesn't tell you which files or network sites a service allows. A virtual machine can still expose a shared host folder if its setup allows that.

A security review needs more than the design's name. Distinct spaces don't always mean distinct physical machines, and sharing hardware doesn't prove that people can read each other's files.

What doesn't the boundary protect against?

A program allowed to change an important file can change it in the wrong way. Access limits don't judge whether every allowed change is sound.

The same applies to connected services. If a space can send requests to a business app, an allowed connection can still carry the wrong request. Rules for approving high-impact actions answer a different question from where the code runs.

Setup can weaken the limits. Container docs warn that mounts and granted privileges can leave isolation incomplete. A mount makes a folder or storage location accessible inside the space. Broad access through that opening can undo the file limits a reader expected.

No sandbox label proves that an answer is true, that a file holds no private data or that an outside service has the same controls. Keep those questions in a review of the whole task.

What would a sandbox do during a spreadsheet cleanup?

In a made-up example, a sales lead supplies an export of open deals for cleanup. The task is to find entries for the same deal and write a revised spreadsheet.

The space gets a read-only copy of the export and a new folder for results. The cleaning program reads the export, compares rows and writes a new file. No link to the live sales system is needed for that version of the task.

If the program groups unrelated deals together, the revised file is still wrong. The sandbox hasn't checked the matching rule. Keeping the source read-only leaves a way to compare the output and rerun the work.

Changing the request to update live deal records calls for new access. Now the system needs access to the sales app, and someone needs to decide which changes it can make. That decision doesn't follow from the right to clean an exported file.

How does Viktor keep personal files apart?

Viktor works in a sandbox. Inside it, each person has their own isolated space. Files he creates for one person stay separate from other people on the team.

The Data and privacy documentation describes that separation. The public description doesn't specify the isolation technology or network rules, so those details aren't established here.

Security overview

Common questions

Does a sandbox have to block the internet?

No, sandboxed software can have network access. The allowed sites depend on the setup. File limits alone don't prove that outbound connections are blocked, so a security review needs the network policy as well as the file policy.

Are sandbox files always temporary?

No, the service and its storage rules decide whether files survive. Some spaces discard data when they close or expire. A task can also save its output outside the running space. Ask where final files are stored and what happens when the space stops.

Can sandboxed code still produce a wrong result?

Yes, a program can calculate incorrectly or misread an input while staying within every access rule. Sandboxing limits what the program can reach. Testing the result and deciding whether to approve an outside change require their own checks.

Get Started for Free