---
title: "model_deployment"
description: "Safely deploy an ML model to production with validation, policy checks, and rollback capability."
canonical: "https://acs.synapti.ai/workflows/model-deployment/"
last_updated: "2026-11-16T03:28:14Z"
---

# Safely deploy an ML model to production with validation, policy checks, and rollback capability.

Generated from [schemas/workflow_catalog.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/workflow_catalog.yaml) at commit 18c38b74ac21.

- Workflow id: `model_deployment`
- Risk: high
- Catalog: reference workflows
- Declares Standard 1.1.0
- Steps: 8

Model deployment workflow inspired by OASF Category 12 (DevOps/MLOps).
Validates model artifacts, checks deployment policies, creates a rollback
checkpoint, executes deployment scripts, verifies deployment success,
measures model performance post-deployment, rolls back to the checkpoint
when verification fails, and records the deployment event, including
whether it was rolled back.

**Figure: Steps of model_deployment: 8 steps, checkpoint at step 3, rollback at step 7.** Read top to bottom: step 4 makes the change after the checkpoint at step 3; steps 4, 6 and 7 have gates; steps 4 and 5 say what to do on failure; and the highest step risk is high, at step 4.

| # | Capability | Layer | Role | Gates | On failure | Reads from | Risk |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | `constrain` | VERIFY | verify |  |  |  | low |
| 2 | `constrain` | VERIFY | verify |  |  |  | low |
| 3 | `checkpoint` | VERIFY | checkpoint |  |  |  | medium |
| 4 | `execute` | EXECUTE | mutating | stop, stop, stop | rollback | 1, 2, 3 | high |
| 5 | `verify` | VERIFY | verify |  | rollback |  | medium |
| 6 | `measure` | UNDERSTAND |  | skip |  | 5 | low |
| 7 | `rollback` | VERIFY | rollback | skip |  | 3, 5 | medium |
| 8 | `audit` | VERIFY |  |  |  | 4, 5, 6, 7 | low |

## Inputs

**Figure: Inputs of model_deployment.** 2 inputs, 2 required (filled pin) and 0 optional (outlined pin), with 6 named fields inside them.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `model_package` | object | Yes | The ML model package to deploy |
| `model_package.model_id` | string | No |  |
| `model_package.version` | string | No |  |
| `model_package.artifacts` | object | No |  |
| `deployment_config` | object | Yes | Deployment configuration including target environment and policies |
| `deployment_config.environment` | string | No |  |
| `deployment_config.deploy_command` | string | No |  |
| `deployment_config.policies` | object | No |  |

## Steps

