# XavvyNess AI Quality Auditor (`xavvyness/xavvyness-audit-agent`) Actor

Score any Apify actor or AI endpoint on 5 dimensions (XAQS 0–100): Completeness, Accuracy, Actionability, Structure, Cost-Efficiency. Returns grade A+ to F with specific improvement recommendations. Audit your actors before publishing.

- **URL**: https://apify.com/xavvyness/xavvyness-audit-agent.md
- **Developed by:** [XavvyNess](https://apify.com/xavvyness) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 agent audit reports

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## XavvyNess Agent Quality Auditor (XAQS)

**The first standardized quality auditing framework for AI agents.** Run any Apify actor or AI agent through a structured test suite and get a XAQS score (0–100) across 5 quality dimensions — with specific, actionable improvement recommendations.

Use it on your own actors before publishing, or benchmark competitors.

### Demo

<!-- VIDEO_PLACEHOLDER: audit-agent -->
> 🎬 **Video demo coming soon.** Upload `audit-agent.mp4` to YouTube, then run `python3 scripts/actor-video-gen.py --embed-readmes` to embed it here automatically.

---

### What It Does

1. Runs your agent with multiple test prompts (customizable)
2. Scores each response on 5 dimensions (20 points each = 100 total)
3. Generates a grade (A+ → F) with specific improvement recommendations
4. Returns a structured audit report ready for your README or team review

**The 5 XAQS Dimensions:**

| Dimension | What It Measures |
|-----------|-----------------|
| **Completeness** | Does it fully answer? No truncation, no "continued..." |
| **Accuracy** | Factual, no hallucinations, no invented URLs or names |
| **Actionability** | Concrete next steps, imperative recommendations |
| **Structure** | Headers, bullets, code blocks — readable at a glance |
| **Cost-Efficiency** | Output value per token, no bloat or padding |

**Grade Scale:**
- 90–100 → A+ (5-star, marketplace ready)
- 80–89 → A (4-star, minor gaps)
- 70–79 → B (3-star, needs work)
- 60–69 → C (2-star, significant issues)
- <60 → F (1-star, not ready for publishing)

---

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `agentName` | string | `"My AI Agent"` | Human-readable agent name for the report |
| `apifyActorId` | string | — | Apify actor ID to audit (e.g. `RBobzxRYFVgoX74uu`) |
| `agentEndpoint` | string | — | HTTP endpoint if not an Apify actor |
| `testSuite` | array | `[]` | Custom test cases (see below) |
| `dimensions` | array | all 5 | Dimensions to score |
| `runs` | integer | `3` | How many times to run each test (consistency scoring) |
| `apifyToken` | string | — | Your Apify token (required for Apify actor audits) |

#### Example — Audit an Apify actor

```json
{
  "agentName": "My Research Agent",
  "apifyActorId": "RBobzxRYFVgoX74uu",
  "apifyToken": "apify_api_YOUR_TOKEN",
  "runs": 3
}
````

#### Example — Audit a specialized scraper (custom test suite)

```json
{
  "agentName": "My Smart Extractor",
  "apifyActorId": "IN4O5pGUjye34xW0O",
  "apifyToken": "apify_api_YOUR_TOKEN",
  "testSuite": [
    {
      "query": "Extract top stories from HN",
      "payload": {
        "urls": ["https://news.ycombinator.com"],
        "extractionPrompt": "Extract top 5 story titles and point scores",
        "outputFormat": "json"
      },
      "expectedKeywords": ["title", "points"],
      "minLength": 100
    }
  ],
  "runs": 2
}
```

***

### Example Output

```json
{
  "agentName": "XavvyNess Research Engine",
  "xaqsScore": 84,
  "grade": "A",
  "passedTests": 6,
  "totalTests": 9,
  "dimensions": {
    "completeness": { "score": 18, "max": 20, "notes": "Reports are thorough; one truncation detected on deep queries" },
    "accuracy": { "score": 17, "max": 20, "notes": "Sources cited correctly; one hallucinated URL in 9 runs" },
    "actionability": { "score": 16, "max": 20, "notes": "Key findings actionable; recommendations could be more specific" },
    "structure": { "score": 19, "max": 20, "notes": "Excellent use of headers and numbered citations" },
    "cost_efficiency": { "score": 14, "max": 20, "notes": "Occasional verbose preambles inflate token count" }
  },
  "topIssues": [
    "1/9 runs produced a hallucinated source URL — add URL validation",
    "Deep queries occasionally truncate before conclusion section",
    "Preamble text (2-3 sentences before ### Overview) adds no value — remove it"
  ],
  "recommendations": [
    "Add output validation to catch empty or truncated reports before returning",
    "Strip preamble text from model output using regex before pushing to dataset",
    "Increase max_tokens for deep queries from 3500 to 5000"
  ],
  "auditedAt": "2026-04-08T23:00:00.000Z",
  "agent": "XavvyNess Agent Quality Auditor"
}
```

***

### Pricing

**$0.02 per audit** ($20.00 per 1,000 audits) — PAY\_PER\_RESULT, charged only on successful completion.

A standard audit (3 runs × 3 tests = 9 total agent calls) typically completes in 3–5 minutes. Failed runs are not charged.

***

### Who Should Use This

- **Apify builders** — Audit your actors before publishing to the marketplace
- **Businesses using AI agents** — Verify quality before going to production
- **Researchers** — Benchmark agent quality systematically across providers
- **Developers** — Catch regressions when updating an agent

***

### Custom Test Suites

The default test suite sends `{ query, depth, format }` — works perfectly for research-style agents. For specialized actors (scrapers, analyzers, extractors), use the `testSuite` field to define custom `payload` objects that match your actor's actual input schema.

Each test case supports:

- `query` — human-readable test name
- `payload` — exact input JSON sent to the actor (overrides default)
- `expectedKeywords` — words that must appear in the output
- `minLength` — minimum output length in characters
- `maxLatencyMs` — maximum acceptable run time

***

### Integration

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('g1HQWHIikrGNlt7RF').call({
  agentName: 'My Agent',
  apifyActorId: 'YOUR_ACTOR_ID',
  apifyToken: 'apify_api_YOUR_TOKEN',
  runs: 3,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`XAQS Score: ${items[0].xaqsScore}/100 — ${items[0].grade}`);
console.log('Top issues:', items[0].topIssues);
```

***

### About XavvyNess

XavvyNess builds AI agents that do real work — and XAQS is how we hold them accountable. Run it on any agent, including ours.

[More agents →](https://apify.com/javybar)

# Actor input Schema

## `agentName` (type: `string`):

Human-readable name of the agent being audited (for the report).

## `apifyActorId` (type: `string`):

Apify actor ID to audit (e.g. 'RBobzxRYFVgoX74uu'). Leave blank to audit a custom HTTP endpoint.

## `agentEndpoint` (type: `string`):

If not an Apify actor, provide the POST endpoint URL for the agent. Receives {query} in body, returns {response} or {output}.

## `testSuite` (type: `array`):

Array of test cases. Each item: { query, payload, expectedKeywords, minLength, maxLatencyMs }. Use 'payload' to override the default {query} input for specialized actors (e.g. {urls:\[...]} for scrapers). Leave blank for default suite.

## `dimensions` (type: `array`):

Which quality dimensions to score. Valid values: completeness, accuracy, actionability, structure, cost\_efficiency.

## `runs` (type: `integer`):

How many times to run each test case (for consistency scoring).

## `apifyToken` (type: `string`):

Required if auditing an Apify actor. Used to trigger runs and read results. Get yours at console.apify.com/account/integrations.

## Actor input object example

```json
{
  "agentName": "My AI Agent",
  "testSuite": [],
  "dimensions": [
    "completeness",
    "accuracy",
    "actionability",
    "structure",
    "cost_efficiency"
  ],
  "runs": 3
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("xavvyness/xavvyness-audit-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("xavvyness/xavvyness-audit-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 '{}' |
apify call xavvyness/xavvyness-audit-agent --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "XavvyNess AI Quality Auditor",
        "description": "Score any Apify actor or AI endpoint on 5 dimensions (XAQS 0–100): Completeness, Accuracy, Actionability, Structure, Cost-Efficiency. Returns grade A+ to F with specific improvement recommendations. Audit your actors before publishing.",
        "version": "1.0",
        "x-build-id": "oIyjjtesoRWH9rTaD"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xavvyness~xavvyness-audit-agent/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xavvyness-xavvyness-audit-agent",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/xavvyness~xavvyness-audit-agent/runs": {
            "post": {
                "operationId": "runs-sync-xavvyness-xavvyness-audit-agent",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/xavvyness~xavvyness-audit-agent/run-sync": {
            "post": {
                "operationId": "run-sync-xavvyness-xavvyness-audit-agent",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "agentName"
                ],
                "properties": {
                    "agentName": {
                        "title": "Agent Name",
                        "type": "string",
                        "description": "Human-readable name of the agent being audited (for the report).",
                        "default": "My AI Agent"
                    },
                    "apifyActorId": {
                        "title": "Apify Actor ID (optional)",
                        "type": "string",
                        "description": "Apify actor ID to audit (e.g. 'RBobzxRYFVgoX74uu'). Leave blank to audit a custom HTTP endpoint."
                    },
                    "agentEndpoint": {
                        "title": "Agent HTTP Endpoint (optional)",
                        "type": "string",
                        "description": "If not an Apify actor, provide the POST endpoint URL for the agent. Receives {query} in body, returns {response} or {output}."
                    },
                    "testSuite": {
                        "title": "Test Suite",
                        "type": "array",
                        "description": "Array of test cases. Each item: { query, payload, expectedKeywords, minLength, maxLatencyMs }. Use 'payload' to override the default {query} input for specialized actors (e.g. {urls:[...]} for scrapers). Leave blank for default suite.",
                        "default": []
                    },
                    "dimensions": {
                        "title": "Audit Dimensions",
                        "type": "array",
                        "description": "Which quality dimensions to score. Valid values: completeness, accuracy, actionability, structure, cost_efficiency.",
                        "default": [
                            "completeness",
                            "accuracy",
                            "actionability",
                            "structure",
                            "cost_efficiency"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "runs": {
                        "title": "Number of Test Runs",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many times to run each test case (for consistency scoring).",
                        "default": 3
                    },
                    "apifyToken": {
                        "title": "Apify API Token (for actor audits)",
                        "type": "string",
                        "description": "Required if auditing an Apify actor. Used to trigger runs and read results. Get yours at console.apify.com/account/integrations."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
