Documentation Index
Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt
Use this file to discover all available pages before exploring further.

Coming from the legacy block editor?
If your workspace was originally built on the legacy YAML/block page editor, the new Builder treats those pages as runtime-only.- Existing legacy pages keep running after the upgrade — end users see no change at the URL they had bookmarked.
- They are not editable in the new Builder UI. The block editor is gone; the page tab only opens React source trees.
- To make a change, the page must be rewritten as a React/Vite app from a new page entry. There is no automatic conversion of legacy blocks to React components — the rendering model is different (server-rendered blocks vs client-rendered SPA).
- Identify the page you want to change. Note its URL, the automations it calls, and the events it emits or listens to.
- Create a new page in the Builder and initialize the React/Vite template.
- Reproduce the UI with the components of your choice (Radix, the platform’s design system, or anything else).
- Wire the new page to the same automations and events (see Connect to Automations).
- Deploy the workspace and switch the public URL to the new page.
What Changed
No Legacy Canvas
The old visual block editor is no longer a Builder navigation item. User interfaces are built from React components and files.
Code and Preview
Pages have a source editor and a native preview. Switch between them from the page toolbar.
React Template
A new page can initialize a React, Vite, Tailwind CSS, and Radix-based starter application.
Deployment Preview
Deployed bundles can appear in the Pages list as read-only previews.
Page Workspace
The Builder layout is organized around the workspace sidebar:- Overview shows usage, recent changes, errors, and quick actions.
- Activity shows event traces and correlation IDs.
- Pages contains editable source pages and read-only deployed bundles.
- Automations contains backend workflows and webhooks.
- Imports manages installed apps, custom code, and integration packages.
- Files lists uploaded workspace assets.
- Settings manages workspace configuration, sharing, secrets, and RBAC.
index. It represents the source app that Builder compiles and previews.
Create a Page
Open the workspace
In AI Studio, open Create > Builder, then select the workspace that should contain the page.
Open Pages
Select Pages in the Builder sidebar. If the workspace has no page source yet, click the + action or initialize the template from Code mode.
Initialize the template
Builder creates a starter React app with files such as:
src/App.tsxsrc/main.tsxsrc/styles/globals.cssindex.htmlpackage.jsonvite.config.ts
Edit the source
Switch to Code and edit the source files. The file tree supports folders, file selection, file creation, and file rename.
Preview the app
Switch back to Preview. Builder compiles the React source and renders it in the native preview area.
Code Mode

