Skip to content

Versions

The Versions page in the application allows users to manage different versions of their AI agents. This is crucial for testing new configurations, features, or prompts without affecting the live or production version of an agent. It supports a lifecycle from drafting to live deployment and archiving.

Overview

The page provides functionalities to:

  • Add new versions for a selected agent.
  • List existing versions for the selected agent.
  • Edit the metadata of existing versions (name, description, type, status).
  • Delete versions.

Important Note: When a new version is created, the system captures the current configuration of the selected agent (including its associated prompts, intents, variables, tools, etc.) by calling an internal function (pinionai_version). This snapshot is then stored as JSON data within the version record.

Adding a New Version

To add a new version for the currently selected agent:

  1. Navigate to the Versions page.
  2. Ensure an agent is selected via the global agent selector at the top of the admin interface. If no agent is selected, you will be prompted to select one.
  3. Expand the "New Version" section.
  4. A form will appear with the following fields:
    • Active Version for [Selected Agent Name]: (Checkbox) If checked, this new version will become the active version for its specified Version Type and agent. Any other version of the same Version Type for this agent will be automatically deactivated. Default is True (checked).
    • Version Name: (Text Input) A descriptive name for this version (e.g., "v1.0 Release", "Feature X Test", "Q2 Update Draft").
    • Version Type: (Selectbox) The category or stage of this version. Options:
    • draft
    • development
    • test
    • live
    • archived
    • Version Description: (Text Area) A more detailed description of what this version entails or changes.
  5. The system will inform you that "Agent will generate using current configuration." This means the current state of the selected agent will be snapshotted.
  6. Click the "Create Version" button.
  7. Upon submission:
    • The system calls pinionai_version to get the agent's current configuration data.
    • This data is stored as a JSON string in the new version record.
    • If "Active Version" was checked, other versions of the same Version Type for this agent are deactivated.

Listing Versions

Existing versions for the currently selected agent are listed under the "Versions" subheader.

  • Filtering: The list is automatically filtered to display versions associated with the globally selected agent.
  • Display: Each version is shown in an expandable section, displaying its name, type, status (✅ for active, ❌ for inactive), and the agent name it belongs to.
  • Details: Expanding a version's section reveals:
  • Version Type
  • Last Modified timestamp
  • Version Description
  • Version Data (the snapshotted agent configuration, displayed as JSON, collapsed by default)
  • Each version entry has "Edit" and "Delete" buttons.

Editing a Version

To edit an existing version's metadata:

  1. Click the "Edit" button next to the desired version in the list.
  2. The "Edit [Version Agent Name] version [Version Name]" form will appear, pre-filled with the version's current information.
  3. The following fields are available for modification:
    • Active Version for [Selected Agent Name]: (Checkbox)
    • Version Name: (Text Input)
    • Version Type: (Selectbox)
    • Version Description: (Text Area)
    • The "Version Agent Name" is displayed but disabled (cannot be changed here).
    • The actual "Version Data" (the agent snapshot) is not editable directly through this form; it was fixed at creation.
  4. Click "Save Changes" to update the version or "Cancel" to discard changes and hide the edit form.
  5. If "Active Version" is checked, other versions of the same Version Type for this agent will be deactivated.

Deleting a Version

To delete a version:

  1. Click the "Delete" button next to the desired version in the list.
  2. Confirm the deletion when prompted. The version record will be permanently removed from the database.