Skip to main content

Workflow Versioning

Every significant change to a workflow graph can be preserved as a named snapshot. Snapshots let you roll back to any earlier state, compare two versions side-by-side, and maintain a clear audit trail of what changed and when.


How Versions Are Created​

TriggerWhat happens
PublishA snapshot is created automatically before the workflow goes live
Manual snapshotClick Snapshot in the Versions panel at any time while editing

Both methods produce a full copy of the workflow graph (nodes + edges + config) at that moment in time.


Versions Panel​

Open the Versions panel from the right action bar in the editor (clock icon). It shows a timeline of all snapshots for the current workflow:

─────────────────────────────────────────
v7 Published 2026-06-20 14:32 [you]
v6 Manual 2026-06-19 11:05 [alice]
v5 Published 2026-06-15 09:41 [bob]
v4 Manual 2026-06-14 16:20 [you]
...
─────────────────────────────────────────

Each entry shows:

  • Version number — v1, v2, v3… numbered per workflow in the order snapshots are taken (the API's seq), followed by the workflow's semantic version at that moment (version_number, e.g. 1.2.0, which changes only on publish or rollback)
  • Type — publish (taken by the publish action), manual (taken by a user), or rollback (taken automatically before a rollback)
  • Timestamp — when the snapshot was taken
  • Author — who took the snapshot
  • Live badge — on the snapshot the workflow is running from while it's published (see below)

The newest snapshot is at the top.


Rollback​

To restore a previous version:

  1. Open the Versions panel.
  2. Click the version you want to restore.
  3. Click Restore this version.

The workflow graph is replaced with the snapshot's graph. The current graph is automatically saved as a new snapshot (trigger rollback) before the rollback, so you can undo the rollback if needed.

Rollback and status

Restoring a version sets the workflow back to Draft status, even if the current version is Published. You will need to go through the review and publish lifecycle again to make the restored version live.

Because a rollback ends in Draft, it follows the same rules as moving the workflow to Draft: lifecycle_manager, space_admin and admin can roll back a Draft or Rejected workflow, only space_admin and admin a Published one, and only admin one that is In Review (staged) — other combinations return HTTP 403. Rolling back an In Review workflow also clears its approval-stage progress.

Who can roll back depends on the workflow's status:

Current statusAllowed roles
Draft or Rejectedlifecycle_manager, space_admin, admin
Publishedspace_admin, admin (rollback takes it offline, like Revise)
In Reviewadmin only

Any other role gets HTTP 403 (Role "…" cannot roll back a workflow in status "…"). The workflow's owner, as an agent_developer, can take snapshots but not roll back.


Graph Diff​

To compare two versions:

  1. Open the Versions panel.
  2. Select a base version (click once to highlight).
  3. Hold Shift and select a second version.
  4. Click Compare.

The diff view highlights:

HighlightMeaning
Green node / edgeAdded in the newer version
Red node / edgeRemoved in the newer version
Yellow nodeConfig changed between versions
No highlightUnchanged

Click any highlighted node in the diff view to see a side-by-side comparison of its config fields.

How the diff decides what changed:

  • Edges are compared by what they connect: their source, target and label. An edge pointed at a different node, or given a different label, shows as one edge removed and one added. Edges match whether or not they have an id, and whether they use from/to or source/target.
  • Nodes are matched by id and marked changed when their type, label or config differ. Moving or resizing a node on the canvas isn't a change.

The diff API (GET …/versions/{a}/diff/{b}) returns added_nodes, removed_nodes, changed_nodes (each as {before, after}), added_edges and removed_edges, going from version a to version b.


Automatic Snapshot on Publish​

When a reviewer clicks Approve & Publish on a staged workflow, the system:

  1. Marks the workflow status as Published.
  2. Creates a publish snapshot of the graph that just went live.
  3. Points the workflow's live version (published_version_id on the workflow) at that snapshot.

This means the production version is always tied to a specific snapshot, marked Live in the Versions panel. If you later revise and republish, a new snapshot is created and the live pointer moves forward, while the old snapshot stays in the timeline. While the workflow isn't published (after Revise or a rollback), published_version_id is null: nothing of it is live.


Storage and Limits​

  • Snapshots store the full graph JSON (nodes, edges, and configs).
  • There is no hard limit on the number of snapshots per workflow. The list endpoint returns them a page at a time, newest first: ?limit= (1–500, default 100) and ?offset=. The Versions panel shows the newest 100.
  • Snapshots are retained indefinitely unless the workflow is deleted.
  • Deleting a workflow deletes all its snapshots permanently.

API Access​

Version snapshots are accessible via the REST API for programmatic integrations:

http
GET  /api/v1/agent-workflows/{id}/versions?limit=100&offset=0   # newest first
GET  /api/v1/agent-workflows/{id}/versions/{version_id}
POST /api/v1/agent-workflows/{id}/snapshot                  # create manual snapshot
GET  /api/v1/agent-workflows/{id}/versions/{a}/diff/{b}     # compare two versions
POST /api/v1/agent-workflows/{id}/rollback                  # body: {"version_id": "...", "notes": "..."}

A version object has id, workflow_id, seq (the v-number), version_number (the workflow's semantic version at the time), graph, name, description, trigger (publish, manual, promote or rollback), notes, created_by and created_at. See the API Reference for full request/response schemas.

Hrida.ai is proprietary software of Zlabs Innovation. See the license for terms. © 2026 Zlabs Innovation.