# JSON & AI Agent Data Validator — AEGI (`aegi-intelligence/aegi-data-integrity-checker`) Actor

Validate JSON records, AI agent outputs and API responses before execution. Detect missing fields, duplicate IDs, invalid data types and stale timestamps. Machine-readable PASS, FAIL and INCOMPLETE results. Deterministic data integrity checks for agents, APIs, n8n and Make.

- **URL**: https://apify.com/aegi-intelligence/aegi-data-integrity-checker.md
- **Developed by:** [cyril malglaive](https://apify.com/aegi-intelligence) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 data integrity verifications

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/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

## AEGI Data Integrity Checker

### Universal Data Validation for AI Agents, APIs and Automated Workflows

**Verify before you act.**

AEGI is a deterministic data integrity validation tool designed for AI agents, autonomous systems, API integrations, data pipelines and automated workflows.

Validate structured JSON data before executing actions, processing transactions or transferring information between systems.

### What does AEGI detect?

- Missing required fields
- Duplicate identifiers
- Invalid data types
- Stale or outdated timestamps
- Incomplete records
- Data integrity anomalies

AEGI returns machine-readable integrity verdicts and structured anomaly reports.

### When should an AI agent use AEGI?

Use AEGI when you need to:

- Validate AI agent outputs before execution.
- Check JSON records for missing fields.
- Verify API response data.
- Detect duplicate records and identifiers.
- Validate data types before database insertion.
- Check data freshness before making decisions.
- Prevent silent data failures in automated workflows.
- Validate structured data exchanged between AI agents.
- Check data before triggering payment or CRM workflows.

### Key capabilities

- Deterministic validation
- Machine-readable JSON results
- Batch data processing
- Configurable validation rules
- Strict integrity gate mode
- API access through Apify
- MCP access through Apify MCP
- No external AI models required

### Supported use cases

#### AI Agent Output Validation

Check structured outputs generated by AI agents before passing them to another agent or executing an automated action.

#### API Response Validation

Detect missing fields, duplicate identifiers and invalid data types in API response records.

#### Workflow Data Validation

Validate data used in automation platforms such as n8n, Make and Zapier through API-based integration.

#### Data Pipeline Quality Control

Check records before ingestion, transformation, storage or downstream processing.

### Quick start

Example input:

```json
{
  "records": [
    {
      "id": "record-001",
      "amount": 100
    },
    {
      "id": "record-002",
      "amount": "invalid"
    }
  ],
  "requiredFields": ["id", "amount"],
  "strictMode": false,
  "options": {
    "checkDuplicates": true,
    "uniqueField": "id",
    "fieldTypes": {
      "id": "string",
      "amount": "number"
    }
  }
}
```

Example output:

```json
[
  {
    "index": 0,
    "status": "PASS",
    "issues": []
  },
  {
    "index": 1,
    "status": "FAIL",
    "issues": [
      {
        "code": "INVALID_FIELD_TYPE",
        "field": "amount",
        "expected": "number",
        "actual": "string"
      }
    ]
  }
]
```

### Strict integrity gate

Enable strictMode when invalid records must cause the Actor run to fail.

Use non-strict mode when you need a complete anomaly report for the submitted records.

### Integration

Actor identifier:

aegi-intelligence/aegi-data-integrity-checker

Apify Store:

https://apify.com/aegi-intelligence/aegi-data-integrity-checker

Apify MCP endpoint:

https://mcp.apify.com/

Compatible with API-based and MCP-enabled automation environments, subject to client configuration and authentication.

### Pricing

$1 per 1,000 data integrity verifications.

A small Actor start fee also applies.

### Scope and limitations

AEGI checks data against configured integrity rules. It does not establish factual truth, authenticate data sources or guarantee the safety of downstream actions.

### About AEGI Intelligence

AEGI Intelligence develops lightweight data integrity infrastructure for the agentic economy.

Our mission is to help AI agents and automated systems detect data anomalies before they propagate.

**AEGI Intelligence — Verify before you act.**

# Actor input Schema

## `datasetId` (type: `string`):

Select the dataset to validate. Leave empty when using manual JSON records.

## `records` (type: `array`):

JSON records to validate manually. Leave empty when using a dataset ID.

## `requiredFields` (type: `array`):

Fields that must be present in each record.

## `maxAgeHours` (type: `integer`):

Maximum permitted timestamp age in hours.

## `timestampField` (type: `string`):

Name of the field containing the timestamp.

## `strictMode` (type: `boolean`):

Fail the Actor run when integrity issues are detected, allowing downstream workflows to stop.

## `options` (type: `object`):

Configure duplicate detection, deep inspection, status validation, field types and empty payload policies.

## Actor input object example

```json
{
  "records": [
    {
      "id": "AEGI-001",
      "action": "validate",
      "amount": 100
    }
  ],
  "requiredFields": [
    "id"
  ],
  "maxAgeHours": 24,
  "timestampField": "timestamp",
  "strictMode": false,
  "options": {
    "checkDuplicates": false,
    "uniqueField": "id",
    "deepCheck": false,
    "checkStatus": false,
    "allowEmptyArrays": false,
    "allowEmptyObjects": true,
    "allowEmptyStrings": false,
    "allowNullPayload": false,
    "fieldTypes": {},
    "maxDepth": 20
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "records": [
        {
            "id": "AEGI-001",
            "action": "validate",
            "amount": 100
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aegi-intelligence/aegi-data-integrity-checker").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 = { "records": [{
            "id": "AEGI-001",
            "action": "validate",
            "amount": 100,
        }] }

# Run the Actor and wait for it to finish
run = client.actor("aegi-intelligence/aegi-data-integrity-checker").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 '{
  "records": [
    {
      "id": "AEGI-001",
      "action": "validate",
      "amount": 100
    }
  ]
}' |
apify call aegi-intelligence/aegi-data-integrity-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,aegi-intelligence/aegi-data-integrity-checker"
        }
    }
}
```

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/4g9GevmQ9U8odHTDq/builds/XHEhUKeTAlCqfPNDI/openapi.json
