# ArtifactGuard Agent — AI-Paid Signed QA (`analytical_gratefulness/artifactguard-agent`) Actor

Non-Standby paid Actor for AI agents to validate JSON, ZIP, PDF, and DOCX deliverables and receive an Ed25519-signed PASS/WARN/FAIL receipt. Malformed input and execution failures do not trigger the application event charge.

- **URL**: https://apify.com/analytical\_gratefulness/artifactguard-agent.md
- **Developed by:** [black cow](https://apify.com/analytical_gratefulness) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 artifact validation receipts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## ArtifactGuard Agent

ArtifactGuard Agent is the non-Standby, limited-permission edition of
ArtifactGuard for Store and agentic execution. It validates AI-generated
deliverables and returns an independently verifiable Ed25519-signed receipt.

### Paid operations

| Input mode | Result | Price |
| --- | --- | --- |
| `validate-manifest` | Signed metadata and required-component receipt | $0.01 |
| `validate-artifact` | Signed JSON, ZIP, PDF, or DOCX inspection receipt | $0.05 |

Malformed inputs are rejected before billing. A completed inspection with a
`FAIL` result is a valid paid result. Execution or parser failures do not trigger
the application event charge.

### Agent input

Provide `mode`, `artifact`, `validation_contract`, and a unique
`idempotency_key`. The result is written once to the default dataset and the
`OUTPUT` key-value-store record.

The Actor does not download URLs or read local paths. Artifact bytes are
processed in a resource-limited subprocess, are not written to the revenue
ledger, and are released after inspection. Logs and accounting records contain
hashes and event metadata, not raw documents, API secrets, or wallet private
keys.

### 한국어

AI가 만든 JSON·ZIP·PDF·DOCX 납품물을 검사하고 Ed25519 서명
`PASS/WARN/FAIL` 영수증을 반환합니다. 원본 문서는 매출 원장과 로그에
저장하지 않으며, 잘못된 입력과 서버 실패는 유료 검사 이벤트로 과금하지
않습니다.

# Actor input Schema

## `mode` (type: `string`):

validate-manifest costs $0.01; validate-artifact costs $0.05; readiness-check is free.

## `artifact` (type: `object`):

Manifest metadata for validate-manifest, or metadata plus content\_base64 for validate-artifact.

## `validation_contract` (type: `object`):

Allowed formats, size limits, required or forbidden content, and format-specific rules.

## `idempotency_key` (type: `string`):

Unique request key, 8–128 characters. Reuse only when retrying the same input.

## Actor input object example

```json
{
  "mode": "validate-manifest",
  "artifact": {
    "name": "sample.json",
    "mime_type": "application/json",
    "size_bytes": 31,
    "sha256": "368e9cedfb85b8fd10ff45e37e3440379fa6c53d6cd109cb0de2b8dcb1a1a5c8",
    "entries": []
  },
  "validation_contract": {
    "allowed_mime_types": [
      "application/json"
    ],
    "max_bytes": 10485760
  },
  "idempotency_key": "store-manifest-example-0001"
}
```

# 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 = {
    "mode": "validate-manifest",
    "artifact": {
        "name": "sample.json",
        "mime_type": "application/json",
        "size_bytes": 31,
        "sha256": "368e9cedfb85b8fd10ff45e37e3440379fa6c53d6cd109cb0de2b8dcb1a1a5c8",
        "entries": []
    },
    "validation_contract": {
        "allowed_mime_types": [
            "application/json"
        ],
        "max_bytes": 10485760
    },
    "idempotency_key": "store-manifest-example-0001"
};

// Run the Actor and wait for it to finish
const run = await client.actor("analytical_gratefulness/artifactguard-agent").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 = {
    "mode": "validate-manifest",
    "artifact": {
        "name": "sample.json",
        "mime_type": "application/json",
        "size_bytes": 31,
        "sha256": "368e9cedfb85b8fd10ff45e37e3440379fa6c53d6cd109cb0de2b8dcb1a1a5c8",
        "entries": [],
    },
    "validation_contract": {
        "allowed_mime_types": ["application/json"],
        "max_bytes": 10485760,
    },
    "idempotency_key": "store-manifest-example-0001",
}

# Run the Actor and wait for it to finish
run = client.actor("analytical_gratefulness/artifactguard-agent").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "mode": "validate-manifest",
  "artifact": {
    "name": "sample.json",
    "mime_type": "application/json",
    "size_bytes": 31,
    "sha256": "368e9cedfb85b8fd10ff45e37e3440379fa6c53d6cd109cb0de2b8dcb1a1a5c8",
    "entries": []
  },
  "validation_contract": {
    "allowed_mime_types": [
      "application/json"
    ],
    "max_bytes": 10485760
  },
  "idempotency_key": "store-manifest-example-0001"
}' |
apify call analytical_gratefulness/artifactguard-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=analytical_gratefulness/artifactguard-agent",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/1hPhBU6fjOO90H5EN/builds/htf7FdhMYOknH7QsE/openapi.json
