Documentation / Advanced

Reserve before spending

A workflow budget limits execution resources. It is separate from a subscription price or an AWS estimate.

Set a hard ceiling

Hard budgets reserve bounded exposure before dispatch, settle trusted usage once, and release unused reservation. Advisory budgets report overruns after work; they are not hard ceilings. Unknown/unbounded exposure cannot promise a hard maximum.

json
{
  "resource": "model_cost",
  "unit": "usd",
  "limit": "5.00",
  "enforcement": "hard",
  "maxExposurePerOp": "0.50",
  "violation": "pause"
}
Complete example · JSON / YAML

JSON

json
{
  "name": "advanced-budgets",
  "version": "1.0.0",
  "lanes": {
    "inline": {
      "mode": "sync_lambda",
      "target": "lambda://local-inline"
    }
  },
  "phases": {
    "work": {
      "service": "hello",
      "lane": "inline",
      "scope": "root",
      "terminal": true,
      "controls": {
        "budget": "research"
      }
    }
  },
  "controls": {
    "policyVersion": 1,
    "budgets": [
      {
        "id": "research",
        "resource": "model_cost",
        "unit": "usd",
        "limit": "5.00",
        "enforcement": "hard",
        "maxExposurePerOp": "0.50",
        "scope": "workflow_run",
        "reset": "operator_amendment_only",
        "violation": "pause"
      }
    ]
  }
}

YAML

yaml
name: advanced-budgets
version: 1.0.0
lanes:
  inline:
    mode: sync_lambda
    target: lambda://local-inline
phases:
  work:
    service: hello
    lane: inline
    scope: root
    terminal: true
    controls:
      budget: research
controls:
  policyVersion: 1
  budgets:
    - id: research
      resource: model_cost
      unit: usd
      limit: "5.00"
      enforcement: hard
      maxExposurePerOp: "0.50"
      scope: workflow_run
      reset: operator_amendment_only
      violation: pause

Download JSON · YAML

shell
rippflow controls validate advanced-budgets.workflow.yaml --json

Expected: ok: true. This checks the contract; deployment/enforcement is separate.

Choose scope and reset rules

Policies can scope to organization, tenant, project, definition, run, phase, loop, child workflow or tool invocation. Reset modes include never, per-phase, per-iteration and operator amendment. Bind a phase to its named budget with controls.budget.

Meters cover tokens, calls, external requests, iterations, compute seconds and custom units. Currency uses fixed-point micro-units; quote decimal amounts to avoid ambiguity.

Inspect before increasing a budget

Inspect usage/violations and the governing policy digest. A budget amendment is an authorized, audited operation; a handler cannot raise its own allowance. Untrusted handler usage is not a trusted provider/engine receipt.

shell
rippflow controls usage EXECUTION_ID --json
rippflow controls violations EXECUTION_ID --json
Verified sources

Checked 2026-11-05.

Let's talk

Contact Rippflow

Tell us about your workflows, deployment or pricing.

We'll reply to your email.

Search docs

Search workflows, handlers and operations.