Skip to main content

Workflow Lifecycle

Every Agent Workflow moves through a defined set of states before it runs in production. This ensures that changes are reviewed before they affect live use.

There is no separate "Approved" state

A staged workflow moves straight to Published the moment a reviewer approves it — there's no intermediate "approved, not yet live" holding state or separate publish step. If you need multi-stakeholder sign-off before that happens, configure an Approval Matrix, which gates the same Approve action behind multiple decisions instead of one.


Status Diagram​

           ┌──────────────┐
│ DRAFT │ ← created here; editor is open
└──────┬───────┘
│ Submit for Review
▼
┌──────────────┐
│ STAGED │ ← "In Review"; locked for editing
└──────┬───────┘ (owner can Withdraw → DRAFT)
┌───────┴────────┐
│ │
Approve & Publish Reject
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ PUBLISHED │ │ REJECTED │
└──────┬──────┘ └──────┬──────┘
│ Revise │ Revise
▼ ▼
┌─────────────────────────────┐
│ DRAFT │ ← back to editing
└─────────────────────────────┘

States​

The four real statuses (draft, staged, published, rejected) come straight from the workflow's status column — there is no fifth value. The editor's status badge labels them Draft, In Review (staged), Published and Rejected.

StatusWho can editWho can runNotes
DraftOwner or write accessOwner or admin — test runs in a sandbox catalog/space onlyDefault status on creation
Staged (In Review)NobodyNobodyLocked pending review — its skills too (see Skills are locked with the workflow); the owner can withdraw it to Draft
RejectedNobody until revisedNobodyReviewer sent it back with mandatory notes
PublishedNobody until revisedAll users with run accessLive version in production

Transitions​

Draft → Staged (Submit for Review)​

Any editor with write access can stage a workflow for review by clicking Submit for Review (POST /api/v1/agent-workflows/{id}/stage). This locks the current graph — and the skills it uses — so the reviewer sees exactly what was submitted.

When to stage: When you're satisfied with your changes and want a second pair of eyes before going live.

Graph validation is non-blocking at this step — staging itself isn't gated on it (only the default-skill system-prompt check and the API operations check below can actually block staging). Two independent validators surface warnings so you can fix problems before a reviewer sees them:

  • In the editor (client-side), the same check that runs before a test Run also runs when you click Submit for Review, and its warnings are shown as a toast:
    • Duplicate node IDs
    • Edges pointing to a node that no longer exists
    • Routing-node (if_else/while_loop/classify) edges whose label doesn't match any current branch, or that have no label at all (an unlabeled edge from a routing node is always followed, regardless of the condition/classification result)
    • Non-end nodes with no outgoing edge (dead ends)
    • Nodes not reachable from the start node
  • On the server, every graph save runs the same structural validator used to gate publishing (see below), returning warnings alongside the saved workflow: unknown node types, dangling edge references, missing/duplicate start node, missing end node, nodes disconnected from start, classify nodes with no categories, guardrails nodes with no rules, mcp nodes without a server_url or tool_name, sub_workflow nodes with no target workflow, the graph exceeding WORKFLOW_MAX_NODES (default 500), and errors in if_else/while_loop/transform/set_state expression fields (each expression is trial-run with an empty state and input; a plain-text set_state value such as pending is accepted as a literal). See Node Types → Graph validation.

These structural problems become a hard block only later, at Staged → Published (Approve) — approving a staged workflow re-runs the server-side validator and rejects the transition with HTTP 422 if any structural problems remain.

Stage gate: default skill must have a system prompt​

In addition to graph validation, the API enforces one extra pre-condition at staging time:

The workflow's default skill must have a non-empty system prompt.

If the default skill's system_prompt is blank or contains only whitespace, staging is blocked and the API returns HTTP 422 with the message:

Default skill has no system prompt. Add a system prompt before staging.

This gate only fires when some node in the current graph still actually references the default skill — an unused, orphaned default skill (e.g. every agent node was rewired to a different skill or switched to inline-prompt mode) doesn't block staging.

To fix it: Open the workflow's default skill (shown in the editor sidebar as "Workflow Name [wfid]"), add a meaningful system prompt, save, then retry staging.

Why is this enforced?

The default skill is the primary agent configuration backing your workflow. An empty system prompt means every agent node that inherits the default skill will run without instructions — a near-certain source of unhelpful or incorrect outputs. The gate prevents accidental staging of half-configured workflows.

Stage gate: API operations must be available to agents​

An agent node can call API Builder operations. Staging is refused, and so is approving a staged workflow, while a node calls an operation agents can't use:

  • The API doesn't exist here, for example in a workflow imported from another instance;
  • The API isn't live;
  • The operation isn't exposed to agents in the API's Agent tools section.

The API returns HTTP 422 with every problem it found, for example:

Agent nodes call API operations agents cannot use. Node "Order lookup" calls getData of API "Orders", which is not exposed to agents: expose it in API Builder (the API's Agent tools section) or remove it from the node.

Saving the graph reports the same problems as warnings (api_tool_warnings in the response), so you can fix them before staging.

To fix it: ask the API's team to expose the operation, or remove it from the node (in the node's API Tools section), then retry.

