Skip to content

The AI engine

See how VoxelSite uses your prompt, website files and stored business facts to generate and edit pages.

Updated October 23, 2026 8 min read

The built-in AI sends your request and relevant site context to the provider configured in Studio. It uses the response to create or edit private draft files, then shows the result in preview.

Built-in AI is optional. You can install without a provider key, edit by hand, or connect an external agent through Studio MCP. The external client supplies its own model; the built-in generation pipeline below applies when you request Studio AI.

Creating a site

Installation saves the site name and tagline. Include the business details and required pages in your first prompt.

The generation request combines your prompt with the saved site identity and a drawn design direction. Review the response and ask for missing pages or details before publishing.

The requested output can include:

  • Page files with semantic markup and Tailwind CSS utility classes
  • A design system - style.css with color and typography tokens, plus Tailwind utilities for visual styling
  • Shared partials - _partials/header.php, nav.php, footer.php for consistent layout
  • Written content tailored to your specific business
  • Contact forms with server-side validation and spam protection
  • SEO metadata including Schema.org structured data
  • Structured data files - JSON files in assets/data/ for machine-readable business info

Model and prompt routing

The optional AI Router uses TypeSafe's Jev to assess requests before generation. VoxelSite selects a Faster or Stronger model from your saved provider and uses a prompt recipe for the task. Small copy edits can use focused context; broader work keeps the context it needs.

Questions can use a read-only path. Some exact selected-text replacements need no writing-model call. If routing cannot select a route, VoxelSite reports that and uses your default model and normal instructions.

How changes work

After the initial generation, you can make changes by describing what you want:

  • "Add a testimonials section to the homepage"
  • "Change the color scheme to dark blue"
  • "Add a new page for our team"
  • "Make the header sticky"

VoxelSite figures out which files to modify, makes the changes, and shows you a live preview. File changes enter the revision history for undo.

Actions vs. free chat

VoxelSite offers two ways to interact:

Actions are guided flows for common tasks - creating a site, editing a page, changing the design, adding components, updating SEO. They collect details for the selected task.

Free chat lets you type anything. Useful when you know exactly what you want or need something the actions don't cover.

Website references

Instead of describing a design from scratch, you can attach a public website URL as a design reference. VoxelSite fetches the page, cleans the HTML, and sends it to the AI alongside your prompt. The AI interprets the design language - colors, typography, spacing, layout patterns - and translates it into clean Tailwind CSS for your new or existing site. Review the generated content and branding before publishing.

This works for both new sites and restyling existing ones. No text prompt is required - the URL alone is enough. The fetched reference informs the AI request. See Website References for the user-facing guide.

What gets generated

Draft pages and mutable assets stay under _studio/preview/ until publication. The resulting published website uses standard web files:

your-site/
├── index.php              # Homepage
├── about.php              # About page
├── contact.php            # Contact page
├── submit.php             # Form handler
├── _partials/
│   ├── header.php         # DOCTYPE through opening <main>, including <head>
│   ├── nav.php            # Navigation (desktop + mobile)
│   ├── footer.php         # Footer + closing scripts
│   └── schema.php         # SEO structured data (Schema.org)
├── assets/
│   ├── css/
│   │   ├── style.css      # Tokens, motion and permitted structural CSS
│   │   └── tailwind.css   # Compiled utility classes
│   ├── js/                # JavaScript files
│   ├── images/            # Uploaded images
│   ├── icons/             # Lucide SVG icons (hydrated from placeholders)
│   └── data/              # Structured data (JSON)
├── sitemap.xml            # XML sitemap
├── robots.txt             # Crawler rules
├── llms.txt               # AI site map
└── mcp.php                # Public MCP endpoint

Use Studio to edit the private source, then publish the reviewed website. Direct changes to managed live files can cause a publication conflict. Exports provide supported portable website files with their dependency limits.

Design direction

For a new site, VoxelSite adds a design direction to the AI request. It provides choices for layout, typography and color when your prompt leaves those open.

