Skip to main content

Overview

Website is Zeus’s end-to-end web development capability within Coding Mode. The agent can initialize web projects inside a sandbox, preview them in real-time, check code quality, and deploy to a persistent URL with one click. Core capabilities:
  • Project Initialization — Bootstrap Next.js / Vite projects inside an existing sandbox in seconds
  • Live Preview — View the developing website in real-time via sandbox proxy URL
  • Code Checking — TypeScript type checking + ESLint code quality validation
  • One-Click Deploy — Deploy to a persistent *.style.dev URL via Freestyle API

Architecture

Component Overview

ComponentLocationRole
Website Toolsai-backend/src/utils/tools/built_in/website.pywebsite_init / website_deploy / website_eslint
SandboxManagerai-backend/src/services/sandbox.pySandbox lifecycle, web project bootstrap
Deploy APIai-backend/src/api/deploy.pyFreestyle / Vercel / Server deploy routes
Frontend Routeweb/src/app/api/deploy/route.tsProxies deploy requests to AI Backend

Website Tools

In Coding Mode, the agent has access to three Website-specific tools:

website_init

Initializes a web project inside the existing sandbox. Does not create a new sandbox — all previous files are preserved.
ParameterTypeDefaultDescription
frameworkstringnextjsFramework type: nextjs or vite
Execution flow: What gets initialized (Next.js):
  • create-next-app@latest — TypeScript + Tailwind + ESLint + App Router
  • Extra dependencies: lucide-react, framer-motion, recharts, zustand, sonner
  • Background pnpm dev --port 3000

website_deploy

Deploys the current web project to Freestyle for a persistent public URL.
ParameterTypeDefaultDescription
platformstringfreestyleDeploy platform: freestyle (default) or vercel
Execution flow: Deployment features:
  • Persistent URLhttps://zeus-{session_id[:8]}.style.dev
  • Auto Build — Freestyle auto-detects framework (Next.js / Vite) and runs build
  • Domain Reuse — Multiple deploys in the same session update the same domain mapping
  • Zero Config — No user-provided tokens or server credentials needed

website_eslint

Checks web project code quality.
ParameterTypeDefaultDescription
file_pathslist[str] | nullnullFile paths to check (null checks entire project)
Checks performed:
  1. TypeScript type checkingtsc --noEmit --pretty
  2. ESLint checkingnext lint
Returns error count, warning count, and detailed diagnostics.

Deployment System

Zeus supports three deployment targets through a unified Deploy API:
TargetEndpointFeaturesUser Must Provide
FreestylePOST /deploy/freestylePersistent URL, sub-second deploy, auto buildNothing (zero config)
VercelPOST /deploy/vercelProduction-grade hostingVercel Token
ServerPOST /deploy/serverCustom server, Docker deploySSH credentials

Freestyle Deployment

Freestyle is the default deployment target, providing:
  • Sub-second deploys — API-first design, from call to live < 1 second
  • Auto framework detection — Supports Next.js, Vite, Expo, and more
  • Auto SSL*.style.dev domains come with HTTPS
  • Domain mapping — Same domain can point to different deployments (updates create a new deployment and remap the domain)
API call example:
async with httpx.AsyncClient() as client:
    response = await client.post(
        "https://api.freestyle.sh/web/v1/deployment",
        headers={
            "Authorization": f"Bearer {FREESTYLE_API_KEY}",
            "Content-Type": "application/json",
        },
        json={
            "source": {
                "kind": "files",
                "files": files_dict,  # {relative_path: file_content}
            },
            "config": {
                "domains": ["zeus-abc12345.style.dev"],
                "build": True,
            },
        },
    )

Deployment Flow (End-to-End)


Preview URL vs Deploy URL

DimensionSandbox Preview URLFreestyle Deploy URL
FormatDepends on Provider (e.g. https://{id}.e2b.app)https://zeus-{session[:8]}.style.dev
LifecycleWhile sandbox is alive (max 1 hour)Persistent until manually removed
PurposeReal-time development previewSharing, showcasing, production use
UpdatesHMR auto-refreshRequires redeployment
PerformanceDev mode (slower)Production build (optimized)

Configuration

Environment Variables

VariableDescriptionDefault
FREESTYLE_API_KEYFreestyle API key (required for deployment)
SANDBOX_PROVIDERSandbox provider typee2b
SANDBOX_TIMEOUTSandbox timeout in seconds3600
E2B_API_KEYE2B API key (required for E2B provider)
E2B_SANDBOX_TEMPLATEE2B template namezeus-nextjs
OPENSANDBOX_SERVER_URLOpenSandbox server URLhttp://localhost:8000
OPENSANDBOX_IMAGEOpenSandbox sandbox imageopensandbox/code-interpreter:v1.0.1

Getting a Freestyle API Key

  1. Visit admin.freestyle.sh and sign up
  2. Get your API Key from the Dashboard
  3. Add to apps/ai-backend/.env:
FREESTYLE_API_KEY=your_api_key_here

Free Tier Limits

ResourceFree Limit
Concurrent VMs10
Managed Domains5
Repositories500
Deploys500/month

Use Cases

ScenarioTool Chain
Rapid Prototypingwebsite_init → AI writes code → live preview → website_deploy
Landing Pagewebsite_init → AI generates page → website_eslintwebsite_deploy
Component Demowebsite_init → AI writes components → share *.style.dev URL
Iterative DevDev preview → modify code → website_eslint check → redeploy (same URL)