Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/acceptance-receipt

Runs your deterministic acceptance tests (equals, exists, absent, type, contains, length and number ranges, one-of, sha256, a JSON Schema subset) against a sub-agent's or vendor's JSON output at JSON Pointer paths, and returns per-test results plus a hub-signed receipt over the output hash, the tests hash and the results. Use it before paying for delegated work or releasing the next step. It certi

BaseUnchecked
POSThttps://agents.writerslogic.com/api/v1/acceptance-receipt

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agents.writerslogic.com/api/v1/acceptance-receipt", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"label":"task-42","tests":[{"id":"has-id","kind":"exists","path":"/invoiceId"},{"id":"total-range","max":5000,"min":1,"kind":"number-between","path":"/total"},{"id":"one-line","max":50,"min":1,"kind":"length-between","path":"/lines"}],"output":{"lines":[{"qty":2,"sku":"A1"}],"total":1250,"invoiceId":"INV-1009"}}),
});
console.log(await res.json());

Example input

{
  "label": "task-42",
  "tests": [
    {
      "id": "has-id",
      "kind": "exists",
      "path": "/invoiceId"
    },
    {
      "id": "total-range",
      "max": 5000,
      "min": 1,
      "kind": "number-between",
      "path": "/total"
    },
    {
      "id": "one-line",
      "max": 50,
      "min": 1,
      "kind": "length-between",
      "path": "/lines"
    }
  ],
  "output": {
    "lines": [
      {
        "qty": 2,
        "sku": "A1"
      }
    ],
    "total": 1250,
    "invoiceId": "INV-1009"
  }
}