What it is

ai.allternit.com/embed/home is the real web app, shown to anyone, signed in or not. www.allternit.com frames it in its hero, in the “Four modes” section and in the phone section, so a visitor can try the actual product: the rail, every mode, the composer, the model picker and voice. It is a preview. Nothing in it reaches a model or an account. Every view reads a sample workspace instead of an account, so nothing shows an error or an empty page.

The sample workspace

One small studio running a bakery’s spring launch (allternit-ai/src/embed/sample-workspace.ts): The main bot is the one the visitor picked above the composer: pick Gizzi there, and Bots shows Gizzi as the main bot. Every mode starts on the same Allternit Cloud default model. On a phone-width screen the embed shows the phone layout.
  • Paths. /embed/home, /embed/code, /embed/aci and /embed/bots open the preview in that mode, on desktop and phone layouts.
  • Switch without a reload. The framing page sends { type: 'allternit-embed:mode', mode: 'home' | 'code' | 'aci' | 'bots' } with postMessage to the embed’s origin.
  • Hear back. The embed sends { type: 'allternit-embed:ready', mode } once it has started, and { type: 'allternit-embed:mode-changed', mode } when the visitor switches modes inside it. Check event.origin before reading them.
  • Only https://www.allternit.com and https://allternit.com (and localhost in development) can switch modes, and only they get these messages (allternit-ai/src/embed/embed-modes.ts).
Any link to ai.allternit.com/?q=<request> puts the request in the Home composer as a draft. Nothing is sent until you press Send.
  • It works signed out: the request is kept through sign-in.
  • It is used once and then removed from the address bar, so a reload doesn’t bring it back.
  • Requests longer than 4,000 characters are cut to 4,000.

How it stays a preview

All of this applies only on /embed/* (allternit-ai/src/embed):
  • Always signed out. www.allternit.com and ai.allternit.com are the same site, so the browser would share a signed-in visitor’s session. The embed’s auth context always reports signed out, so no account data is read and no token is sent.
  • Its own storage. localStorage and sessionStorage are in memory, so the preview never reads or changes a real workspace in the same browser.
  • No API traffic. App API calls and live-update streams are answered inside the page: reads come from the sample workspace (preview-api.ts), everything else gets a signed-out answer. The one request that leaves is Allternit Cloud’s public model list (api.allternit.com/v1/models); if it can’t be read, a built-in copy is used.
  • No service worker. The preview never installs the app’s service worker. Its first start reloads every open tab, which reloaded the frame while a visitor was typing.
  • No model, no recording. Replies come from a fixed set in scripted-replies.ts. Voice measures how loud the microphone is to find the end of a turn; it records, transcribes and uploads nothing, and the reply is spoken by the browser’s own voice.
  • Framing. /embed/* may be framed only by https://www.allternit.com, https://allternit.com and https://artifacts.allternit.com (public/_headers). The artifacts site is allowed so answer pages can show the live site with its frames; it cannot switch modes. Every other path still refuses to be framed.
  • No onboarding and no connector loading.
To change what the preview says, edit allternit-ai/src/embed/scripted-replies.ts: add a topic pattern and its replies, or a mode’s replies in SURFACE_REPLIES. To change what it shows, edit sample-workspace.ts; preview-api.test.ts checks every sample bot still passes the app’s own agent checks (a bot that fails is dropped without an error). Keep every reply and sample true about the product, plain and short.