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.devURL via Freestyle API
Architecture
Component Overview
| Component | Location | Role |
|---|---|---|
| Website Tools | ai-backend/src/utils/tools/built_in/website.py | website_init / website_deploy / website_eslint |
| SandboxManager | ai-backend/src/services/sandbox.py | Sandbox lifecycle, web project bootstrap |
| Deploy API | ai-backend/src/api/deploy.py | Freestyle / Vercel / Server deploy routes |
| Frontend Route | web/src/app/api/deploy/route.ts | Proxies 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.| Parameter | Type | Default | Description |
|---|---|---|---|
framework | string | nextjs | Framework type: nextjs or vite |
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.| Parameter | Type | Default | Description |
|---|---|---|---|
platform | string | freestyle | Deploy platform: freestyle (default) or vercel |
- Persistent URL —
https://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.| Parameter | Type | Default | Description |
|---|---|---|---|
file_paths | list[str] | null | null | File paths to check (null checks entire project) |
- TypeScript type checking —
tsc --noEmit --pretty - ESLint checking —
next lint
Deployment System
Zeus supports three deployment targets through a unified Deploy API:| Target | Endpoint | Features | User Must Provide |
|---|---|---|---|
| Freestyle | POST /deploy/freestyle | Persistent URL, sub-second deploy, auto build | Nothing (zero config) |
| Vercel | POST /deploy/vercel | Production-grade hosting | Vercel Token |
| Server | POST /deploy/server | Custom server, Docker deploy | SSH 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.devdomains come with HTTPS - Domain mapping — Same domain can point to different deployments (updates create a new deployment and remap the domain)
Deployment Flow (End-to-End)
Preview URL vs Deploy URL
| Dimension | Sandbox Preview URL | Freestyle Deploy URL |
|---|---|---|
| Format | Depends on Provider (e.g. https://{id}.e2b.app) | https://zeus-{session[:8]}.style.dev |
| Lifecycle | While sandbox is alive (max 1 hour) | Persistent until manually removed |
| Purpose | Real-time development preview | Sharing, showcasing, production use |
| Updates | HMR auto-refresh | Requires redeployment |
| Performance | Dev mode (slower) | Production build (optimized) |
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
FREESTYLE_API_KEY | Freestyle API key (required for deployment) | — |
SANDBOX_PROVIDER | Sandbox provider type | e2b |
SANDBOX_TIMEOUT | Sandbox timeout in seconds | 3600 |
E2B_API_KEY | E2B API key (required for E2B provider) | — |
E2B_SANDBOX_TEMPLATE | E2B template name | zeus-nextjs |
OPENSANDBOX_SERVER_URL | OpenSandbox server URL | http://localhost:8000 |
OPENSANDBOX_IMAGE | OpenSandbox sandbox image | opensandbox/code-interpreter:v1.0.1 |
Getting a Freestyle API Key
- Visit admin.freestyle.sh and sign up
- Get your API Key from the Dashboard
- Add to
apps/ai-backend/.env:
Free Tier Limits
| Resource | Free Limit |
|---|---|
| Concurrent VMs | 10 |
| Managed Domains | 5 |
| Repositories | 500 |
| Deploys | 500/month |
Use Cases
| Scenario | Tool Chain |
|---|---|
| Rapid Prototyping | website_init → AI writes code → live preview → website_deploy |
| Landing Page | website_init → AI generates page → website_eslint → website_deploy |
| Component Demo | website_init → AI writes components → share *.style.dev URL |
| Iterative Dev | Dev preview → modify code → website_eslint check → redeploy (same URL) |