Quotes & Pricing
A quote is a pricing contract issued before a workflow executes. It defines the model, the agreed price, the success criteria, and the terms under which payment is made.
Quote object
{
"id": "qt_7f3g9k2m1p",
"status": "Active",
"version": "1.0",
"product": "ticket_resolution_v2",
"customerId": "cus_acme_prod_01",
"pricing": {
"model": "fixed",
"amount": 0.12,
"currency": "USD"
},
"successCriteria": {
"type": "all_of",
"criteria": [
{ "type": "exact", "path": "/resolved", "value": true },
{ "type": "numeric_threshold", "path": "/satisfactionScore", "op": ">=", "value": 4.0 }
]
},
"conditions": {
"sla": "30s",
"marginFloor": 0.40,
"disputeWindowSeconds": 3600
},
"expiresAt": "2026-05-22T14:31:54Z",
"createdAt": "2026-05-21T14:31:54Z"
}Pricing models
WeaveOS supports four pricing models. The model determines how the final charged amount relates to the execution outcome.
Fixed
The customer is charged a flat fee regardless of actual execution cost or outcome. Revenue is fully predictable. Risk is carried by the operator — if cost exceeds the fixed price, margin is negative.
{
"model": "fixed",
"amount": 0.20,
"currency": "USD"
}Capped
Charge is limited to a ceiling price. If actual cost is below the cap, the customer is charged actual cost plus a markup. If cost exceeds the cap, the operator absorbs the difference. Suitable for variable-length workflows where you want to give customers a worst-case ceiling.
{
"model": "capped",
"cap": 0.50,
"markupPct": 30,
"currency": "USD"
}Success fee
Charge only applies when the outcome satisfies the defined success criteria. If the workflow fails or the outcome does not meet criteria, the customer is not charged. Aligns incentives strongly but transfers outcome risk to the operator.
{
"model": "success_fee",
"amount": 0.40,
"currency": "USD"
}Hybrid
A base fee is charged regardless of outcome, plus a success bonus when criteria are met. Balances risk sharing between operator and customer. The most flexible model for complex, high-value workflows.
{
"model": "hybrid",
"baseFee": 0.05,
"successBonus": 0.30,
"currency": "USD"
}Success criteria
Success criteria are deterministic validators applied to the workflow's output JSON. They define what a successful outcome looks like. Criteria use JSON Pointer paths (RFC 6901) to reference fields in the outcome object.
exact
Checks that a field equals an exact value.
{ "type": "exact", "path": "/resolved", "value": true }numeric_threshold
Compares a numeric field against a threshold. Supported operators: <, <=, >, >=, ==, !=.
{ "type": "numeric_threshold", "path": "/satisfactionScore", "op": ">=", "value": 4.0 }regex
Matches a string field against a regular expression.
{ "type": "regex", "path": "/resolution", "pattern": "(?i)(resolved|fixed|completed)" }json_schema
Validates the outcome against a JSON Schema.
{
"type": "json_schema",
"schema": {
"type": "object",
"required": ["resolved", "resolution"],
"properties": {
"resolved": { "type": "boolean" },
"resolution": { "type": "string", "minLength": 20 }
}
}
}Boolean composition
Combine multiple criteria with all_of, any_of, or not.
{
"type": "all_of",
"criteria": [
{ "type": "exact", "path": "/resolved", "value": true },
{
"type": "any_of",
"criteria": [
{ "type": "numeric_threshold", "path": "/satisfactionScore", "op": ">=", "value": 4.0 },
{ "type": "exact", "path": "/escalated", "value": false }
]
}
]
}Quote conditions
The conditions block sets operational parameters for the workflow:
| Field | Description |
|---|---|
sla | Maximum allowed execution time. Workflow is flagged if this is exceeded. |
marginFloor | Minimum acceptable margin ratio (0–1). Guardrail triggers if achieved margin drops below this. |
disputeWindowSeconds | How long after settlement a dispute can be raised. Default: 3600s in production. |