code-branchVersion Sets & Promotion

Version sets define which agent, state machine, and model preferences a service uses. They enable safe iteration like Git branches while keeping production stable.

  • Purpose: Pin exact versions for a service run (agent, state machine, LLM model preferences).

  • Analogy: Treat version sets like Git branches for your service configuration.

  • Two special sets exist on every service:

    • edge: Always points to the latest agent and state machine with no model preferences. Locked from updates; cannot be deleted.

    • release: The default version set used when clients don’t specify one. Cannot be deleted; can be updated to promote changes.

circle-exclamation

What Each Special Set Means

  • edge (locked default settings)

    • Always latest agent/state machine; no explicit LLM preferences.

    • Cannot be updated via the upsert API and cannot be deleted.

    • Use for quick local validation or smoke checks; not for stable user exposure.

  • release (default exposed to users)

    • Used by conversations and real-time APIs when service_version_set_name is not provided.

    • Cannot be deleted, but can be updated to promote a tested configuration to production.

Creating and Updating Version Sets

  • Create/Update: Use the Service Version Set upsert API to create named sets (e.g., personal-alex, test, preview). All sets except edge are updatable.

  • Delete: Allowed for custom sets, but not for edge or release. Deletion is blocked if a set is referenced by any simulation unit tests.

  • Permissions:

    • Create: Service:CreateVersionSet

    • Update: Service:UpdateVersionSet

    • Delete: Service:DeleteVersionSet

How Version Sets Are Used at Runtime

  • Conversation APIs default to release if service_version_set_name is omitted.

  • Simulation unit tests and test runs must explicitly specify the target version set.

  • Services are created with both edge and release by default; release will equal edge unless specified otherwise at creation time.

podcastReal-time Voice (WebSocket)chevron-right
  1. Personal branch

  • Create a personal version set (e.g., personal-yourname), pin agent/state machine versions and set LLM preferences.

  • Iterate locally; validate via small focused simulation unit tests.

  1. Merge into test

  • Upsert the shared test version set with your candidate configuration.

  • Run your simulation unit test set on test. Fix regressions here.

  1. Promote to preview

  • Copy the test configuration into preview (another named version set).

  • Run the full simulation suite on preview and conduct stakeholder UAT.

  1. Release

  • If preview passes full sims and UAT, promote by updating release with the same configuration (i.e., upsert release to match preview).

  • Do not delete release or edge. Use them as stable anchors.

Promotion Flow

spinner

CLI Commands (forge version-set)

Agent Forge provides CLI commands to manage version sets directly from the terminal:

List Version Sets

Shows all version sets for a service with their pinned versions and LLM preferences.

Create/Update a Version Set

circle-info

Dry-run by default: All mutating commands show what would change without --apply. Add --apply to execute.

Version Existence Validation

When pinning to specific versions using -a (agent) or -g (context graph) flags, the CLI validates that those versions actually exist before applying the change:

For advanced users who need to bypass this validation (e.g., in automation scripts where versions may be created in parallel), use the --skip-version-check flag:

circle-exclamation

Compare Version Sets

Shows a side-by-side comparison of two version sets, highlighting differences.

Promote Version Sets

circle-info

Auto-backup: When promoting to release, a backup is automatically created as release-previous. Use --no-backup to skip this safety measure.

Rollback Version Sets

If a release causes issues, quickly revert to the previous configuration:

This is equivalent to forge version-set promote release-previous release but provides a clearer intent and shows a comparison of the configurations:

circle-exclamation

Show Version Set Details

Delete a Version Set

circle-exclamation

Discovering Services (forge service)

Before working with version sets, you may need to discover what services exist and their current configuration. Use forge service commands to list and inspect services.

List Services

Output shows services with their tags and version set counts:

Show Service Details

Output includes linked assets and version set configuration:

Check Service Health Status

Monitor the health of services across your organization to identify configuration issues:

Detected Issues:

  • Version set drift: Preview and release configurations differ

  • Missing version sets: Production services missing preview or release

  • Unpinned versions: Production services with non-edge version sets using latest

Example Output:

circle-info

Discovery workflow: Use forge service list to find services, forge service status to check health, then forge service show to inspect configuration before making changes with forge version-set commands.

Discovering Asset Versions (forge asset)

Before pinning specific versions in a version set, you need to know what versions exist. Use forge asset commands to discover agent and context graph versions.

List Agent Versions

Output shows version numbers with creation timestamps:

List Context Graph Versions

Output includes state count for each version:

Show Version Details

Workflow: Pin Discovered Versions

circle-info

Tip: Use forge version-set upsert --latest to automatically resolve and pin the current latest versions without manually looking them up.

CLI Validation

All mutating version-set commands (upsert, promote, delete) run pre-flight validation before applying changes. This ensures configurations are valid before reaching the remote API.

