# Actor Inspector Agent (`jakub.kopecky/actor-inspector-agent`) Actor

Agent Actor Inspector 🕵️‍♂️: An Apify Actor that rates others on docs 📝, inputs 🔍, code 💻, functionality ⚙️, performance ⏱️, and uniqueness 🌟. Config with actorId array, run, and review results. Helps devs improve, ensures quality, and guides users.

- **URL**: https://apify.com/jakub.kopecky/actor-inspector-agent.md
- **Developed by:** [Jakub Kopecký](https://apify.com/jakub.kopecky) (community)
- **Categories:** Automation, Agents, Open source
- **Stats:** 22 total users, 0 monthly users, 0.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $950.00 / 1,000 flat fee for completing a tasks

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

## Actor Inspector Agent

[![Agent Actor Inspector](https://apify.com/actor-badge?actor=jakub.kopecky/actor-inspector-agent)](https://apify.com/jakub.kopecky/actor-inspector-agent)
[![GitHub Repo stars](https://img.shields.io/github/stars/apify/actor-inspector-agent)](https://github.com/apify/actor-inspector-agent/stargazers)

The **Actor Inspector Agent** is designed to evaluate and analyze other Apify Actors.
It provides detailed reports on code quality, documentation, uniqueness, and pricing competitiveness, helping developers optimize their Actors and users choose the best tools for their needs.

This Agent is built using [CrewAI](https://docs.crewai.com/) and [Apify SDK](https://docs.apify.com/sdk/python) and is using modern and flexible pricing model for AI Agents [Pay Per Event](https://docs.apify.com/sdk/js/docs/next/guides/pay-per-event).

### 🎯 Features

- 🧪 **Code quality**: Evaluates tests, linting, security, performance, and code style
- 📚 **Documentation**: Reviews readme clarity, input schema, examples, and GitHub presence
- 💫 **Uniqueness**: Compares features with similar Actors to assess distinctiveness
- 💰 **Pricing**: Analyzes price competitiveness and model transparency
- 🚧 **Actor run** *(Coming soon)*: Tests Actor execution and generates performance report

![Agent Actor Inspector workflow](docs/agent_actor_inspector.png)

### 🔄 How it works?

1. 📥 **Input**
   - Actor name (e.g., `apify/instagram-scraper`)
   - AI model selection (`gpt-4o`, `gpt-4o-mini`, `o3-mini`)
   - *Optional* debug mode

2. 🤖 **Processing with CrewAI**
   - Uses specialized AI agents working as a team:
     - Code quality specialist: Reviews source code and tests
     - Documentation expert: Analyzes readme and input schema
     - Apify Store analyst: Evaluates pricing and uniqueness
   - Each agent focuses on their expertise while collaborating for comprehensive analysis

3. 📤 **Output**
   - Generates detailed markdown report
   - Includes ratings and suggestions for each category
   - Automatically saves to Apify dataset

#### 💰 Pricing

This Actor uses the [Pay Per Event](https://docs.apify.com/sdk/js/docs/next/guides/pay-per-event) (PPE) model for flexible, usage-based pricing. It currently charges for Actor start and a flat fee per task completion.

| Event                  | Price (USD) |
|------------------------|-------------|
| Actor start            | $0.05       |
| Task Completion        | $0.95       |

#### Input Example

```json
{
  "actorName": "apify/instagram-scraper",
  "modelName": "gpt-4o-mini",
  "debug": false
}
```

#### Output Example

A sample report might look like this (stored in the dataset):

```markdown
**Final Overall Inspection Report for Apify Actor: apify/website-content-crawler**

- **Code quality:**
  - Rating: Unknown (Based on best practices).
  - Description: While direct analysis was unavailable, the Actor is expected to follow best practices, ensuring organized, efficient, and secure code.

- **Actor quality:**
  - Rating: Great
  - Description: The Actor exhibits excellent documentation, with comprehensive guidance, use case examples, detailed input properties, and a user-friendly design that aligns with best practices.

- **Actor uniqueness:**
  - Rating: Good
  - Description: Although there are similar Actors, its unique design for LLM integration and enhanced HTML processing options provide it with a distinct niche.

- **Pricing:**
  - Rating: Good
  - Description: The flexible PAY_PER_PLATFORM_USAGE model offers potential cost-effectiveness, particularly for large-scale operations, compared to fixed models.

**Overall Final Mark: Great**

The "apify/website-content-crawler" stands out with its combination of quality documentation, unique features tailored for modern AI applications, and competitive pricing strategy, earning it a "Great" overall assessment. While information on code quality couldn't be directly assessed, the Actor's thought-out documentation and broad feature set suggest adherence to high standards.
```

Dataset output:

```json
{
  "actorId": "apify/website-content-crawler",
  "response": "...markdown report content..."
}
```

### ✨ Why Use Agent Actor Inspector?

- **Developer insights**: Identify areas to improve your Actor’s code, docs, or pricing.
- **User decision-making**: Compare Actors to find the best fit for your needs.
- **Automation**: Streamlines Actor evaluation with AI-driven analysis.
- **Scalability**: Analyze multiple Actors by running the Inspector in parallel.

### 🔧 Technical highlights

- **Built with Apify SDK**: Ensures seamless integration with the Apify platform.
- **CrewAI powered**: Uses multi-agent workflows for thorough, modular analysis.
- **GitHub integration**: Pulls source code from GitHub when available for deeper code quality checks.
- **Flexible tools**: Tools to fetch README, input schemas, pricing information, and related Actors.

### 🤖 Under the hood with [CrewAI](https://docs.crewai.com/)

This Actor uses CrewAI to orchestrate a team of specialized AI agents that work together to analyze Apify Actors:

#### 👥 The crew

1. **Code quality specialist**
   ```python
   goal = 'Deliver precise evaluation of code quality, focusing on tests, linting, code smells, security, performance, and style'
   tools = [...]  # Fetches and analyzes source code
   ```

2. **Documentation expert**
   ```python
   goal = 'Evaluate documentation completeness, clarity, and usefulness for potential users'
   tools = [...]  # Analyzes readme and input schema
   ```

3. **Pricing expert**
   ```python
   goal = 'Analyze pricing with respect to other Actors'
   tools = [...]  # Analyzes competition
   ```

##### 🔄 Workflow

1. The main process creates a crew of agents, each with:
   - Specific role and expertise
   - Defined goal and backstory
   - Access to relevant tools
   - Selected LLM model

2. Agents work sequentially to:
   - Gather required information using their tools
   - Analyze data within their domain
   - Provide structured evaluations
   - Pass insights to other agents when needed

3. Results are combined into a comprehensive markdown report with:
   - Detailed analysis per category
   - Clear ratings (great/good/bad)
   - Actionable improvement suggestions

##### 🛠️ Tools

Each agent has access to specialized tools that:

- Fetch Actor source code and analyze its structure
- Retrieve documentation and readme content
- Get pricing information and find similar Actors
- Process and structure the gathered data

The CrewAI framework ensures collaboration between agents while maintaining focus on their specific areas of expertise.

### 📖 Learn more

- [Apify Platform](https://apify.com)
- [Apify SDK Documentation](https://docs.apify.com/sdk/python)
- [CrewAI Documentation](https://docs.crewai.com)
- [What are AI Agents?](https://blog.apify.com/what-are-ai-agents/)
- [AI agent architecture](https://blog.apify.com/ai-agent-architecture)
- [How to build an AI agent on Apify](https://blog.apify.com/how-to-build-an-ai-agent/)

### 🚀 Get started

Evaluate your favorite Apify Actors today and unlock insights to build or choose better tools! 🤖🔍

### 🌐 Open source

This Actor is open source, hosted on [GitHub](https://github.com/apify/agent-actor-inspector).

Are you missing any features?  Open an issue here or [create a pull request](https://github.com/apify/agent-actor-inspector/pulls).

# Changelog

This Actor's version history is a separate document: https://apify.com/jakub.kopecky/actor-inspector-agent/changelog.md

# Actor input Schema

## `actorName` (type: `string`):

Name of Actor to inspect.

## `pedantic` (type: `boolean`):

If enabled, the analysis is very critical and pedantic.

## `modelName` (type: `string`):

The OpenAI model to use. Currently supported models are gpt-4o and gpt-4o-mini, and the reasoning model and o3-mini.

## `debug` (type: `boolean`):

If enabled, Actor provides detailed information with tool calls and reasoning.

## Actor input object example

```json
{
  "actorName": "jakub.kopecky/agent-actor-inspector",
  "pedantic": true,
  "modelName": "gpt-4o",
  "debug": true
}
```

# 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 = {
    "actorName": "jakub.kopecky/agent-actor-inspector",
    "modelName": "gpt-4o"
};

// Run the Actor and wait for it to finish
const run = await client.actor("jakub.kopecky/actor-inspector-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 = {
    "actorName": "jakub.kopecky/agent-actor-inspector",
    "modelName": "gpt-4o",
}

# Run the Actor and wait for it to finish
run = client.actor("jakub.kopecky/actor-inspector-agent").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 '{
  "actorName": "jakub.kopecky/agent-actor-inspector",
  "modelName": "gpt-4o"
}' |
apify call jakub.kopecky/actor-inspector-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jakub.kopecky/actor-inspector-agent"
        }
    }
}
```

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/HV9xD8A4astdS43Lb/builds/KEtH1jxvvkGVDgFzW/openapi.json
