# CHAPPY Outcome Proof Gate ? AI Result Auditor (`chappy.works/chappy-outcome-proof-gate`) Actor

Audit AI agent job-completion claims against submitted evidence. Detect missing receipts, duplicate events, foreign runs and false success reports.

- **URL**: https://apify.com/chappy.works/chappy-outcome-proof-gate.md
- **Developed by:** [chappy.works](https://apify.com/chappy.works) (community)
- **Categories:** AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 audited job cases

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## CHAPPY Outcome Proof Gate — AI Agent Result Auditor

**Does your AI agent say “100 tasks completed” when it can only show 97 receipts?**

Outcome Proof Gate audits **submitted job-completion claims** against **item-level evidence records**, and returns a deterministic JSON judgment. It helps catch optimistic success reports, duplicated receipts, wrong-run contamination, missing results, and conflicting event states.

> Scope matters: this Actor inspects *what the caller submits*. It does **not** independently access the destination API, prove that receipt IDs are genuine, or guarantee external-world delivery. An internally consistent result is named SUPPORTED_BY_SUBMITTED_EVIDENCE, never VERIFIED.

### Use cases

- A workflow claims it created 100 store listings. Only 97 unique result receipts are present.
- An AI task aggregator accidentally includes another customer or run's result.
- An automation retries and reports the same receipt or item twice.
- Claimed success counts disagree with the status records used to justify them.

### Example input

```json
{
  "cases": [
    {
      "jobId": "job-42", "runId": "run-01",
      "claim": {
        "status": "SUCCEEDED",
        "expectedItemIds": ["A", "B", "C"],
        "reportedSuccessCount": 3
      },
      "evidence": [
        {"jobId":"job-42","runId":"run-01","itemId":"A","state":"SUCCEEDED","receiptId":"receipt-A","source":"my-api-readback"},
        {"jobId":"job-42","runId":"run-01","itemId":"B","state":"SUCCEEDED","receiptId":"receipt-B","source":"my-api-readback"}
      ]
    }
  ]
}
```

### Result excerpt

```json
{
  "decision": "EVIDENCE_INCOMPLETE",
  "expected_count": 3,
  "receipt_supported_count": 2,
  "missing_count": 1,
  "missing_item_ids_sample": ["C"],
  "external_verification": false,
  "evidence_trust": "SUBMITTED_ONLY",
  "claim_consistent_with_evidence": false
}
```

### Decisions

| Decision | Meaning |
|---|---|
| SUPPORTED_BY_SUBMITTED_EVIDENCE | All declared items have one successful submitted receipt, with consistent job/run/count. Not externally verified |
| EVIDENCE_INCOMPLETE | Expected item receipts missing or a failure/pending status appeared |
| IDENTITY_MISMATCH | Evidence references a different job or run |
| EVIDENCE_CONFLICT | Duplicate items/receipt IDs or unexpected items |
| CLAIM_CONFLICT | Claimed count/status differs from the submitted evidence |
| INVALID_INPUT | Required fields or limits are invalid |

### Limits, privacy, and trust

1–50 cases per run; 1–500 expected IDs and up to 1,000 evidence records per case. Use pseudonymous job and item IDs. Do not send secrets, payment details, personal data, raw credentials, or private customer materials. Data may be retained according to Apify storage settings.

The source field is a caller-supplied label, not authentication. Even “independent-verifier” is untrusted unless separately confirmed by your integration. Future versions may optionally fetch actual destination state with a customer-controlled credential boundary; this version never does so.

### For AI agents

Call this Actor before announcing completion. If decision is SUPPORTED_BY_SUBMITTED_EVIDENCE, follow up with genuine destination readback before claiming real-world success. If the decision is any other value, use the flags and missing IDs to investigate or retry safely.

### Pricing

Initial public price: **$0.003 USD per audited, syntactically valid job case**, billed through the custom `audit-case` event (pay per event). Inputs that fail validation are returned with `INVALID_INPUT` without an `audit-case` charge. The buyer's max-run spending limit is respected; if exhausted, the Actor stops processing additional cases. For this PPE mode, platform usage is paid from the developer payout rather than charged to the buyer. The price is an initial experiment and does not guarantee verified external-world outcomes.

Developed by CHAPPY. Not affiliated with Apify.

### Critical distinction: execution vs business outcome

The business goal must define which source-result statuses mean success **before** generating receipt `state` values. For example, a postcode lookup run can finish successfully while an individual lookup returns `NOT_FOUND`; if the goal is a valid address match, that record must be supplied as `FAILED` (or otherwise not `SUCCEEDED`). Treating every processed row as success will produce a misleading `SUPPORTED_BY_SUBMITTED_EVIDENCE` result. This tool checks submitted receipt **consistency**, not whether your success criterion was correctly chosen. Use independent API readback when the actual goal matters.

# Actor input Schema

## `cases` (type: `array`):

1 to 50 jobs. Each job must include a list of expected item IDs, a success claim, and evidence receipts. Use non-sensitive sample IDs.

## Actor input object example

```json
{
  "cases": [
    {
      "jobId": "job-42",
      "runId": "run-01",
      "claim": {
        "status": "SUCCEEDED",
        "expectedItemIds": [
          "A",
          "B"
        ],
        "reportedSuccessCount": 2
      },
      "evidence": [
        {
          "jobId": "job-42",
          "runId": "run-01",
          "itemId": "A",
          "state": "SUCCEEDED",
          "receiptId": "receipt-A",
          "source": "api-readback"
        },
        {
          "jobId": "job-42",
          "runId": "run-01",
          "itemId": "B",
          "state": "SUCCEEDED",
          "receiptId": "receipt-B",
          "source": "api-readback"
        }
      ]
    }
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Decisions, flags and missing evidence

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cases": [
        {
            "jobId": "job-42",
            "runId": "run-01",
            "claim": {
                "status": "SUCCEEDED",
                "expectedItemIds": [
                    "A",
                    "B"
                ],
                "reportedSuccessCount": 2
            },
            "evidence": [
                {
                    "jobId": "job-42",
                    "runId": "run-01",
                    "itemId": "A",
                    "state": "SUCCEEDED",
                    "receiptId": "receipt-A",
                    "source": "api-readback"
                },
                {
                    "jobId": "job-42",
                    "runId": "run-01",
                    "itemId": "B",
                    "state": "SUCCEEDED",
                    "receiptId": "receipt-B",
                    "source": "api-readback"
                }
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chappy.works/chappy-outcome-proof-gate").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "cases": [{
            "jobId": "job-42",
            "runId": "run-01",
            "claim": {
                "status": "SUCCEEDED",
                "expectedItemIds": [
                    "A",
                    "B",
                ],
                "reportedSuccessCount": 2,
            },
            "evidence": [
                {
                    "jobId": "job-42",
                    "runId": "run-01",
                    "itemId": "A",
                    "state": "SUCCEEDED",
                    "receiptId": "receipt-A",
                    "source": "api-readback",
                },
                {
                    "jobId": "job-42",
                    "runId": "run-01",
                    "itemId": "B",
                    "state": "SUCCEEDED",
                    "receiptId": "receipt-B",
                    "source": "api-readback",
                },
            ],
        }] }

# Run the Actor and wait for it to finish
run = client.actor("chappy.works/chappy-outcome-proof-gate").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cases": [
    {
      "jobId": "job-42",
      "runId": "run-01",
      "claim": {
        "status": "SUCCEEDED",
        "expectedItemIds": [
          "A",
          "B"
        ],
        "reportedSuccessCount": 2
      },
      "evidence": [
        {
          "jobId": "job-42",
          "runId": "run-01",
          "itemId": "A",
          "state": "SUCCEEDED",
          "receiptId": "receipt-A",
          "source": "api-readback"
        },
        {
          "jobId": "job-42",
          "runId": "run-01",
          "itemId": "B",
          "state": "SUCCEEDED",
          "receiptId": "receipt-B",
          "source": "api-readback"
        }
      ]
    }
  ]
}' |
apify call chappy.works/chappy-outcome-proof-gate --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,chappy.works/chappy-outcome-proof-gate"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/mOwTN4MOAcJ8nYIbh/builds/DaoEwWwfcMj9v2bPX/openapi.json
