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
Publish pages
Introduced in v27.11.0.
Publish tab
- In Builder, open a page in the page editor. The Publish button is shown in the editor toolbar, next to Save, only when a page is open.
- Select Publish. The publish dialog opens on its Publish tab.
- Under Who can access this app?, select who can open the published app:
- Private: workspace collaborators, and the organizations and groups of step 4.
- Signed-in users: anyone with an account, whatever the organization.
- Public: anyone, including visitors without a session. The public pages are prerendered and can be indexed by search engines.
- For a Private app, in Shared with organizations and groups, add the organizations and groups that can open it: select Group then one of the groups of your active organization, or Organization then an organization you can see, or Every organization. A first publish proposes your organization.
- Optional: change the version number next to Publish. It defaults to the last published version with its patch number incremented, and labels this publish only.
- Optional: under Version of the workspace, select a repository to also version the whole workspace (automations, pages, assets…) once published: the platform storage, or a Git repository configured for the workspace (see Versioning). No version, the default, creates none.
- Select Publish. Builder saves the page sources, builds the app, stores it, then creates the version if a repository is selected. The dialog shows Published v
<version>and opens the Share tab.
The organizations and groups of a private app are bindings of its bundle asset: they belong to the environment, are kept on every publish, and are never replaced by an import into an environment that already has some.
An app published before these access levels keeps its access on its next publish: Public stays Public, and Sign-in required becomes Signed-in users, like an app published before both options existed.
A publish also removes from
assets/dist/public/ the prerendered files it did not write, such as the page of a route that was deleted or made private, so that they are no longer served. If some of them can’t be removed, the dialog says so: publish again to remove them.
The workspace configuration stores the bundle as a relative path, resolved against the API host of the environment that serves the app, so a workspace imported into another environment serves its own copy of the bundle.
Prerendered pages use CSS and a hydration script served by the platform. When the platform serves a newer version of these files, the Publish button shows a badge and the dialog shows A newer version of the platform files used by your pages is available: publish again to use it. When the version used by the pages is no longer served, the dialog shows These pages use a platform file version that is no longer served: publish them again. In both cases, publish the pages again.
Prerendered pages and the visitor session
Prerendered pages are served by the API in a sandbox, isolated from the API and from the platform: they never get the session of their visitor. A prerendered page:- can call a webhook or the API without session, with
fetch()without credentials or with an HTML form, for example to send a contact form to a public webhook; - cannot call a webhook or the API with the session of a signed-in visitor, so it cannot show content specific to this visitor;
- cannot use
localStorage,sessionStorage, ordocument.cookie, which throw an error in the sandbox.
https://<platform-host>/p/<workspace-slug>/<page-path> or https://<platform-host>/apps/<workspace-slug>/<page-path>. The same page code runs there with the session of the signed-in visitor. To combine both, keep the public content in the prerendered page and link its signed-in actions to the app URL of the page.
Share tab
The Share tab is available once the pages are published. It lists two URLs, each with Open and Copy buttons:
To change who can open the app, select another access on the Publish tab and publish again.
Embed on another site
The Embed on another site section generates a<script> snippet that loads https://<platform-host>/embed.js.
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.
Generated snippet
The Share tab writes the snippet into the dialog: select Copy and paste it as-is. For example, for the Inline mode:data-* attributes
Host page requirements
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
The bundle URL does not change between publishes: publishing again replaces the bundle in place, so pages and snippets that reference it pick up the new version without any change. For a Public app, shared caches can keep serving the previous bundle for up to 10 minutes (s-maxage=600).
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:1
Use Workspace Secrets
Store environment-specific values as secrets in Settings → Secrets of each workspace (for example The
apiEndpoint: https://dev-api.example.com in development and apiEndpoint: https://api.example.com in production).Secrets are resolved only in the workspace configuration, so expose them there, in index.yml:index.yml stays identical across environments, and each workspace resolves its own value.2
Use the Values in Automations
Read the configuration, not the secret, from your automations:
{{secret.apiEndpoint}} written directly in an automation resolves to an empty value, without any error. See Using Settings secrets in automations.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