View input schema
{
"type": "object",
"properties": {
"task": {
"type": "string",
"description": "The original instruction or question the agent was answering."
},
"agent_output": {
"type": "string",
"description": "The invoice or payment instruction the agent is about to pay, as a JSON string."
},
"evidence": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. Source passages the answer must be grounded in, one string per passage. Without evidence, grounding cannot be checked."
},
"criteria": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. Facts or terms the answer must contain, one per string."
},
"retain": {
"type": "boolean",
"description": "Optional. true stores this call for 24 hours; requires an API key. Default false stores nothing."
},
"share": {
"type": "boolean",
"description": "Optional. false keeps this call out of opt-in data sharing even when the key has sharing on. It cannot turn sharing on."
},
"checks": {
"type": "array",
"maxItems": 8,
"description": "Optional. The worker runs each check. A failed check forces verdict fail. Types: url_contains, json_schema, equals, regex, numeric, onchain, required_fields, types, format, sum, duplicate. duplicate (at most 1, API key only) compares an invoice with ones this key recorded earlier and stores keyed fingerprints only when store is true. At most 3 url_contains checks. Local checks run first; if one fails, no model is called and next_step says what to fix.",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"paths"
],
"additionalProperties": false,
"properties": {
"type": {
"const": "required_fields"
},
"paths": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
}
}
}
},
{
"type": "object",
"required": [
"type",
"fields"
],
"additionalProperties": false,
"properties": {
"type": {
"const": "types"
},
"fields": {
"type": "object",
"minProperties": 1,
"maxProperties": 50,
"additionalProperties": {
"enum": [
"string",
"number",
"integer",
"boolean",
"object",
"array",
"null"
]
}
}
}
},
{
"type": "object",
"required": [
"type",
"field",
"format"
],
"additionalProperties": false,
"properties": {
"type": {
"const": "format"
},
"field": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"format": {
"enum": [
"email",
"iso_date",
"iso_datetime",
"url",
"uuid",
"e164_phone",
"currency_code",
"integer_string"
]
}
}
},
{
"type": "object",
"required": [
"type",
"parts",
"total"
],
"additionalProperties": false,
"properties": {
"type": {
"const": "sum"
},
"parts": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
}
},
"total": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"tolerance": {
"type": "number",
"minimum": 0,
"maximum": 1000000,
"default": 0.0001
}
}
},
{
"type": "object",
"required": [
"type",
"vendor_path",
"invoice_id_path",
"amount_path"
],
"additionalProperties": false,
"description": "Duplicate invoice check (needs an API key, at most 1 per call). Compares this invoice with ones the same key recorded earlier. Stores keyed HMAC fingerprints only, and only when store is true.",
"properties": {
"type": {
"const": "duplicate"
},
"vendor_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"invoice_id_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"amount_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"currency_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"date_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path to a YYYY-MM-DD invoice date. Enables the same vendor, amount and date rule."
},
"window_days": {
"type": "integer",
"minimum": 0,
"maximum": 30,
"default": 3
},
"store": {
"type": "boolean",
"default": false,
"description": "Record this invoice's fingerprints so later calls can match it."
},
"retain_days": {
"type": "integer",
"minimum": 1,
"maximum": 400,
"default": 180
}
}
},
{
"type": "object",
"required": [
"type"
],
"description": "Existing types, unchanged: url_contains, json_schema, equals, regex, numeric, onchain.",
"properties": {
"type": {
"enum": [
"url_contains",
"json_schema",
"equals",
"regex",
"numeric",
"onchain"
]
}
}
}
]
}
},
"agent_id": {
"type": "string",
"maxLength": 64,
"pattern": "^[A-Za-z0-9._:-]{1,64}$",
"description": "Optional tag for the agent making this call. 1 to 64 characters: letters, digits, and . _ : -. This is not the per-answer agent_id on a consensus answer."
},
"version": {
"type": "string",
"maxLength": 64,
"description": "Optional version tag for that agent. At most 64 characters."
},
"mode": {
"type": "string",
"enum": [
"blocking",
"advisory"
],
"description": "Optional. blocking (the default) is today's behaviour. advisory computes the same verdict, checks, next_step and receipt, then adds mode, decision_owner human, recommended_action (approve, review or return) and a notice. The receipt signs mode advisory as schema_version 5. Same price."
},
"duplicate": {
"type": "object",
"additionalProperties": false,
"description": "The duplicate check: dot paths into agent_output for vendor, invoice id and amount, plus optional currency_path, date_path, window_days, store and retain_days. store true records this invoice's keyed fingerprints so later calls can match it.",
"required": [
"vendor_path",
"invoice_id_path",
"amount_path"
],
"properties": {
"type": {
"const": "duplicate"
},
"vendor_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"invoice_id_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"amount_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"currency_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"date_path": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Dot path to a YYYY-MM-DD invoice date. Enables the same vendor, amount and date rule."
},
"window_days": {
"type": "integer",
"minimum": 0,
"maximum": 30,
"default": 3
},
"store": {
"type": "boolean",
"default": false,
"description": "Record this invoice's fingerprints so later calls can match it."
},
"retain_days": {
"type": "integer",
"minimum": 1,
"maximum": 400,
"default": 180
}
}
}
},
"required": [
"task",
"agent_output",
"duplicate"
],
"additionalProperties": false
}