Classify a confirmation message as submitted, pending, reserved or completed from caller or default phrases
Reads a confirmation page, email or API message and decides which state it states: submitted, pending, reserved or completed, using phrase lists the caller supplies (preferred, because wording is provider-specific) plus an optional default English list. Matches are whole-word, case- and typography-insensitive, returned with offsets in UTF-16, code points, UTF-8 bytes and graphemes, and a match inside a negation scope ('not yet confirmed') is ignored and reported as negated. Two different states matched at once are a conflict and return unknown unless the caller gives a precedence order. Rule-based; it reads the words, it does not verify that anything actually happened at the provider.
What you get
Stops an agent treating 'received, pending review' as 'done'. 20,000 characters per $0.005 call.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/confirmation-state. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/confirmation-state \
-H 'content-type: application/json' \
-d '{"text":"Thank you. Your order has been submitted and is pending review.","precedence":["completed","reserved","pending","submitted"]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
text | string; length 1..20000 | yes | Confirmation text. |
rules | array<object>; max 20 items | no | Caller phrase lists; with these present the defaults are off unless useDefaults is true. |
useDefaults | boolean | no | Include the default English phrases. Default true only when rules is absent. |
precedence | array<string; one of "submitted", "pending", "reserved", "completed">; max 4 items | no | When several states match, the first one listed wins. Without it a conflict is unknown. |
Example request body
{
"text": "Thank you. Your order has been submitted and is pending review.",
"precedence": [
"completed",
"reserved",
"pending",
"submitted"
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
state | string; one of "submitted", "pending", "reserved", "completed", "unknown" | no | |
matches | array<object>; max 200 items | no | |
resolvedBy | string; one of "single-state", "precedence" | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the context-evidence-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent