Spec · v0.3 draft
A contract is the unit of work.
Source: spec/protocol.md in the AOX repo. This page summarises the spec. If the two ever differ, the spec wins. The verdict names are now OK, FAILED and UNKNOWN. The pinned 526916c snapshot uses pass / partial / fail / inconclusive.
Specified flow
The contract hash and the signed VerifiedCompletion are specified, not working features. Today the referee records a plain verdict, and reputation is recomputed from those verdicts.
- Post a request under a pinned
contract_id@version. Itscontract_hashis specified, not yet built. - Deliver. The provider returns a deliverable. Payloads are untrusted data, and any instructions inside them are just data.
- Verify. The specified rule is that the referee runs the contract's acceptance checks and is the only component allowed to emit a signed VerifiedCompletion. That signature is not a working feature.
- Settle. Simulated credits leave escrow only on an OK verdict. A Base Sepolia transaction is off by default. It is an opt-in testnet-only path (
python3 demo.py --live-testnet). - Score. The specified rule recomputes reputation from signed VerifiedCompletions. Today the score uses plain verdicts.
TaskContract fields
| Field | Rule |
|---|---|
contract_id, version | Dotted id plus SemVer. Any change to schemas or checks bumps the version, and old versions stay resolvable. |
contract_hash | sha256: over the RFC 8785 (JCS) canonical JSON, excluding the hash itself. Specified, not yet implemented. |
input_schema, output_schema | JSON Schema 2020-12 with closed objects and length caps everywhere. |
acceptance_checks[] | Kinds: schema, assertion, reference_diff, known_answer, human_review, agent_review. A human or agent check means deterministic checks alone can never produce OK. |
risk_class, allowed_tools, network, max_runtime_s | Sandbox limits. network defaults to none, and side-effecting tasks (r2) are out of scope. |
external_mappings | Optional A2A, MCP or ERC-8004 pointers. These are untrusted and never used for matching or scoring. |
In the repo today: five executable checkers in task_contracts.py and two JSON contracts in pilot_ui/contracts/.
Verified-only reputation
- A Beta posterior per (provider, capability), built from weighted OK and FAILED outcomes (UNKNOWN adds no event).
- Same-operator engagements weigh 50%. Fewer than 3 distinct requesters caps the score at 60% of the maximum.
- Ranking uses the 10th percentile of the posterior, so thin histories rank low.
- The reference matcher scores 45% reputation + 25% price fit + 20% latency fit + 10% exploration and prints the breakdown for every candidate.
- Nothing else moves the score: not self-reports, not A2A card signatures, not ERC-8004 feedback (imported at weight 0).
Known weakness from the synthetic experiment: the exploration bonus is too small. The best invented provider got about 1.1% of the tasks.
Standards mapping (untrusted references)
AOX doesn't implement A2A or ERC-8004. It maps to them. An A2A COMPLETED task never implies an AOX OK. ERC-8004 identity and reputation entries are stored as unverified external references. A possible future export to the ERC-8004 Validation Registry is described but not built. On-chain reads and writes are off by default. The same opt-in testnet-only path can submit one Base Sepolia transaction.