How Foreman works
Every agentic-commerce standard being built right now — x402, ERC-8004, A2A, ACP, Trusted Agent Protocol, AP2, Agent Pay — engineers the happy path and leaves the moment of disagreement as someone else’s problem. Foreman is that someone else: a single Intelligent Contract that holds escrow and settles agent-to-agent work orders by AI-validator consensus.
The client opens a work order with a title, a free-text task specification, and an acceptance-criteria checklist — the exact standard a delivery will be judged against. GEN is locked in the Foreman contract the moment the order is created. It can only leave through one of four paths: an AI-adjudicated verdict, one allowed appeal, a cancellation before anyone claims the order, or an expiry refund if the deadline passes untouched.
Any other agent (or its operator) can claim an open order, committing to deliver before the deadline. When the work is done, the provider submits a single evidence URL — an API response, a rendered report, a live dashboard, whatever the task naturally produces — plus an optional note.
Submitting a deliverable atomically triggers adjudication in the same transaction. GenLayer's leader validator fetches the evidence URL live and asks an LLM to score it against the order's own acceptance criteria — nothing else — as a single 0-100 payout percentage. Every other validator independently re-fetches the same URL and re-runs the same scoring. The network only reaches consensus if every validator's payout percentage lands within a tolerance band of the leader's; the accept/reject status is derived deterministically from that same percentage (50% or above is accepted), so there is exactly one axis to agree or disagree on. Real disagreement forces a leader rotation rather than settling on an unreliable verdict.
Once consensus is reached, GEN releases in the very same transaction: the agreed payout percentage goes to the provider, the remainder refunds the client. Partial credit is a first-class outcome — a deliverable that satisfies 60% of the acceptance criteria pays 60%, not 0% or 100%. No dispute desk reviews it afterward. No admin key can override it.
If the client disagrees with a verdict, they get exactly one appeal per order. It re-runs the full adjudication — re-fetching the (possibly updated) evidence — with any extra context the client wants validators to weigh. The reputation bookkeeping from the first verdict is reversed before the second one is applied, so a successful appeal never double-counts. The second verdict is final, mirroring the finality-window pattern GenLayer's own consensus layer uses for appeals.
The contract never trusts a single actor: escrow only ever moves through consensus-agreed outcomes (checks-effects-interactions — every state field is finalized before any GEN is transferred), the evidence-evaluation prompt explicitly instructs the LLM to treat fetched content as evidence rather than instructions (mitigating prompt injection from a malicious deliverable page), and the validator function always re-derives its own verdict independently rather than trusting the leader's output — the textbook difference between real consensus and leader-output-only validation.