# What is a sandbox environment?

> A sandbox environment is an isolated copy where changes, code or AI agents run without touching real data or the live site. Kosuke and Guardian examples.

Source: https://learn.ynteractive.com/content/glossary/sandbox-environment · Updated 2026-10-19 · Free from Stepthrough (https://learn.ynteractive.com)

[AI agents](https://learn.ynteractive.com/content/glossary#topic-ai-agents) · [AI glossary](https://learn.ynteractive.com/content/glossary)

Quick answer

A sandbox environment is an isolated copy of a system where code, changes or AI agents can run without touching real data, real customers or the live site. Whatever happens inside stays inside, so you can test freely and throw the copy away afterwards.

Last updated October 19, 2026

[Take the free module →](https://learn.ynteractive.com/courses/ai-apps-worth-knowing/21)Module 21 of the free [AI Apps Worth Knowing](https://learn.ynteractive.com/courses/ai-apps-worth-knowing) course, about 15 minutes. No account needed.

Updated October 19, 2026 · By [Robert Breen](https://learn.ynteractive.com/content/about)

## Why it matters for a small business

Testing on the real thing is how small firms end up emailing a client a test invoice or breaking the live booking page for a weekend. A sandbox gives you a place to try the risky part first: run an AI agent's change, send a test request, click every button. Mistakes cost minutes there instead of a client apology.

Sandboxes matter more as agents get more freedom. An AI coding agent that installs software and runs commands should do so somewhere it cannot reach production. A sandbox puts that boundary in the infrastructure, which is safer than relying on the agent's instructions. Inside it, [guardrails](https://learn.ynteractive.com/content/glossary/guardrails) can be looser, because the stakes are low.

## Two sandboxes in two lessons

| Where | What runs inside | What stays untouched |
| --- | --- | --- |
| Kosuke session | The client's site with the agent's change | The live website |
| Guardian policy tester | Your rules against a sample payload | No intent created, nothing logged |

## In a real lesson: Preview Every Website Change Before Your Client Sees It using Kosuke

In [the Kosuke lesson](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees), the first job after importing Calder & Finch's site from GitHub is **Deploy**. The deploy agent works out how to run the site and starts it in a sandbox, once per project. Each later session runs your coding agent in its own cloud sandbox, and that running copy is what you see in the [preview deployment](https://learn.ynteractive.com/content/glossary/preview-deployment).

Sandboxes cost compute, so the lesson notes that a new Kosuke workspace starts on a free Trial with $10 of sandbox credit, while model use runs on your own Claude or OpenAI account.

[The Guardian approval lesson](https://learn.ynteractive.com/content/guardian-n8n-ai-agent-approval-before-sending-email) uses the word for something smaller: the policy tester. Running a team email through **Test This Policy** returns ALLOW, and the note underneath says it was a sandbox test, so no intent was created and nothing was logged. You can try a rule as often as you like before it guards a real send.

[Try this lesson free](https://learn.ynteractive.com/modules/kosuke-preview-changes) or [read the step-by-step guide](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees).

## Common confusions

### Sandbox vs Test Mode

[Test Mode](https://learn.ynteractive.com/content/glossary/chatbot-test-mode) in a chatbot builder is a practice chat with your bot. A sandbox is broader: a whole isolated environment where code or agents run.

### Sandbox vs preview

The sandbox is where the change runs. The preview is the link you open to look at it.

## Tips

- Use made-up [test data](https://learn.ynteractive.com/content/glossary/test-data) in a sandbox, never real client records.
- Check what a sandbox costs per hour or per credit before leaving one running.
- Test the action that should fail, not only the one that should pass.

## Related terms

[Preview deployment](https://learn.ynteractive.com/content/glossary/preview-deployment) · [Git branch](https://learn.ynteractive.com/content/glossary/git-branch) · [Test data](https://learn.ynteractive.com/content/glossary/test-data) · [Test Mode](https://learn.ynteractive.com/content/glossary/chatbot-test-mode) · [Guardrails](https://learn.ynteractive.com/content/glossary/guardrails) · [Policy engine](https://learn.ynteractive.com/content/glossary/policy-engine)

## More AI agents terms

[Session ID](https://learn.ynteractive.com/content/glossary/session-id) · [Tool calling](https://learn.ynteractive.com/content/glossary/tool-calling) · [Agent memory](https://learn.ynteractive.com/content/glossary/agent-memory) · [Agent orchestration](https://learn.ynteractive.com/content/glossary/agent-orchestration)

## Where you use it: free lessons

- [Preview Every Website Change Before Your Client Sees It using Kosuke](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees) (Kosuke, 15 min)
- [Guardian: Make Your n8n AI Agent Ask Before It Emails a Customer](https://learn.ynteractive.com/content/guardian-n8n-ai-agent-approval-before-sending-email) (Guardian, 14 min)

## AI tools that use it

- [Kosuke](https://learn.ynteractive.com/content/ai-tools/coding-developer#tool-kosuke) ([free lesson](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees))
- [Guardian](https://learn.ynteractive.com/content/ai-tools/automation-workflows#tool-guardian) ([free lesson](https://learn.ynteractive.com/content/guardian-n8n-ai-agent-approval-before-sending-email))

[More terms by tool](https://learn.ynteractive.com/content/glossary/ai-tool-terms)

## Frequently asked questions

**Is a sandbox the same as a test account?**

Not quite. A test account is a login. A sandbox is an isolated copy of the whole system, so even a full admin inside it cannot reach the real data.

**Why do AI coding tools use sandboxes?**

So the agent can install, run and break things freely while the live site and your own computer stay out of reach.

**Can something in a sandbox leak out?**

A well-built sandbox blocks it, but anything you deliberately connect, such as an API key or a real email account, can act outside it. Keep real credentials out.

[All AI glossary terms, A to Z](https://learn.ynteractive.com/content/glossary) · [Free prompt templates](https://learn.ynteractive.com/content/prompts)
