Agents
Versioning & Rollback

Versioning & Rollback

almyty tracks versions of your agent pipelines, allowing you to save snapshots, compare changes, and rollback to a previous configuration.

Saving a Version

Each time you save an agent, you can optionally create a named version snapshot:

curl -X POST https://api.almyty.com/agents/{id}/versions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "changelog": "Added error handling branch and retry logic"
  }'

Response:

{
  "success": true,
  "data": {
    "versionIndex": 3,
    "changelog": "Added error handling branch and retry logic",
    "createdAt": "2026-03-20T14:30:00Z",
    "pipeline": { ... }
  }
}

Listing Versions

curl https://api.almyty.com/agents/{id}/versions \
  -H "Authorization: Bearer $TOKEN"

Returns an array of version snapshots, each containing:

FieldTypeDescription
versionIndexnumberSequential version number
changelogstringDescription of changes
createdAtstringISO 8601 timestamp
pipelineobjectFull pipeline snapshot at that version

Rolling Back

To restore a previous version:

curl -X POST https://api.almyty.com/agents/{id}/versions/{versionIndex}/rollback \
  -H "Authorization: Bearer $TOKEN"

Rollback replaces the agent's current pipeline with the snapshot from the specified version. The rollback itself is recorded in the audit log.

Important: Rollback does not delete newer versions. You can always roll forward to a later version if needed.

Audit Log

Every change to an agent is recorded in the audit log:

curl https://api.almyty.com/agents/{id}/audit-log \
  -H "Authorization: Bearer $TOKEN"

Events tracked:

EventDescription
createdAgent was created
updatedPipeline or metadata was modified
activatedAgent status changed to active
deactivatedAgent status changed to inactive
version_savedA version snapshot was created
rolled_backPipeline was restored from a previous version
invokedAgent was executed

Each entry includes the timestamp, the user who performed the action, and relevant metadata about the change.

Best Practices

  1. Save versions before major changes — Create a snapshot before restructuring the pipeline
  2. Write meaningful changelogs — Future you will thank present you
  3. Test after rollback — Verify the agent works correctly with the restored pipeline
  4. Use the audit log — Review the history to understand how an agent evolved