Staged → Published (Approve) / Rejected (Reject)​

Lifecycle managers, space admins, and admins see staged workflows in the Review Queue. They can:

  • Approve — moves the workflow directly to Published. The structural validator (see above) runs again and blocks the transition with HTTP 422 if it finds any problems. On success, a version snapshot is created automatically, and every skill the graph actually depends on (the default skill plus any skill_id referenced by an agent/classify/guardrails node) is auto-published too — a published workflow can't end up depending on a still-draft skill.
  • Reject — returns it to Rejected status. The API requires a notes field explaining why — missing, empty or whitespace-only notes are refused with HTTP 400; there's no way to reject silently.

The reviewer cannot edit the graph during this phase — only approve or reject. See Review Queue for the full review interface and the optional multi-stage Approval Matrix.

Skills are locked with the workflow​

While a workflow is Staged or Published, the Agent Skills it runs are locked too: its default skill, every skill selected in one of its nodes, and every base skill those inherit from. Changing what such a skill does — system prompt, tools, knowledge bases, reference skills, LLM defaults, input/output schema or base skill, by saving or by rolling back to a version — is refused with HTTP 409, and the message names the workflows involved. Otherwise a reviewer could approve one prompt while another one runs, or a live workflow could change without review.

A locked skill's name, description, tags and status can still be edited. To change its behavior, withdraw or revise every listed workflow to Draft first — or click Version on the skill, change the copy, and select the copy in a draft workflow.

Staged → Draft (Withdraw)​

While a workflow is awaiting review, its owner can click Withdraw in the editor (POST /api/v1/agent-workflows/{id}/revise) to pull it back to Draft — for example to fix something before a reviewer looks at it, or to delete it. Any approval-stage progress is cleared, so a resubmitted workflow starts the review from the beginning. With the agent_developer role only the workflow's owner can withdraw it; admin can withdraw any staged workflow. Reviewers (lifecycle_manager, space_admin) use Reject instead.

Rejected → Draft (Revise)​

After a rejection, the editor clicks Revise. This unlocks the graph and returns it to Draft status so the team can address the reviewer's feedback. Until then the rejected workflow stays exactly as the reviewer saw it — edits are refused with HTTP 409 (Revise it to draft first).

Published → Draft (Revise)​

An admin or space admin can also click Revise on a published workflow to pull it back to Draft for a major revision — the owner/regular editor role that can revise a rejected workflow cannot do this to a published one; that pullback needs space_admin or admin, and the editor only shows the button to them. A version rollback also ends in Draft and follows the same rule.


Lifecycle Actions in the Editor​

The header bar of the editor shows the current status badge and the available action button:

Current statusButton shownWho sees it
DraftSubmit for ReviewOwner / write access
Staged (badge In Review)Approve & Publish / Rejectlifecycle_manager, space_admin, admin
Staged (badge In Review)Awaiting review badge, plus Withdraw for the ownerOther roles
Staged, with an Approval MatrixYour approval needed or In approval (n/total) — opens the Approvals panel; Reject stays available to lifecycle managersStage approvers see Your approval needed
RejectedReviseOwner / write access
PublishedRevisespace_admin, admin only — pulls the workflow back to Draft so it can be edited again (and takes it offline until republished)
Published → Draft (Revise)

Clicking Revise on a published workflow immediately returns it to Draft status — and takes it offline until it's published again: its triggers stop firing, and API runs are refused (HTTP 409, drafts only run in a sandbox). There is no separate "live copy" that keeps running while you edit; you must re-publish (submit, then approve again) to bring it back. Runs already in flight finish normally. To prepare changes without downtime, export or promote the workflow and work on the copy.

Publishing creates a version snapshot

Approving a staged workflow automatically creates a version snapshot of the graph before it goes live. You can roll back to any previous version from the Versioning panel.

Moving a published workflow to another environment

Once a workflow is Published, a Promote to catalog… button appears. It copies the workflow into a different catalog or space as a new Draft — see Promote to catalog.


Running Workflows by Status​

StatusTest runs (editor)Production runs (API)
Draft✅ Owner or admin, in a sandbox catalog/space only — elsewhere the run is refused with HTTP 409❌ Not available
Staged❌ Locked❌ Not available
Rejected❌ Locked until revised❌ Not available
Published✅ All users✅ All users with access

Role Reference​

ActionRequired role
Create a workflowWorkspace > Agent Workflows: Write
Edit graph (Draft status)Workflow owner or Write access
Stage for reviewWorkflow owner or Write access — agent_developer, lifecycle_manager, space_admin, or admin
Approve & Publish / Rejectlifecycle_manager, space_admin, or admin
Withdraw a staged workflow to draftWorkflow owner (agent_developer), or admin
Revise a rejected workflowWorkflow owner or Write access
Revise a published workflowspace_admin or admin only
Run a published workflowWorkflow Run permission

admin additionally has two shortcuts no other role has: staging directly to published (skipping review), and pulling any staged workflow back to draft (an agent_developer can only withdraw their own; reviewers use Reject instead).

See Permissions for configuration details, and Review Queue for the full approve/reject interface and audit log.

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