Deploying Builder use cases requires a structured approach to move your solutions from development to production. This guide outlines strategies for versioning, deploying, and managing applications across different environments to ensure reliability and performance.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.
Deployment Strategies
- Single Workspace
- Multi-Workspace
- Multi-Instance
Best for: Basic applications with minimal complexity, such as simple prompting agentsIn this approach, you use a single workspace for both development and production:
- Development: Create and test your application directly in the workspace
- Production: Once tested, the same workspace serves as the production environment
- Version Control: Use versioning to save stable points for potential rollback
- Simplest deployment approach
- No need to migrate between workspaces
- Quick iteration and updates
- Limited separation between development and production
- Higher risk of disruptive changes affecting live users
- Best suited for applications with low complexity and minimal regulatory constraints
The Deploy Modal
Clicking Deploy in the Builder header bar opens a modal with two tabs: Publish and Share.Publish tab
The Publish tab turns the current workspace source into a runnable bundle and assigns it a version.| Field / control | What it does |
|---|---|
| Version name | A free-form identifier for this deploy (defaults to an auto-incremented semver after the latest deployed version). Shown in the read-only version dropdown of the header bar once deployed. |
| Publish button | Synchronizes any unsaved source files to the workspace, builds the React/Vite bundle, and registers it as the workspace’s current deployed bundle. On success the modal shows the bundle URL and the ready-to-embed snippet. |
- The bundled JavaScript (served at
/builtin-bundles/<slug>.<hash>.js). - The new entry in the workspace
versionshistory. - A
workspaces.versions.publishedevent in the workspace Activity feed.
Share tab
The Share tab generates the public links and embed snippets needed to expose the deployed bundle outside the Builder.Platform URL
A copyable URL of the formhttps://<platform-host>/apps/<workspace-slug>. This is the workspace runtime URL: anyone with workspace access can open the deployed app at that address.
Embed modes
Four mutually exclusive display modes are exposed. Each one generates a<script> tag that you paste into any host page; the script is /embed.js shipped by the platform, which boots a React 18 runtime and mounts the deployed bundle.
| Mode | What it renders on the host page | When to use it |
|---|---|---|
| Inline | A normal block inside a container you control (defaults to #prisme-app). | The app is a regular section of the host page. |
| Popover | A floating bubble pinned to the bottom-right of the viewport that expands into a chat-style panel on click. | Customer-support agents, in-page assistants. |
| Modal | A fullscreen overlay opened by a trigger element you control (defaults to #open-app). | Heavy interactive flows that should not share the host page real estate. |
| Bottom Sheet | A panel that slides up from the bottom of the viewport on a trigger click. | Mobile-first integrations. |
Generated snippet
The Share tab writes the snippet directly into the modal; copy it as-is. Examples for each mode:data-* attributes
| Attribute | Required | Description |
|---|---|---|
data-bundle-url | recommended | URL of the deployed bundle. If omitted, embed.js fetches /builtin-bundles/bundle-map.json and looks up the bundle by app slug. |
data-workspace-id | yes | The workspace whose runtime context (auth, events, SDK) the app will receive. |
data-mode | yes | inline, popover, modal, or bottom-sheet. Case-sensitive. |
data-container | inline only | CSS selector of the host element. Defaults to #prisme-app. |
data-trigger | modal / bottom-sheet | CSS selector of the element that opens the overlay. Defaults to #open-app. |
data-theme | no | light or dark. Forwarded to the app via props.theme. |
data-primary-color, data-background-color | no | Override the app’s CSS variables for branding. |
data-auth | no | Pre-supplied authentication strategy (e.g. a JWT) when the host page already knows the user. |
Bundle hosting and CORS
The bundle is fetched cross-origin withmode: 'cors', so the server returning /builtin-bundles/<slug>.<hash>.js must reply with Access-Control-Allow-Origin: * (the platform sets this header by default). If you self-host the bundle behind a CDN or proxy, preserve the header.
embed.js injects its own CSS and loads Tailwind from cdn.tailwindcss.com. The host page’s CSP must allow:
script-srcfor the platform host andesm.sh,style-src 'unsafe-inline'andcdn.tailwindcss.com,connect-srcfor the platform API host.
Update flow
Publish → Share is a single cycle. To roll an embed forward, redeploy from the Publish tab — the bundle URL changes (its hash is content-addressed), so re-copy the snippet into the host page. Hosts that omitdata-bundle-url will pick up the new version automatically because bundle-map.json is updated by every Publish.
Versioning Your Application
Workspaces can be synchronized with Git repositories to version your application, enabling push/pull workflows, collaboration, and rollback capabilities. For complete documentation on repository configuration, authentication methods, push/pull operations, merge conflict handling, and bulk operations, see the dedicated Versioning page.API deployment
Here is a small example script using archive export/import APIs to update a workspace from another :CI/CD deployment
CI-based deployment enables more complex scenarios, especially useful for multi-instance environments where you need to promote workspaces from a development/sandbox instance to production instances. The general approach is:- Push workspaces to a Git repository from the source environment (bulk push via API)
- Build a Docker image embedding those workspaces into the
prismeai-workspacesservice - Deploy the image to the target environment, where workspaces are automatically imported at startup
However, the scenario described here have the following advantages :
- CI/CD enable additional security and quality guardrails during the upgrade process
- The dest environment do not need any network access to the source environement git, and can be upgraded / roll-backed at any time even if the git is not available
Prerequisites
Platform repository on the source environment
Configure a platform repository on your source environment (e.g. sandbox) so that all workspaces can be pushed to a shared Git repository:Workspace groups
Define workspace groups to organize which workspaces should be included in your releases:Step 1: Bulk push workspaces to Git
Use the bulk push API to export all workspace groups to the platform repository. This is typically the first stage of your CI/CD pipeline:?sse=true parameter enables Server-Sent Events for real-time progress tracking, which is recommended for CI pipelines to avoid HTTP timeouts on large deployments.
Step 2: Build a Docker image with embedded workspaces
Once workspaces are pushed to Git, build a customprismeai-workspaces Docker image that embeds them. This uses a Dockerfile that:
- Clones the workspaces repository
- Runs a security scan (e.g. TruffleHog) to detect leaked secrets
- Copies the workspace files into the image
- Configures a filesystem-type platform repository pointing to the embedded files
/www/workspaces directory as a read-only platform repository named “release”. This allows the target environment to use the standard bulk import mechanism to import workspaces from the Docker image itself, without needing Git credentials.
The CI job to build this image:
Step 3: Deploy and import on the target environment
Deploy the custom image to your target environment (e.g. production). On startup, workspaces can be automatically imported using theSTARTUP_IMPORT_* environment variables:
Summary
The complete CI/CD flow looks like this:Environment-Specific Configuration
Manage differences between environments:Use Workspace Secrets
Store environment-specific values as secrets:Access these values in your application using:
Deployment Best Practices
Version Everything
Maintain complete history of your application:
- Commit changes frequently with clear messages
- Use branches for feature development
- Tag important releases (e.g., v1.0.0)
- Document significant version changes
- Never work directly in production
Test Before Deployment
Validate thoroughly before moving to production:
- Test in development environment first
- Verify integrations with external systems
- Test with realistic data sets
- Include user acceptance testing
- Conduct security testing
Controlled Deployment
Implement safeguards around deployment:
- Use approval workflows for production changes
- Deploy during low-traffic periods
- Implement monitoring during deployment
- Prepare rollback procedures
- Document deployment steps
Environment Isolation
Maintain clear boundaries between environments:
- Use separate API keys for each environment
- Configure different external service endpoints
- Apply appropriate security controls by environment
- Use visual indicators to distinguish environments
- Limit production access to necessary personnel
Troubleshooting Deployments
Infrastructure issues
Infrastructure issues
First check that your infrastructure is properly configured and running with readiness API.
Import/Pull Failures
Import/Pull Failures
Common causes and solutions for import problems:Issue: Slug ConflictsSolution: Ensure unique slugs across workspaces or exclude index file from import.
- For Platform bulk imports, check the detailed errors list in workspaces.bulkImport.completed event.
- For bulk archive imports, check the same detailed errors list in prismeai-workspaces container logs.
- Individual workspace import errors an also be checked in the workspaces.imported event emitted in their activity feed.
Rollback Procedures
Rollback Procedures
How to revert to a previous state:Platform rollback:
- Identify the stable version tag
- Revert prismeai images to that tag
- Open Platform workspace and pull again all 3 native goups one after another : base1, base2, extended.
- Open the workspace activity feed
- Filter events on type
workspaces.versions.published - Use the native “Rollback” UI button to roll back to the desired version
- Maintain archives of known-good workspace states
- Import the last stable archive if issues occur
Next Steps
RBAC
Configure role-based access control across environments
Integrations
Connect your applications to external systems
Testing & Debugging
Learn how to thoroughly test applications before deployment