- Edit React and TypeScript files.
- Add reusable components under
src/components. - Update global styles under
src/styles. - Add utility functions under
src/liborsrc/hooks. - Configure Vite, Tailwind CSS, TypeScript, and package metadata.
Preview Mode
Preview mode compiles the source and renders the page inside Builder. Use the device controls to test:- Desktop
- Tablet
- Mobile
Connect to Automations
Pages usually become useful when they call or listen to automations.- HTTP Webhooks
- Events
- Activity
Use an automation with an endpoint when the page needs request-response behavior.
Build Locally: The starter-spa Reference App
If you prefer to author the page in your own IDE and deploy with a script, use the starter-spa starter at github.com/prismeai/starter-spa. It is the same React + Radix + Tailwind template the in-Builder + Page → New SPA action seeds, exported as a stand-alone repo you can clone, edit, and npm run release to your workspace.
src/App.tsx— the React entry point. Its default export is what the platform renders. Receives{ sdk, user, workspace, backends, agents }as props.automations/v1/status.yml— a webhook endpoint, called from the REST tab of the demo.automations/on-app-greeting-requested.yml— listens forapp.greeting.requested, emitsapp.greeting.completed. Drives the WebSocket tab of the demo.scripts/deploy.mjs— does the full sync (automations + source files + bundle + version snapshot) and patchesconfig.value.bundles[<slug>]soAppRendererpicks up the new bundle on next load.
AppProps contract apply to built-in apps shipped by the platform and to custom apps you build with this starter — what you author here is loaded exactly like a first-party app.
Use the starter when you want:
- An IDE + Git workflow instead of the in-Builder editor.
- A CI-friendly deploy path (
npm run releasefrom a pipeline). - A reproducible local dev loop with a mocked SDK (
src/lib/mockHost.ts).
README.md covers the full deploy script, externals policy (never bundle React or @prisme.ai/sdk), and the conflict-detection / safe-retry semantics in detail.
End-to-end Example: Page → Automation → Live Updates
This walk-through wires a React page to a backend automation that does work asynchronously and streams progress back to the UI. It exercises the three integration patterns at once: HTTP request, event subscription, and Activity tracing. The use case: a user clicks Generate report in the page. The backend kicks off a long-running task that emits intermediate events (report.generating, report.progress, report.ready). The page reflects the progress in real time, then shows a download link when the report is ready.
1. The automation
Create an automation calledgenerate-report:
- The automation emits a correlation ID in every event. The page uses it to filter the events it cares about (otherwise it would receive every
report.*event in the workspace). - The HTTP response returns the correlation ID immediately. The actual work happens after the response is sent.
report.progressis fired N times during the work — these drive the UI progress bar.
2. The page
In the page source, call the webhook and subscribe to its events.- HTTP call — the page POSTs to the automation’s webhook and receives the correlation ID synchronously.
- Event subscription —
sdk.streamEventsopens a workspace-scoped event stream. The filter"payload.correlationId": correlationIdnarrows the stream to events from this specific run. - Cleanup — the stream is closed as soon as the final event arrives or an error happens. Forgetting this leaks websockets.
3. Tracing it in Activity
Open the Activity tab while the page runs. Filter bysource.correlationId = <id> (you can copy it from the network panel of the page, or have the page log it). You will see, in order:
| Event | Source | Notes |
|---|---|---|
runtime.webhooks.calledStarted | the user / page | The webhook hit. |
runtime.automations.executed | runtime | The automation run started. |
report.generating | generate-report | Emitted at the top of do. |
report.progress (×5) | generate-report | One per loop iteration. |
report.ready | generate-report | Final event. |
runtime.automations.completed | runtime | Run finished. |
Patterns this example demonstrates
| Pattern | Where it lives in the code |
|---|---|
| Fire-and-forget request with a correlation ID handle | generate() reads correlationId from the webhook response. |
| Server-pushed progress | sdk.streamEvents + events.on("report.progress"). |
| Driving UI state from events (show / hide / progress) | setProgress, setStatus, setReportUrl. |
| Filtered subscription (one run, not the whole workspace) | "payload.correlationId": correlationId in the stream filter. |
| Predictable Activity trace | The automation always emits the correlation ID; the Activity filter matches it. |
*.partial events as data becomes available, end with a *.ready or *.error, and clean up the subscription when you receive a terminal event.
Page Styling
The Builder page template ships with Tailwind CSS, configured the way most React/Vite projects use it. Anything you would normally do with Tailwind works as-is — utility classes, custom theme tokens intailwind.config.ts, component classes via @apply, etc.
The platform adds a few Prisme-specific bits on top of the standard Tailwind setup.
Theme handover from the embed
When the page is rendered throughembed.js (see Deploy modal → Share tab), the host script forwards optional theming attributes to the React app:
data-* on <script> | Forwarded as | Use in CSS |
|---|---|---|
data-theme="dark" | props.theme and a data-theme="dark" attribute on the mount root | [data-theme="dark"] .… Tailwind variants or plain CSS selectors |
data-primary-color="#0066ff" | CSS variable --prismeai-primary on the mount root | bg-[var(--prismeai-primary)] |
data-background-color="…" | CSS variable --prismeai-bg on the mount root | bg-[var(--prismeai-bg)] |
Globals and resets
The starter ships asrc/styles/globals.css with the Tailwind directives and a minimal reset:
embed.js already injects one for hosts that want a zero-config shell, and double-loading produces specificity surprises.
When in doubt
For everything that is not Prisme-specific (utility classes, plugins, JIT options, dark mode strategy, etc.), the Tailwind documentation is the source of truth. The same applies to React, Vite, and Radix — Builder pages use them in the standard way.Deployed Bundles
When a workspace has deployed page bundles, Builder lists them under Pages as read-only entries. Read-only pages use a lock icon and cannot be edited from the source editor. Use them to inspect the deployed app while keeping the editable source separate. To change a deployed page:- Open the editable
indexsource. - Make and save changes.
- Deploy the workspace again.
- Reopen the deployed bundle preview.
Files and Assets
The Files section is separate from the page source tree. Use it for uploaded assets that belong to the workspace, such as PDFs, images, spreadsheets, or other binary files. For app source files, use Pages > Code. For workspace uploads, use Files.Troubleshooting
The preview stays on Initializing
The preview stays on Initializing
Open Code and verify that the workspace has a valid React entry point such as
src/App.tsx and src/main.tsx. If no files exist, initialize the template.The page shows a build error
The page shows a build error
Read the error in the preview, fix the corresponding source file, and return to Preview. Typical causes are invalid imports, missing exports, or TypeScript syntax errors.
The page cannot call an automation
The page cannot call an automation
Check that the automation endpoint exists, that the URL uses the current workspace slug, and that authentication headers include the platform token and CSRF token when required.
The UI action ran but no result appeared
The UI action ran but no result appeared
Open Activity, filter by the correlation ID, and inspect the automation trace. The request may have reached the backend but failed inside an instruction.
Next Steps
Automations
Build the backend workflows that pages call.
Testing & Debugging
Trace page actions through Activity and correlation IDs.
Integrations
Connect pages and automations to external systems.
Deployment
Publish the workspace once the page is ready.