Skip to main content
Version: 6.4.0

Manage Snapshots

This is a guide to creating Agent snapshots for versioning and promotion to other environments.

Snapshots

A snapshot is similar to a label in a version control system. Each snapshot points to a specific version of an Agent that includes a full bill-of-materials for the Agent, including the Agent's inputs, outputs, Skills, mappings, etc.

Creating a snapshot allows you to package a version of an Agent.

Snapshots are used for deploying Agents outside of the development cluster using the FabricOps tool.

Snapshots are not deployable from within your development environment.

Create snapshots: CLI

To create a snapshot for a particular Agent version, specify the agentName in the CLI parameters or JSON/YAML definition file. ":${version}" may be appended to the Agent name as in the example below. If the version number is not specified, the latest development version of the Agent is used when creating the snapshot.

cortex agents create-snapshot --agentName <agent-name> --title <"snapshot-title">

Example:

The example below creates a snapshot for version 5 of an Agent named echo-agent. The snapshot is being assigned the title snapshot-echo-agent:5 when it is created.

cortex agents create-snapshot \
--agentName echo-agent:5 \
--title "snapshot-echo-agent:5"

The response includes the snapshotId of the snapshot you created.

To provide more detail in your snapshot, you can optionally create a snapshot definition file (YAML or JSON) and use that rather than passing in the parameters as CLI options.

Snapshot definitions may contain the following fields:

ParameterDescriptionType
title(required) A descriptive display name for the snapshotString
descriptionA short description of the snapshotString
tagsAn optional list of descriptive labels used for keyword searches; tag items should each include a label and value[Tag]
agentName(required) The identifying name of the Agent, may optionally include the version number; for example agentName:5 NOTE: If no version is specified, the tip development version of the Agent is used for the snapshot.String

Create a snapshot using a JSON file

The example below shows a simple snapshot definition file in JSON, snapshotdef.json.

{
"title": "RC v2",
"description": "Release Candidate, v2",
"agentName": "echo-agent:12"
}

Run the command below to create the snapshot using the given file:

cortex agents create-snapshot path/to/snapshotdef.json

Verify snapshot creation

To verify that your snapshot been created successfully run the command:

cortex agents list-snapshots

The response includes a list of all snapshots created for the Agent, including the snapshot's ID, Title, Agent Version, and Created On timestamp.

Describe snapshots

To verify the contents of a snapshot, including the Agent's inputs, outputs, Skills, actions, mappings, dependencies, and other information, run the command:

cortex agents describe-snapshot <snapshotId>

Example:

cortex agents describe-snapshot fb6b26e4-ee2a-4525-892c-xxxx