.csnap extension and can be used only in Cognigy. These files are encrypted because they can include sensitive information, such as data in connections.
You can use snapshots for the following purposes:
- Deploy an agent version through endpoints and use it in production while your developers work on the next version.
- Back up your agent so you can revert to a previous version.
- Transfer an agent between different CI/CD environments.
- Agents
- Connections
- Extensions
- Flow agents
- Flows
- Functions
- Handover providers
- Large language models
- Lexicons
- Localization
- Natural language understanding (NLU) connectors
- Playbooks
- Settings
- Tokens
- Trained NLU intent models
Restrictions
-
Snapshots don’t include the following resources:
- Endpoints
- Intent trainer records
- Analytics data
- Contact profiles
- Logs
- Knowledge stores and knowledge sources
- Other snapshots
-
The
text-embedding-3-modelmodel increases the size of snapshots, leading to longer download and upload times. - Earlier versions of Cognigy might not support snapshots created in newer versions. Importing snapshots from a later Cognigy version into an earlier version can cause unexpected errors.
-
Snapshot creation fails with an error if any JSON key in the project’s data contains a period (
.). Periods are reserved for dot notation used to access nested properties in Cognigy, for example,context.user.name. Avoid using periods in JSON keys across all Cognigy resources and other data included in the snapshot.
Limitations
- You can create up to 10 snapshots per project. For on-premises installations, you can change this value by setting the
MAX_AMOUNT_SNAPSHOTS_IN_AGENTenvironment variable invalues.yaml. - The maximum snapshot size depends on how you create or upload it:
- Cognigy UI: You can create and upload snapshots with up to 8 GB. For on-premises installations, you can increase this limit by setting the
RESUMABLE_UPLOAD_MAX_FILE_SIZEenvironment variable invalues.yaml. The same limit also applies to packages. - Cognigy API: You can create and upload snapshots with up to 2 GB. Snapshots that exceed this limit can’t be created or uploaded. For on-premises installations, you can increase this limit by setting the
SNAPSHOT_MAX_FILE_SIZEenvironment variable invalues.yaml.
- Cognigy UI: You can create and upload snapshots with up to 8 GB. For on-premises installations, you can increase this limit by setting the
- You can download a snapshot for up to 1 day after you prepare the download. After this period, you need to prepare the download again.
Working with snapshots
If you delete a snapshot that you use with an endpoint in production, the agent connected to that endpoint stops working.
- GUI
- API
- CLI
You can create, delete, and restore snapshots in Deploy > Snapshots. Additionally, you can download and upload snapshots:
Create snapshot
Create snapshot
To create a snapshot, follow these steps:
- On the Snapshots page, click Create snapshot.
- In the Create snapshot dialog, enter a Name. The name can’t contain
\,/,:,*,?,",<,>,|, or¥, and can’t start or end with a space. - Optional: Enter a Description. The description can contain up to 500 characters.
- Click Create. A new task named Create Snapshot is created.
Download snapshot
Download snapshot
To download a snapshot, follow these steps:
- On the Snapshots page, click
next to the snapshot and select Prepare download. A new task named Package Snapshot is created. - When the task is complete, click the download icon
to download the snapshot.
Upload snapshot
Upload snapshot
To upload a snapshot, follow these steps:
- On the Snapshots page, click Upload snapshot.
- Select a
.csnapfile from your computer. Other file types aren’t accepted. - A new task named Upload Snapshot shows the progress of the file transfer.
- After the file uploads, a task named Upload Snapshot Package is created and the snapshot shows an unpacking indicator. When the task is complete, the snapshot is uploaded.
Deploy snapshot
To deploy a snapshot, follow these steps:- Go to Deploy > Endpoints and select the endpoint through which you want to deploy the snapshot.
- In the endpoint’s Setup tab, go to the Target section and select the snapshot in the Snapshot field.
Restore snapshot
You can use snapshots to back up project versions. With this approach, you can restore a backup project if a new agent doesn’t perform as intended. To restore a snapshot, open the actions menu- Restoring a snapshot overwrites the current project’s resources that the snapshot includes. Flows are deleted before they’re recreated from the snapshot you restore. If you have an active endpoint pointing to a flow, the conversations stop working because the flows are deleted.
- Endpoints that point to a snapshot keep using the extension version from the snapshot. Restoring a snapshot overwrites all installed extensions. If you update an extension after restoring a snapshot, only endpoints that don’t point to the snapshot use the version installed in Manage > Extensions. You can’t change the extension version in a snapshot. To use another version, restore the snapshot in a new project, update the extension, and create a new snapshot.
- Restoring a snapshot might require manual changes to the endpoints. Restoring a snapshot automatically updates only the endpoints that are assigned to the primary locale. You need to update endpoints assigned to non-primary locales manually. These endpoints are marked with a red dot next to the endpoint name after you restore the snapshot, meaning that the settings aren’t complete.
Deploy agents to production with snapshots
The following three scenarios show the recommended methods for deploying agents to production.Develop agent with single project
Develop agent with single project
With snapshots, you can make your agents available through endpoints while you work on the next version:
- Develop and test flows, lexicons, intents, and all other resources as usual. Eventually, you reach an agent version that you want to publish to users.
- Create a snapshot of the project. You don’t have to prepare a downloadable package for the snapshot because everything remains in the current project.
- To release the agent version of the snapshot, go to the endpoint settings, for example, in the Webchat endpoint settings, and select the new snapshot and the flow.
Your production environment now uses the agent from the snapshot.
Develop agent with multiple projects
Develop agent with multiple projects
You want to build an agent for FAQs on your website. In this case, you have two projects:
- FAQ Bot development — a project for developers to build and test the agent.
- FAQ Bot production — a project for the production environment.
- Developers only have access to the FAQ Bot development project, in which they can develop and test agents. Eventually, they reach an agent version that you want to publish to users.
- Create a snapshot in the FAQ Bot development project and download it.
- To release the agent version of the snapshot, upload the snapshot to the FAQ Bot production project. Then, select the uploaded snapshot in the endpoint settings of your production endpoint.
Develop agent with CI/CD environments
Develop agent with CI/CD environments
You have the following environments:
- Dev — an environment for development purposes.
- Staging — an environment where acceptance tests are conducted for newer versions.
- Production — an environment for publishing agents to users.
- Developers only have access to projects in the Dev installation, in which they build agents, design new experiences, or improve solutions. Eventually, they reach an agent version that you want to publish to users.
- Create snapshots of the agents in the Dev installation, download the snapshots, and provide them to the teams working on the Staging installation.
- People working on the Staging installation receive the snapshots and upload them to their projects. They select the uploaded snapshots in their endpoint settings and run acceptance tests.
- If they find errors, they inform their development teams, who fix the problems and provide new snapshots. If tests are successful, the snapshots are moved to the Production installation.
- To release the agent version of the snapshots, upload them to the Production installation and select the uploaded snapshots in the production endpoints.