Independent pass/fail/retry judge and false-consensus check for agent outputs, with signed receipts.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Optional. Bearer API key (free key: 100 calls per UTC day). Omit it to pay $0.005 USDC per call with x402.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Return the x402 payment requirements for a Starter ($40, 10000 calls) or Builder ($175, 50000 calls) prepaid pack, plus how to pay with USDC on Base or Solana. pack is starter or builder. This call does not move funds and does not require a key or a payment. POST /v1/packs/{pack}/buy with PAYMENT-SIGNATURE to pay. Pay with PayPal at POST /v1/packs/checkout.
starter ($40, 10000 calls) or builder ($175, 50000 calls).
Tool list last changed Oct 25, 2026.
Return the x402 payment requirements for a Starter ($40, 10000 calls) or Builder ($175, 50000 calls) prepaid pack, plus how to pay with USDC on Base or Solana. pack is starter or builder. This call does not move funds and does not require a key or a payment. POST /v1/packs/{pack}/buy with PAYMENT-SIGNATURE to pay. Pay with PayPal at POST /v1/packs/checkout.
| Argument | Type | Description |
|---|---|---|
| pack* | string | starter ($40, 10000 calls) or builder ($175, 50000 calls). |
{
"type": "object",
"required": [
"pack"
],
"properties": {
"pack": {
"enum": [
"starter",
"builder"
],
"type": "string",
"description": "starter ($40, 10000 calls) or builder ($175, 50000 calls)."
}
},
"additionalProperties": false
}Duplicate invoice check before an agent pays. Same as judge with one duplicate check: it compares this invoice with the invoices this API key recorded earlier and also judges it. Call it before an agent pays or approves an invoice or payment instruction. Inputs: the judge inputs (task, agent_output as the invoice JSON, evidence, criteria, checks, mode, tags) plus duplicate {vendor_path, invoice_id_path, amount_path, currency_path?, date_path?, window_days?, store?, retain_days?}. Returns the judge result plus duplicate.status (unique, duplicate, possible_duplicate, replay or not_checked). On duplicate or possible_duplicate, next_step.action is escalate: do not pay. Needs Authorization: Bearer, because fingerprints are kept per key; only keyed HMAC fingerprints are stored, and only when store is true. Cost: 1 call, the same price as judge. Without a key or payment, tools/call is HTTP 200 with isError true and the x402 PaymentRequirements in structuredContent; an x402 payment without a key returns key_required and is not settled.
| Argument | Type | Description |
|---|---|---|
| mode | string | 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. |
| task* | string | The original instruction or question the agent was answering. |
| share | boolean | Optional. false keeps this call out of opt-in data sharing even when the key has sharing on. It cannot turn sharing on. |
| checks | array | 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. |
| retain | boolean | Optional. true stores this call for 24 hours; requires an API key. Default false stores nothing. |
| version | string | Optional version tag for that agent. At most 64 characters. |
| agent_id | string | 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. |
| criteria | array | Optional. Facts or terms the answer must contain, one per string. |
False-consensus check for 2 to 16 answers to the same task. It scores how the answers agree and flags agreement that looks copied or too thin to trust. Screwtape is not tied to the agent framework or the model that wrote the answers. Call it when several agents, samples or tools answered the same question and you are about to accept the majority. Do NOT call it with a single answer (use judge), with answers to different tasks, or as proof that an answer is correct: high agreement is not evidence. Inputs: task, answers (2 to 16 objects {agent_id?: string, output: string}), optional evidence (a string or an array of strings, used when scoring), retain, and optional call-level agent_id and version tags. The call-level agent_id is not the per-answer agent_id. Returns: consensus_answer, agreement_score, false_consensus_risk (low, medium or high), reasons, clusters, engine, request_id, retention, the tags when sent, and receipt when signing is configured. In that receipt, verdict is false_consensus_risk and score is agreement_score. If the risk is medium or high, verify consensus_answer with judge before using it. next_step.action is pass for low risk and escalate otherwise. Cost: 1 call. A free key covers 100 calls per UTC day; without a key, pay $0.005 USDC on Base or Solana per call with x402.
| Argument | Type | Description |
|---|---|---|
| mode | string | 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. |
| task* | string | The question all answers respond to. |
| share | boolean | Optional. false keeps this call out of opt-in data sharing even when the key has sharing on. It cannot turn sharing on. |
Create a free Screwtape.ai API key (100 calls per UTC day) with no human approval. Call it only when no Screwtape key is configured and you can compute SHA-256 with a code tool, because the proof of work must be computed exactly, not guessed. Do NOT call it when a key already exists, to get more quota (it is limited to 5 keys per IP per hour and per UTC day), or without a valid pow_nonce. A missing nonce returns an error that describes the challenge. Inputs: pow_nonce (required string matching ^[A-Za-z0-9_-]{8,64}$; SHA-256 of the UTF-8 string screwtape-signup-v1:<current UTC YYYY-MM-DD>:<nonce> must start with 12 zero bits, which is 3 hex zeros), email (optional), name (optional, at most 80 characters). Returns: api_key (shown once; store it securely and send it as Authorization: Bearer), key metadata and request_id. Only the key's SHA-256 hash is stored. Cost: free. Needs no key and no payment.
| Argument | Type | Description |
|---|---|---|
| name | string | Optional agent or client name, at most 80 characters. |
| string | Optional. Omit it to store no email. | |
| pow_nonce* | string | Required. SHA-256 of the UTF-8 string screwtape-signup-v1:YYYY-MM-DD:<nonce> must have 12 leading zero bits. Nonce matches ^[A-Za-z0-9_-]{8,64}$. YYYY-MM-DD is the UTC day. |
| data_sharing | boolean | Optional, off by default. Only true turns on opt-in data sharing for the new key: redacted samples of its calls are kept 90 days. Turn it off anytime with PATCH /v1/keys/me/data-sharing. See https://screwtape.ai/privacy/#opt-in-data-sharing. |
{
"type": "object",
"required": [
"pow_nonce"
],
"properties": {
"name": {
"type": "string",
"maxLength": 80,
"description": "Optional agent or client name, at most 80 characters."
},
"email": {
"type": "string",
"description": "Optional. Omit it to store no email."
},
"pow_nonce": {
"type": "string",
"description": "Required. SHA-256 of the UTF-8 string screwtape-signup-v1:YYYY-MM-DD:<nonce> must have 12 leading zero bits. Nonce matches ^[A-Za-z0-9_-]{8,64}$. YYYY-MM-DD is the UTC day."
},
"data_sharing": {
"type": "boolean",
"description": "Optional, off by default. Only true turns on opt-in data sharing for the new key: redacted samples of its calls are kept 90 days. Turn it off anytime with PATCH /v1/keys/me/data-sharing. See https://screwtape.ai/privacy/#opt-in-data-sharing."
}
},
"additionalProperties": false
}An independent pass/fail/retry verdict on ONE agent output. Call it before you return, store or act on a draft answer, especially when you have the evidence the answer should be based on. Do NOT call it to look up facts (it does no web search and only checks against the evidence you pass), to compare several agents' answers (use consensus), or for offline evaluation over a dataset. Inputs: task, agent_output, evidence, criteria, retain, and optional agent_id and version tags. Returns: verdict, score, reasons, engine, next_step, request_id, retention, the tags when sent, and receipt when signing is configured. On pass, use the output. On retry, revise using reasons and call again, at most 2 or 3 times. On fail, stop. Optional checks run first; on failure you get next_step.hint saying what to fix. Branch on next_step.action (pass, retry or escalate). Cost: 1 call. A free key covers 100 calls per UTC day; without a key, pay $0.005 USDC on Base or Solana per call with x402. Without a key or payment, tools/call is HTTP 200 with isError true and the x402 PaymentRequirements in structuredContent. Retry with params._meta['x402/payment'].
| Argument | Type | Description |
|---|---|---|
| mode | string | 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. |
| task* | string | The original instruction or question the agent was answering. |
| share | boolean | Optional. false keeps this call out of opt-in data sharing even when the key has sharing on. It cannot turn sharing on. |
Publish a signed receipt you own so a public page and a Screwtape Verified badge can link to that one verdict. Call it when you want to show that a specific output received a specific verdict. Do NOT call it to certify an agent in general: the page says this output received this verdict at this time, and it is not a general safety certification of the agent. Nothing is public until this call. Inputs: receipt_id (required), include_content (optional boolean, default false; true stores and shows the task and agent output only if that call was retained), label (optional, at most 80 characters), unpublish (optional boolean; true removes the public page). Returns public_url, badge_svg_url, embed_html, and embed_markdown. Requires the API key that owns the receipt. It does not accept x402 payment. Cost: free.
| Argument | Type | Description |
|---|---|---|
| label | string | Optional label, at most 80 characters. |
| unpublish | boolean | true removes the public page and the badge. |
| receipt_id* | string | Receipt id from a judge or consensus response this key owns. |
| include_content | boolean | Default false. true copies the retained task and agent output onto the public page. |
{
"type": "object",
"required": [
"receipt_id"
],
"properties": {
"label": {
"type": "string",
"maxLength": 80,
"description": "Optional label, at most 80 characters."
},
"unpublish": {
"type": "boolean",
"description": "true removes the public page and the badge."
},
"receipt_id": {
"type": "string",
"description": "Receipt id from a judge or consensus response this key owns."
},
"include_content": {
"type": "boolean",
"description": "Default false. true copies the retained task and agent output onto the public page."
}
},
"additionalProperties": false
}| evidence |
| array |
| Optional. Source passages the answer must be grounded in, one string per passage. Without evidence, grounding cannot be checked. |
| duplicate* | object | 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. |
| agent_output* | string | The invoice or payment instruction the agent is about to pay, as a JSON string. |
{
"type": "object",
"required": [
"task",
"agent_output",
"duplicate"
],
"properties": {
"mode": {
"enum": [
"blocking",
"advisory"
],
"type": "string",
"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."
},
"task": {
"type": "string",
"description": "The original instruction or question the agent was answering."
},
"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",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"paths"
],
"properties": {
"type": {
"const": "required_fields"
},
"paths": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"maxItems": 50,
"minItems": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"fields"
],
"properties": {
"type": {
"const": "types"
},
"fields": {
"type": "object",
"maxProperties": 50,
"minProperties": 1,
"additionalProperties": {
"enum": [
"string",
"number",
"integer",
"boolean",
"object",
"array",
"null"
]
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"field",
"format"
],
"properties": {
"type": {
"const": "format"
},
"field": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"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"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"parts",
"total"
],
"properties": {
"type": {
"const": "sum"
},
"parts": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"maxItems": 20,
"minItems": 1
},
"total": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"tolerance": {
"type": "number",
"default": 0.0001,
"maximum": 1000000,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"vendor_path",
"invoice_id_path",
"amount_path"
],
"properties": {
"type": {
"const": "duplicate"
},
"store": {
"type": "boolean",
"default": false,
"description": "Record this invoice's fingerprints so later calls can match it."
},
"date_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path to a YYYY-MM-DD invoice date. Enables the same vendor, amount and date rule."
},
"amount_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"retain_days": {
"type": "integer",
"default": 180,
"maximum": 400,
"minimum": 1
},
"vendor_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"window_days": {
"type": "integer",
"default": 3,
"maximum": 30,
"minimum": 0
},
"currency_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"invoice_id_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
}
},
"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.",
"additionalProperties": false
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"url_contains",
"json_schema",
"equals",
"regex",
"numeric",
"onchain"
]
}
},
"description": "Existing types, unchanged: url_contains, json_schema, equals, regex, numeric, onchain."
}
]
},
"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."
},
"retain": {
"type": "boolean",
"description": "Optional. true stores this call for 24 hours; requires an API key. Default false stores nothing."
},
"version": {
"type": "string",
"maxLength": 64,
"description": "Optional version tag for that agent. At most 64 characters."
},
"agent_id": {
"type": "string",
"pattern": "^[A-Za-z0-9._:-]{1,64}$",
"maxLength": 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."
},
"criteria": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. Facts or terms the answer must contain, one per 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."
},
"duplicate": {
"type": "object",
"required": [
"vendor_path",
"invoice_id_path",
"amount_path"
],
"properties": {
"type": {
"const": "duplicate"
},
"store": {
"type": "boolean",
"default": false,
"description": "Record this invoice's fingerprints so later calls can match it."
},
"date_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path to a YYYY-MM-DD invoice date. Enables the same vendor, amount and date rule."
},
"amount_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"retain_days": {
"type": "integer",
"default": 180,
"maximum": 400,
"minimum": 1
},
"vendor_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"window_days": {
"type": "integer",
"default": 3,
"maximum": 30,
"minimum": 0
},
"currency_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"invoice_id_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
}
},
"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.",
"additionalProperties": false
},
"agent_output": {
"type": "string",
"description": "The invoice or payment instruction the agent is about to pay, as a JSON string."
}
},
"additionalProperties": false
}| retain | boolean | Optional. true stores this call for 24 hours; requires an API key. Default false. |
| answers* | array | 2 to 16 answers. Each is {agent_id (optional, string), output (string)}. Use one entry per independent agent or sample. |
| version | string | Optional version tag for that agent. At most 64 characters. |
| agent_id | string | 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. |
| evidence | any | Optional passages the agreed answer should be grounded in. A string is one passage. An array holds up to 20 passages of 4000 characters. Used when scoring false-consensus risk. |
{
"type": "object",
"required": [
"task",
"answers"
],
"properties": {
"mode": {
"enum": [
"blocking",
"advisory"
],
"type": "string",
"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."
},
"task": {
"type": "string",
"description": "The question all answers respond to."
},
"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."
},
"retain": {
"type": "boolean",
"description": "Optional. true stores this call for 24 hours; requires an API key. Default false."
},
"answers": {
"type": "array",
"items": {
"type": "object",
"required": [
"output"
],
"properties": {
"output": {
"type": "string",
"description": "That agent's answer."
},
"agent_id": {
"type": "string",
"description": "Optional name of the agent or sample that produced this answer."
}
}
},
"maxItems": 16,
"minItems": 2,
"description": "2 to 16 answers. Each is {agent_id (optional, string), output (string)}. Use one entry per independent agent or sample."
},
"version": {
"type": "string",
"maxLength": 64,
"description": "Optional version tag for that agent. At most 64 characters."
},
"agent_id": {
"type": "string",
"pattern": "^[A-Za-z0-9._:-]{1,64}$",
"maxLength": 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."
},
"evidence": {
"oneOf": [
{
"type": "string",
"maxLength": 4000
},
{
"type": "array",
"items": {
"type": "string",
"maxLength": 4000
},
"maxItems": 20
}
],
"description": "Optional passages the agreed answer should be grounded in. A string is one passage. An array holds up to 20 passages of 4000 characters. Used when scoring false-consensus risk."
}
},
"additionalProperties": false
}| checks |
| array |
| 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. |
| retain | boolean | Optional. true stores this call for 24 hours; requires an API key. Default false stores nothing. |
| version | string | Optional version tag for that agent. At most 64 characters. |
| agent_id | string | 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. |
| criteria | array | Optional. Facts or terms the answer must contain, one per string. |
| evidence | array | Optional. Source passages the answer must be grounded in, one string per passage. Without evidence, grounding cannot be checked. |
| agent_output* | string | The agent's draft answer to check. Pass JSON as a string. |
{
"type": "object",
"required": [
"task",
"agent_output"
],
"properties": {
"mode": {
"enum": [
"blocking",
"advisory"
],
"type": "string",
"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."
},
"task": {
"type": "string",
"description": "The original instruction or question the agent was answering."
},
"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",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"paths"
],
"properties": {
"type": {
"const": "required_fields"
},
"paths": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"maxItems": 50,
"minItems": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"fields"
],
"properties": {
"type": {
"const": "types"
},
"fields": {
"type": "object",
"maxProperties": 50,
"minProperties": 1,
"additionalProperties": {
"enum": [
"string",
"number",
"integer",
"boolean",
"object",
"array",
"null"
]
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"field",
"format"
],
"properties": {
"type": {
"const": "format"
},
"field": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"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"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"parts",
"total"
],
"properties": {
"type": {
"const": "sum"
},
"parts": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"maxItems": 20,
"minItems": 1
},
"total": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"tolerance": {
"type": "number",
"default": 0.0001,
"maximum": 1000000,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"vendor_path",
"invoice_id_path",
"amount_path"
],
"properties": {
"type": {
"const": "duplicate"
},
"store": {
"type": "boolean",
"default": false,
"description": "Record this invoice's fingerprints so later calls can match it."
},
"date_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path to a YYYY-MM-DD invoice date. Enables the same vendor, amount and date rule."
},
"amount_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"retain_days": {
"type": "integer",
"default": 180,
"maximum": 400,
"minimum": 1
},
"vendor_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"window_days": {
"type": "integer",
"default": 3,
"maximum": 30,
"minimum": 0
},
"currency_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
},
"invoice_id_path": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"description": "Dot path into the output JSON, at most 8 segments, e.g. invoice.total or items.0.id."
}
},
"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.",
"additionalProperties": false
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"url_contains",
"json_schema",
"equals",
"regex",
"numeric",
"onchain"
]
}
},
"description": "Existing types, unchanged: url_contains, json_schema, equals, regex, numeric, onchain."
}
]
},
"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."
},
"retain": {
"type": "boolean",
"description": "Optional. true stores this call for 24 hours; requires an API key. Default false stores nothing."
},
"version": {
"type": "string",
"maxLength": 64,
"description": "Optional version tag for that agent. At most 64 characters."
},
"agent_id": {
"type": "string",
"pattern": "^[A-Za-z0-9._:-]{1,64}$",
"maxLength": 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."
},
"criteria": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. Facts or terms the answer must contain, one per 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."
},
"agent_output": {
"type": "string",
"description": "The agent's draft answer to check. Pass JSON as a string."
}
},
"additionalProperties": false
}