Creating Sandbox Environments
Creating an Ephemeral Sandbox
Via GOVERN Dashboard
- Navigate to Admin > Sandbox > New Environment
- Select Ephemeral type
- Choose duration (1h, 4h, 8h, 24h)
- Choose base configuration:
- Blank (empty GOVERN instance)
- Standard (default policies pre-loaded)
- Federal (federal policy templates)
- Click Create — environment ready in ~90 seconds
Via CLI
# Create ephemeral sandbox (4-hour default)govern sandbox create \ --type ephemeral \ --duration 4h \ --config standard
# Create with specific policies pre-loadedgovern sandbox create \ --type ephemeral \ --duration 8h \ --config standard \ --policies pii-prevention,bias-detection,safety-guardrails
# Output:# Sandbox ID: sbx_01JBXYZ123# URL: https://sbx_01JBXYZ123.sandbox.govern.archetypal.ai# Expires: 2026-04-12T22:23:10Z# API Key: sbx_key_xxxxxxxxxxxxCreating a Persistent Sandbox
govern sandbox create \ --type persistent \ --name "Q2-2026-Red-Team" \ --duration 30d \ --config standard
# Persistent sandboxes persist through session logout# They must be explicitly deletedManaging Environments
List Environments
govern sandbox list
# Output:# ID Name Type Status Expires# sbx_01JBXYZ123 - ephemeral active in 3h 42m# sbx_01JABC789 Q2-2026-Red-Team persistent active in 28dConnect to Sandbox
# Set sandbox as active environmentexport GOVERN_SANDBOX_ID=sbx_01JBXYZ123export GOVERN_API_KEY=sbx_key_xxxxxxxxxxxxexport GOVERN_API_URL=https://sbx_01JBXYZ123.sandbox.govern.archetypal.ai
# Verify connectiongovern health --sandbox $GOVERN_SANDBOX_IDReset Sandbox
# Reset to initial state (wipes all sandbox data)govern sandbox reset sbx_01JBXYZ123 --confirm
# Reset and reload specific configurationgovern sandbox reset sbx_01JBXYZ123 \ --config standard \ --policies pii-prevention \ --confirmDestroy Sandbox
govern sandbox destroy sbx_01JBXYZ123 --confirmLoading AI Systems into Sandbox
Connect a mock or real AI system to your sandbox for testing:
# Connect a mock AI system (uses GOVERN's built-in mock)govern sandbox add-system sbx_01JBXYZ123 \ --name "test-chatbot" \ --type mock \ --mock-behavior standard
# Connect a real AI system (isolated endpoint)govern sandbox add-system sbx_01JBXYZ123 \ --name "gpt4-staging" \ --type api \ --endpoint https://api.openai.com/v1/chat/completions \ --api-key $OPENAI_STAGING_KEYSandbox API
The sandbox has the same API as production GOVERN, scoped to the sandbox:
# All requests use the sandbox URL and API keycurl https://sbx_01JBXYZ123.sandbox.govern.archetypal.ai/v1/assessments \ -H "Authorization: Bearer sbx_key_xxxxxxxxxxxx"All data created in the sandbox is isolated. It never appears in production.
Duration Limits
| Environment Type | Maximum Duration | Extension Allowed |
|---|---|---|
| Ephemeral | 24 hours | No |
| Persistent | 90 days | Yes, by admin |
| Training (named) | 1 year | Yes, by admin |