Skip to content

Creating Sandbox Environments

Creating an Ephemeral Sandbox

Via GOVERN Dashboard

  1. Navigate to Admin > Sandbox > New Environment
  2. Select Ephemeral type
  3. Choose duration (1h, 4h, 8h, 24h)
  4. Choose base configuration:
    • Blank (empty GOVERN instance)
    • Standard (default policies pre-loaded)
    • Federal (federal policy templates)
  5. Click Create — environment ready in ~90 seconds

Via CLI

Terminal window
# Create ephemeral sandbox (4-hour default)
govern sandbox create \
--type ephemeral \
--duration 4h \
--config standard
# Create with specific policies pre-loaded
govern 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_xxxxxxxxxxxx

Creating a Persistent Sandbox

Terminal window
govern sandbox create \
--type persistent \
--name "Q2-2026-Red-Team" \
--duration 30d \
--config standard
# Persistent sandboxes persist through session logout
# They must be explicitly deleted

Managing Environments

List Environments

Terminal window
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 28d

Connect to Sandbox

Terminal window
# Set sandbox as active environment
export GOVERN_SANDBOX_ID=sbx_01JBXYZ123
export GOVERN_API_KEY=sbx_key_xxxxxxxxxxxx
export GOVERN_API_URL=https://sbx_01JBXYZ123.sandbox.govern.archetypal.ai
# Verify connection
govern health --sandbox $GOVERN_SANDBOX_ID

Reset Sandbox

Terminal window
# Reset to initial state (wipes all sandbox data)
govern sandbox reset sbx_01JBXYZ123 --confirm
# Reset and reload specific configuration
govern sandbox reset sbx_01JBXYZ123 \
--config standard \
--policies pii-prevention \
--confirm

Destroy Sandbox

Terminal window
govern sandbox destroy sbx_01JBXYZ123 --confirm

Loading AI Systems into Sandbox

Connect a mock or real AI system to your sandbox for testing:

Terminal window
# 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_KEY

Sandbox API

The sandbox has the same API as production GOVERN, scoped to the sandbox:

Terminal window
# All requests use the sandbox URL and API key
curl 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 TypeMaximum DurationExtension Allowed
Ephemeral24 hoursNo
Persistent90 daysYes, by admin
Training (named)1 yearYes, by admin