Validation Rules

Rule
Scope
Behavior

Version existence check

All upsert commands

Error if pinned agent/HSM version doesn't exist

Pinned versions required

Production services

Error if agent/HSM version is null

Cannot delete preview/release

Production services

Error blocks deletion

Preview required for release promotion

Production services

Error if preview doesn't exist

Voice-optimized LLMs only

Voice channels

Error if using GPT-5, Claude, etc.

Empty LLM prefs warning

Voice channels

Warning (non-blocking)

Cost tier constraints

Economy presets

Error if using premium LLMs

circle-info

Bypass validation: Use --skip-version-check to bypass version existence validation for advanced use cases.

Example: Blocked Mutation

Example: Warning (Non-blocking)

Warnings are displayed but don't block the operation:

circle-info

Channel and preset tags determine which validation rules apply. See Channel Tagging for details on configuring service tags.

Practical Tips

Naming Conventions

  • Use lowercase letters, digits, - or _ only.

  • Don’t use /, ., or names starting with $.

  • Examples: personal-alex, test, preview, release.

  • Drift control: Treat release as immutable except during deliberate promotion. Keep a changelog of which version set was promoted, when, and by whom.

  • Safety checks: Block deletion of sets referenced by simulations. Prefer deprecation and migration over deletion when many artifacts depend on a set.

  • Fast rollback: Use forge version-set rollback to quickly revert to the previous release configuration. The release-previous backup is created automatically when promoting to release.

  • Observability: Compare simulation metrics between test, preview, and release to quantify impact before promotion.

API Touchpoints (Operational Behavior)

API References

Create a service

post
/v1/{organization}/service/

Create a new service. Depending on whether an active service with the same name already exists, the endpoint behaves differently:

  • If is_active is False, creates an inactive new service.
  • If is_active is True and no active service with the given name exists, creates a new active service.
  • If is_active is True and an active service with the given name exists, this endpoint throws an error.

The new service will automatically contain an edge version set that uses the latest Agent and ServiceHierarchicalStateMachine versions with no LLM model preference. It will also create a release version set, that will equal to what's specified in the request if the release_version_set is specified, or equal to edge if not.

Permissions

This endpoint requires the following permissions:

  • Service:CreateService for the service to create.
  • Service:CreateVersionSet for the edge and release version sets.
Authorizations
AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
service_hierarchical_state_machine_idstringRequired

The ID of the state machine that this service uses.

Pattern: ^[a-f0-9]{24}$
agent_idstringRequired

The ID of the agent that this service uses.

Pattern: ^[a-f0-9]{24}$
namestring · min: 1Required

The name of this service.

descriptionstring · min: 1Required

A description of this service.

is_activebooleanRequired

Whether the newly-created service is active. Only active services are visible to users on the dashboard. You can later adjust the activeness of this service.

release_version_setany ofOptional

The release version set to use for this service. If not specified, the release version set will be the same as the edge version set, which uses the latest agent and state machine versions with no model preference.

or
nullOptional
keytermsstring[] · max: 20Optional

A list of keyterms that are easy to get wrong during audio transcriptions that tend to occur commonly in audio sessions using this service.

Default: []
Responses
post
/v1/{organization}/service/

Upsert a service version set

put
/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/

Upsert a version set for the specified service. Replace the existing version set with the same name if any, or create a new one.

Note that the edge version set cannot be updated.

Permissions

This endpoint may require the following permissions:

  • Service:CreateVersionSet if the version set does not exist.
  • Service:UpdateVersionSet if the version set already exists.
Authorizations
AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
service_idstringRequired

Identifier of the service.

Pattern: ^[a-f0-9]{24}$
version_set_namestring · min: 1 · max: 40Required

Name of the version set to upsert.

Pattern: ^[A-Za-z0-9_-]+$
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
Responses
chevron-right
204

Succeeded.

No content

put
/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/

No content

Delete a service version set

delete
/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/

Delete the given verion set from the given service.

This endpoint will error if the version set is used in any simulation unit tests.

Permissions

This endpoint requires the following permissions:

  • Service:DeleteVersionSet for the version set.
Authorizations
AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
service_idstringRequired

Identifier of the service.

Pattern: ^[a-f0-9]{24}$
version_set_namestringRequired

Name of the version set.

Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
204

Succeeded.

No content

delete
/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/

No content

- Service creation initializes `edge` and `release`. - Upsert version set API cannot update `edge` but can update `release` and custom sets. - Delete version set API forbids deleting `edge` and `release`, and blocks deletion if a set is used in simulation unit tests. - Conversation and real-time endpoints default to `release` when a version set isn’t specified by the client.

This model lets teams branch, test, and promote changes in a controlled path: personal → test → preview → release, ensuring production remains stable while iteration stays fast.

Last updated

Was this helpful?