# Apeiris worked examples

Artifacts that show what Apeiris looks like *on the wire*, plus a runnable reference implementation. No account, no install — just Node 18+.

## The action is the security object

An autonomous AI workload takes one consequential action. These three files are that action's evidence, end to end:

| File | What it is | Conformance |
|---|---|---|
| [`action-event.json`](action-event.json) | The action on the wire — actor, intent, operation, resource, and the evidence the workload presents. | Illustrates the platform prototype's *request shape* (the composer's on-the-wire contract). Not a published schema. |
| [`evidence-packet.json`](evidence-packet.json) | One control's attestation about that action — a single, self-contained evidence record. | **Strict-valid** against the published [`evidence.schema.json`](../integration/schemas/v1/evidence.schema.json) (`additionalProperties:false`). |
| [`decision.json`](decision.json) | The composed verdict — coverage (mapped) vs evidence (satisfied), what's missing, and the boundary. | Illustrates the *response shape*. Not a published schema. |

The `integrity.hash`/`signature` values in the examples are illustrative placeholders, not real signatures. What is real is the **structure** — and, for `evidence-packet.json`, strict validity against the published evidence ontology.

The scenario: an accounts-payable agent issues an **$18,500 ACH payment to a newly-added vendor account**. Identity and action-scope are satisfied. The delegated approval limit (PA-02) fails, and the human-approval evidence (AO-04, PA-11) is missing — so the composed verdict is **`requires_review`**, not a silent approval.

## Two ideas these files make concrete

- **mapped ≠ satisfied.** Every control that governs this action is present and maps to it (`coverage = 1.0`). That is *not* the same as the evidence being there. `decision.json` reports both verdicts separately and names the two controls whose evidence is missing.
- **Evidence, not a decision.** Apeiris reports what is proven and what is missing. Whether to release, hold, or escalate the payment is the enterprise's gate to operate — see `decision.json`'s `summary.boundary`.

## Verify them yourself

```
node prove-obligation.mjs                 # the runnable reference impl (fetch → verify → resolve → render)
```

`evidence-packet.json` validates against the **published** evidence schema — fetch both and check:

```
# Node 18+ — no repo checkout needed; both are served publicly.
python3 - <<'PY'
import json, urllib.request, jsonschema
base = "https://apeiris.ai/integration/schemas/v1/evidence.schema.json"
pkt  = "https://apeiris.ai/examples/evidence-packet.json"
sch  = json.load(urllib.request.urlopen(base))
jsonschema.validate(json.load(urllib.request.urlopen(pkt)), sch)
print("evidence-packet.json is valid against the published evidence.schema.json")
PY
```

`action-event.json` and `decision.json` illustrate the request/response shape of the platform prototype's composer; there is no published schema to validate them against.

See also `/prove/` and `/integration/proof/` for the same coverage-vs-evidence idea in the browser.
