Atlas
Guides

Demo Mode

Enable an interactive, email-gated demo of Atlas at /demo for lead capture and evaluation.

Self-Hosted Only

Demo mode is for operators running their own Atlas instance. On app.useatlas.dev, contact the Atlas team to discuss demo and trial options for your organization.

Demo mode lets you expose a public, email-gated preview of Atlas at /demo. Visitors enter their email to start a sandboxed chat session — no account creation required. It's designed for lead capture and product evaluation with built-in rate limiting and reduced agent capabilities.

Prerequisites

  • ATLAS_DEMO_ENABLED=true
  • BETTER_AUTH_SECRET set (used to sign demo tokens)
  • A datasource configured (ATLAS_DATASOURCE_URL)

How It Works

  1. Visitor navigates to /demo and enters their email address
  2. Atlas validates the email and issues an HMAC-SHA256 signed token (24-hour TTL)
  3. The visitor chats with the agent using the demo token for authentication
  4. Sessions are rate-limited and capped at fewer agent steps than production

Demo sessions use a separate auth path from the main application. The demo token is derived from BETTER_AUTH_SECRET with a :demo suffix — it does not grant access to any authenticated endpoints.

Lead Capture

Every demo start captures:

  • Email address (used as the demo user identifier)
  • IP address and user agent
  • Session count and whether the user is returning

User IDs are deterministic hashes (demo:<sha256(email)[0:16]>) — the raw email is stored only in the lead capture record, not in conversation metadata.


Configuration

Environment Variables

VariableDefaultDescription
ATLAS_DEMO_ENABLEDfalseEnable demo mode and the /demo route
ATLAS_DEMO_MAX_STEPS10Maximum agent steps per demo chat (1–100)
ATLAS_DEMO_RATE_LIMIT_RPM10Requests per minute per demo user (0 = disabled)
# .env — enable demo mode with custom limits
ATLAS_DEMO_ENABLED=true
ATLAS_DEMO_MAX_STEPS=15
ATLAS_DEMO_RATE_LIMIT_RPM=20

Demo vs Production

FeatureDemoProduction
AuthEmail-gated token (24h TTL)Managed auth, API key, or BYOT
Agent stepsReduced (default 10)Full (default 25)
ToolsDefault tools onlyAll tools + plugin tools + actions
Rate limitSeparate per-user limiterMain rate limiter
ConversationsPersisted with surface="demo"Persisted with standard surface
Token expiry24 hoursSession-based

Demo mode uses the default datasource and semantic layer. Ensure the demo datasource does not contain sensitive production data.


API Endpoints

Demo endpoints are mounted at /api/v1/demo.

MethodPathAuthDescription
POST/startNone (rate-limited by IP)Email gate — validates email, signs token, captures lead
POST/chatBearer demo tokenStream a chat response (mirrors main chat)
GET/conversationsBearer demo tokenList the demo user's conversations
GET/conversations/:idBearer demo tokenGet a conversation with messages

Start a Demo Session

curl -X POST https://your-atlas.example.com/api/v1/demo/start \
  -H "Content-Type: application/json" \
  -d '{ "email": "visitor@example.com" }'

Response:

{
  "token": "eyJlbWFpbCI6InZpc2l0b3JAZ...",
  "expiresAt": 1742565600000,
  "returning": false,
  "conversationCount": 0
}

Chat via Demo Token

curl -X POST https://your-atlas.example.com/api/v1/demo/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJlbWFpbCI6InZpc2l0b3JAZ..." \
  -d '{ "messages": [{ "role": "user", "content": "Show me revenue by month" }] }'

Limitations

  • No plugin tools — demo sessions use default tools only (executeSQL, explore). Custom actions and plugin-provided tools are not available
  • No write operations — actions are disabled in demo mode
  • Reduced steps — the agent has fewer steps to work with, which may limit complex multi-step analyses
  • Token expiry — demo tokens expire after 24 hours; the user must re-enter their email to continue
  • Rate limiting — each demo user is rate-limited independently from production users

See Also

On this page