loftur

Concepts

One runtime, three loops

Loftur is an agent-native site platform. You don't click around a builder and you don't run a dev server — an AI agent points at your site's MCP endpoint and writes a real backend: content schema, database, routes, islands, auth, secrets.

The thing worth understanding before anything else is the shape of the system:

One runtime. Three lifecycle loops that move independently. Two contracts that keep them honest.

Most stacks fuse those loops into a single deploy — change a field, change some code, ship content, and it all rides one pipeline. Loftur pulls them apart on purpose. A content editor ships copy without a deploy. A developer expands the schema without touching site code. Nobody is blocked on anyone.

The three loops

LoopYou changeDraft → published viaBlocked on
Site coderoutes, islands, serverFns, queriespreview_sitepublish_sitenothing until publish
Schemamodels & fieldsexpand freely; contract is gatedthe footprint contract
Contentrecords & assetsset_publish_statusnothing — no deploy

They meet in exactly two places: publish-time validation of your GraphQL against the live schema, and a contract check that stops the schema from dropping anything the published site still queries. Everything else is deliberately independent.

Preview is development

There is no laptop in this picture. No vite dev, no staging box that drifts from production, no "works on my machine." The agent writes a module and the very next request executes it in a real Worker isolate — the same isolate machinery that serves production, pointed at your unpublished working tree.

Preview is not a copy of production rendered somewhere safe. It is production's own runtime, gated by a version pointer. The dev loop and the serving loop are the same loop.

That collapse is the whole design, and it's what the rest of these docs unpack: how the runtime works with no build step, then each of the three loops — site code, schema, content — and finally why they stay decoupled and who is allowed to turn which knob.