1. [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md): Check model artifacts (weights, config, schema compatibility) before deployment. Stores `artifact_constraints_out`. (risk low)
2. [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md): Check deployment policies (approval gates, resource limits, compliance). Stores `constrain_out`. (risk low)
3. [`checkpoint`](https://acs.synapti.ai/capabilities/checkpoint/index.md): Save rollback point before deployment begins. Stores `checkpoint_out`. (risk medium, changes state)
4. [`execute`](https://acs.synapti.ai/capabilities/execute/index.md): Run deployment scripts to push model to production. Stores `execute_out`. (risk high, changes state, needs a checkpoint before it, needs approval)
   - Gate: when `${artifact_constraints_out.compliant} == false`, stop: Deployment blocked by invalid model artifacts.
   - Gate: when `${constrain_out.compliant} == false`, stop: Deployment blocked by policy violation.
   - Gate: when `${checkpoint_out.checkpoint_id} == null`, stop: No checkpoint created. Do not deploy.
5. [`verify`](https://acs.synapti.ai/capabilities/verify/index.md): Validate deployment success (health checks, endpoint availability). Stores `verify_deploy_out`. (risk medium)
6. [`measure`](https://acs.synapti.ai/capabilities/measure/index.md): Check model performance metrics post-deployment. Stores `measure_out`. (risk low)
   - Gate: when `${verify_deploy_out.passed} == false`, skip: Deployment verification failed. Skipping performance check.
7. [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md): If verification fails, revert deployment to checkpoint. Stores `rollback_out`. (risk medium, changes state, needs a checkpoint before it)
   - Gate: when `${verify_deploy_out.passed} == true`, skip: Deployment verified successfully. No rollback needed.
8. [`audit`](https://acs.synapti.ai/capabilities/audit/index.md): Record deployment event with full provenance, including any rollback. Stores `audit_out`. (risk low)

## Data flow

**Figure: Which step reads which stored output.** 4 steps read the output of earlier steps, 10 reads in all; step 8 (audit) reads the most, from 4 steps.

- Step 4 reads from steps 1, 2 and 3.
- Step 6 reads from step 5.
- Step 7 reads from steps 3 and 5.
- Step 8 reads from steps 4, 5, 6 and 7.

## Risk

Declared, computed and highest step risk are all high; the highest-risk step is step 4 (execute). The step map above gives each step's risk.

## Success criteria

- Model artifacts validated
- Deployment policies satisfied
- Rollback checkpoint created
- Deployment executed successfully
- Post-deployment verification passed
- Performance metrics within thresholds
- Deployment event recorded

## Validate it

```sh
python tools/validate_workflows.py --catalog schemas/workflow_catalog.yaml
```

## Workflow YAML

```yaml
model_deployment:
  goal: Safely deploy an ML model to production with validation, policy checks, and rollback capability.
  risk: high
  description: |
    Model deployment workflow inspired by OASF Category 12 (DevOps/MLOps).
    Validates model artifacts, checks deployment policies, creates a rollback
    checkpoint, executes deployment scripts, verifies deployment success,
    measures model performance post-deployment, rolls back to the checkpoint
    when verification fails, and records the deployment event, including
    whether it was rolled back.
  success:
  - Model artifacts validated
  - Deployment policies satisfied
  - Rollback checkpoint created
  - Deployment executed successfully
  - Post-deployment verification passed
  - Performance metrics within thresholds
  - Deployment event recorded
  steps:
  - capability: constrain
    purpose: Check model artifacts (weights, config, schema compatibility) before deployment.
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: 5m
    retry: null
    store_as: artifact_constraints_out
    input_bindings:
      target: ${model_package}
      constraints:
      - artifact_integrity
      - schema_compatibility
      - version_consistency
  - capability: constrain
    purpose: Check deployment policies (approval gates, resource limits, compliance).
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: constrain_out
    input_bindings:
      target: ${deployment_config}
      constraints:
      - deployment_policy
      - resource_limits
      - compliance_requirements
  - capability: checkpoint
    purpose: Save rollback point before deployment begins.
    risk: medium
    mutation: true
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: checkpoint_out
    input_bindings:
      scope: "${deployment_config.environment}"
    failure_modes: []
  - capability: execute
    purpose: Run deployment scripts to push model to production.
    risk: high
    mutation: true
    requires_checkpoint: true
    requires_approval: true
    timeout: 5m
    retry: null
    store_as: execute_out
    input_bindings:
      code: ${deployment_config.deploy_command}
    gates:
    - when: ${artifact_constraints_out.compliant} == false
      action: stop
      message: Deployment blocked by invalid model artifacts.
    - when: ${constrain_out.compliant} == false
      action: stop
      message: Deployment blocked by policy violation.
    - when: ${checkpoint_out.checkpoint_id} == null
      action: stop
      message: No checkpoint created. Do not deploy.
    failure_modes:
    - condition: Deployment script fails or times out
      on_error: [R401, R402]
      action: rollback
      recovery: Roll back to the checkpoint taken before the deployment; the run then ends with the execute step's error, and the audit step does not run; the run record the host keeps (STANDARD v1.2 §5.19.8) records the failure.
  - capability: verify
    purpose: Validate deployment success (health checks, endpoint availability).
    risk: medium
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: 5m
    retry:
      max: 3
      backoff: exponential
    store_as: verify_deploy_out
    input_bindings:
      conditions: ["health_checks_pass", "endpoint_available"]
    # A FAIL verdict is handled by the rollback step below, not by a failure
    # mode: verify itself succeeded, and the run goes on to roll back and audit.
    failure_modes:
    - condition: Health checks could not run (timed out or failed after their retries)
      on_error: [R401, R402]
      action: rollback
      recovery: Roll the deployment back to the checkpoint so no unverified deployment stays in place; the run then ends with the verify step's error, and the audit step does not run; the run record the host keeps (STANDARD v1.2 §5.19.8) records the failure.
  - capability: measure
    purpose: Check model performance metrics post-deployment.
    domain: performance
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: measure_out
    input_bindings:
      target: "${verify_deploy_out.results: array<object>}"
      metric: performance
    gates:
    - when: ${verify_deploy_out.passed} == false
      action: skip
      message: Deployment verification failed. Skipping performance check.
    failure_modes: []
  - capability: rollback
    purpose: If verification fails, revert deployment to checkpoint.
    risk: medium
    mutation: true
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: rollback_out
    input_bindings:
      checkpoint_id: "${checkpoint_out.checkpoint_id}"
    gates:
    - when: ${verify_deploy_out.passed} == true
      action: skip
      message: Deployment verified successfully. No rollback needed.
    failure_modes: []
  - capability: audit
    purpose: Record deployment event with full provenance, including any rollback.
    risk: low
    mutation: false
    requires_checkpoint: false
    requires_approval: false
    timeout: null
    retry: null
    store_as: audit_out
    input_bindings:
      event:
        type: model_deployment
        model: ${model_package.model_id}
        version: ${model_package.version}
        deployment_result: "${execute_out.result: object}"
        verification: ${verify_deploy_out.passed}
        performance: ${measure_out.value}
        rolled_back: "${rollback_out.restored}"
    failure_modes: []
  risk_propagation:
    strategy: max_step_risk
    computed_risk: high
  data_flow:
    pattern: step_outputs_are_addressable
    rule: Each step output is stored under store_as and may be referenced by later steps.
  inputs:
    model_package:
      type: object
      required: true
      description: The ML model package to deploy
      properties:
        model_id:
          type: string
        version:
          type: string
        artifacts:
          type: object
    deployment_config:
      type: object
      required: true
      description: Deployment configuration including target environment and policies
      properties:
        environment:
          type: string
        deploy_command:
          type: string
        policies:
          type: object
```
