# WritersLogic Confirmation State Classifier

> WritersLogic Confirmation State Classifier is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Classifies a confirmation text (page, email, or API message) into one of four states—submitted, pending, reserved, or completed—using caller-supplied or default English phrase lists, with negation detection and conflict resolution.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/confirmation-state?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-confirmation-state-classifier-ef2c7983
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3XbSS2sy5ryxSe6V5dZ40

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-confirmation-state-classifier-ef2c7983 -d '<json body>'
```

Example prompt: Parse this hotel booking confirmation email and tell me whether it says submitted, pending, reserved, or completed — use these phrases to detect each state: submitted=['your request has been received'], pending=['awaiting confirmation','under review'], reserved=['your reservation is held'], completed=['booking confirmed','you're all set']. If two states match at once, give precedence to completed, then reserved.

## When to prefer this

Use this endpoint when an AI agent needs to interpret a provider-specific confirmation message (email, page, API response) and extract a canonical booking/order state without relying on an LLM's probabilistic judgment. It is especially valuable when the provider's exact wording is known and can be supplied as phrase rules, when negation handling (e.g. 'not yet confirmed') is important for correctness, and when byte-level match offsets are needed for downstream processing. Prefer it over general-purpose LLM classification when determinism, auditability, and rule transparency matter.

## Known failure modes

- Text is empty or exceeds 20,000 characters — validation error
- Phrase lists contain more than 30 phrases per state or more than 20 rule entries — validation error
- Two states matched simultaneously with no precedence provided — returns unknown with conflict details
- Match found inside negation scope (e.g. 'not yet confirmed') — reported as negated and excluded from state decision
- No phrases match at all — returns unknown with no match details
- Caller forgets to set useDefaults:true alongside custom rules — default English phrases are not applied

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

Returns the detected state (submitted, pending, reserved, completed, or unknown if conflicting without precedence), along with matched phrases and their byte/character offsets in UTF-16, code points, UTF-8, and grapheme units, plus flags indicating whether any match was negated (e.g. inside a 'not yet confirmed' scope) and details of any conflict.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 20000,
   "minLength": 1,
   "description": "Confirmation text."
  },
  "rules": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "state",
     "phrases"
    ],
    "properties": {
     "state": {
      "enum": [
       "submitted",
       "pending",
       "reserved",
       "completed"
      ],
      "type": "string"
     },
     "phrases": {
      "type": "array",
      "items": {
       "type": "string",
       "maxLength": 200
      },
      "maxItems": 30
     }
    },
    "additionalProperties": false
   },
   "maxItems": 20,
   "description": "Caller phrase lists; with these present the defaults are off unless useDefaults is true."
  },
  "precedence": {
   "type": "array",
   "items": {
    "enum": [
     "submitted",
     "pending",
     "reserved",
     "completed"
    ],
    "type": "string"
   },
   "maxItems": 4,
   "description": "When several states match, the first one listed wins. Without it a conflict is unknown."
  },
  "useDefaults": {
   "type": "boolean",
   "description": "Include the default English phrases. Default true only when rules is absent."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-confirmation-state-classifier-ef2c7983/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
