HomeGuidesAPI ReferenceRelease notes
Log In
Guides

Managing versions

Any time a user publishes their agent, they actually create a new version of it. To enable organizations to have full traceability and management over their deployed agents, versions in SUPERWISE® are immutable.
A version contains all the necessary agent details to analyze an agent's behavior at a given time. This includes:

  • Its agent configuration
  • Its guardrail configuration
  • Deployment time

Manage versions via the UI

To view all historical versions of a given agent, press the version button to see all previously created versions and an indication of the currently published one.
Using the UI, you can easily navigate to load and view the configuration of a given version by clicking on it.

Draft Mode

While editing an agent, you will be in draft mode. Draft mode indicates the ephemeral state of your configuration and helps you save your temporary configuration changes while navigating between different versions. If not published, and you leave the agent management studio context, this draft state with your configuration settings will be deleted.
Please note that because versions are immutable, you won’t be able to edit a version's configuration once loaded. To do that, you need to restore the version, which will transform the page into draft mode, overriding the previously created draft.

Manage versions via the SDK

List all versions of a given agent

versions_list = sw.agent.get_versions(agent_id=agent.id)

Get the configuration details of a given historical version of an agent

version = sw.agent.get_version_by_id(agent_id=agent.id, version_id=version.id)
agent_config = version.agent_config

To restore a previous version and publish it as a new version, send another version creation request using the previous configuration.

agent_config = old_version.agent_config
new_version = sw.agent.create_version(agent_id=agent.id, name="New version name", description="Your new description", agent_config=agent_config)