Before a new site is generated, the engine draws a creative brief and hands it to the AI as part of the context:

  • Hero - all typography, a full-bleed photograph, a split, an asymmetric layout, a statement line with the image below the fold, or an editorial kicker
  • Type - a family with a suggested Google Fonts pairing, from high-contrast serifs to condensed display faces to monospace accents
  • Palette and accent hue - warm or cool neutrals, near-monochrome, two strong hues, a dark ground, or ink on light, with one of twelve accent hues
  • Layout, corners, and motion - grid discipline, band rhythm, magazine columns, or tiles; square to pill corners; from near-static to slow and cinematic
  • One signature move - the thing a visitor could describe afterwards: oversized numerals, a split screen, a marquee, editorial rules, a color-block navigation, a giant footer

The draw uses a chosen style and saved preferences to filter its options. Rejections affect later draws when the AI records them in Site Memory. Check the saved values in AI Knowledge.

The engine records the direction and seed in Design Intelligence. Generation instructions ask the model to record how it applied that direction. Edits, website references and restyles use existing design context without requesting a new direction draw.

Site Memory

During built-in generation, the AI can write business facts to the private draft’s assets/data/memory.json. Later requests include saved facts when available. Check them in AI Knowledge. Read-only and no-change requests do not update the file.

Site Memory is excluded from publication, public MCP resources and exports. Facts copied into page content or public business data still become public when you publish; check those uses too.

Design Intelligence

The private draft’s assets/data/design-intelligence.json records design decisions such as font choices, colors and spacing. Review those notes after a design change; they can be incomplete or stale. This authoring file is also excluded from publication and exports.

Cross-page awareness

The normal context builder includes section summaries for up to 10 pages, excluding the focused page. It adds the focused source separately when the context budget allows.

Name both pages when requesting a cross-page change, for example: "Make the About page use the Home page typography". Check both pages and their shared styles afterwards.

Context budget management

The normal generation path budgets context as follows. Focused Router edits keep the complete selected source and return to normal generation if it cannot fit.

Every AI model has a finite context window - the total amount of information it can process at once. VoxelSite reserves the effective output limit before budgeting the input context. That output limit respects your saved Max Output Tokens ceiling, the selected model's limit, and the action being performed. See Settings → Output limits for the values and their source.

When building the context for a request, the engine categorizes information into three priority tiers:

  • Essential - site information, design tokens, saved memory, design notes, the page manifest and shared header, navigation and footer
  • Important - focused or reference page source, assets, form schemas, data files, dependencies and active actions
  • Optional - included last: the full stylesheet, available icon list

If the combined context exceeds the model's budget, the engine progressively trims from the bottom up - optional sections are dropped first, then important sections, keeping essential information intact. For focused actions like section edits and inline code edits, the budget is capped even tighter - single-file operations don't need the full image library or compiled CSS, so the engine deliberately restricts context to keep generation fast and precise.

The engine handles context trimming automatically. Logs in _studio/logs/ record the configured and effective output limits, the selected model's limits, and which context sections were included or trimmed. See How Prompting Works for a deeper look at action routing and budget management.

Data dependency tracking

When you ask the AI to edit a data file - rename a service in services.json, update a menu item, change a FAQ question - VoxelSite tells the AI which other files depend on that data:

  • Forms - a dropdown field might pull its options from services.json via options_from
  • Pages - a page might json_decode the data file and render its contents
  • AEO files - llms.txt, mcp.php, and schema.php propagate data to public discovery endpoints

Dependency context helps the model identify related files. Check forms, rendered pages and discovery data after the edit; the context does not verify their behavior.

Streaming and incomplete responses

Responses arrive in pieces. VoxelSite assembles complete messages from OpenAI, DeepSeek, and OpenAI-compatible providers before reading them, preserving code, non-ASCII text, and structured output even when the network splits a message.

An empty response is an error, even if the provider reports token usage. If the model reaches its output limit before returning website changes, the request also ends with an error. If it returns usable changes before reaching that limit, VoxelSite marks the result as partial. Review the preview and ask it to finish the remaining work before publishing.

See Common Issues for the difference between an output limit and a server timeout.

AI providers

Optional built-in generation supports these providers:

  • Anthropic - recommended
  • OpenAI
  • Google
  • DeepSeek
  • Any provider with an OpenAI-compatible API

Configure a provider and model in Settings when you want built-in generation. You can add them after installation. External-agent subscriptions and Studio provider API charges are separate; see costs and limits.

Found a mistake in these instructions? Open an issue.

Download VoxelSite