# AI Agent Task Feasibility & Preflight (`suezcanal.xyz/task-feasibility`) Actor

Preflight an AI agent task before expensive execution. Check requirements, evidence, required sources, freshness and known budget, then return CAN\_DO, PARTIAL or CANNOT\_VERIFY.

- **URL**: https://apify.com/suezcanal.xyz/task-feasibility.md
- **Developed by:** [Matteo Messina](https://apify.com/suezcanal.xyz) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.01 / task feasibility report

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?

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

AI Agent Task Feasibility & Preflight is a deterministic guardrail for agents and automated workflows. Before expensive execution starts, it checks whether the task can be justified with the declared requirements, sources, evidence, freshness, and known budget.

The Actor returns `CAN_DO`, `PARTIAL`, or `CANNOT_VERIFY` with explicit blockers, unknowns, missing evidence, and a confidence ceiling instead of guessing that a task is feasible.

### What it checks

Task Feasibility evaluates:

- hard and optional requirements against structured attributes;
- required evidence classes;
- required source identities;
- evidence freshness and unknown freshness;
- an upstream contradiction ratio when supplied;
- known estimated execution/data cost against an optional maximum budget.

A hard requirement mismatch or a declared cost above budget can produce `CANNOT_VERIFY`. Missing required evidence or sources normally produces `PARTIAL`. When required information is complete and no structural blocker is present, the Actor can return `CAN_DO` with a confidence ceiling constrained by the evidence.

### What it does not do

This Actor does not discover sources, estimate unknown acquisition costs, purchase data, guarantee that a source will remain reachable, or authorize side effects. It evaluates the structured task context supplied by the caller.

### Typical uses

Use Task Feasibility before an agent starts a paid search, before a browsing/research workflow promises an answer that depends on unavailable evidence, before a pipeline purchases a data source, or before an orchestrator routes a task to a more expensive tool.

### Input

Provide a human-readable `task`, optional structured `requirements`, available `attributes`, evidence/source requirements, current `evidence`, and `as_of`. Budget fields are optional and remain caller supplied.

```json
{
  "task": "Verify an eligibility condition before drafting",
  "requirements": [],
  "attributes": {},
  "required_evidence_classes": ["official_source"],
  "required_source_ids": [],
  "evidence": [],
  "as_of": "2026-09-07T12:00:00Z",
  "max_budget_usd": 1.0,
  "estimated_cost_usd": 0.2
}
```

### Output

The default dataset receives one report containing the feasibility decision, hard blockers, unknown required attributes, available and missing sources, missing evidence classes, stale/unknown-freshness evidence IDs, budget status, confidence ceiling, limiting factor, and deterministic reasons.

The confidence ceiling expresses the maximum confidence justified by the supplied structure and evidence. It is not a probability that execution will succeed.

### Pricing

Task Feasibility uses Apify pay-per-event pricing. One `task-feasibility-report` event is charged only when a complete report is written to the default dataset. The beta event price is USD 0.01 per completed report.

### Limitations

Cost, source identity, requirements, and evidence classes are semantic contracts supplied by the caller. Unknown values remain unknown. Human review remains appropriate for consequential actions and for requirements that cannot be represented safely as structured checks.

### Suez Evidence & Decision Infrastructure for AI Agents

Task Feasibility is part of the Suez evidence-and-decision tool family. A workflow can use **Agent Readiness** for publication readiness, **Research Verification** for evidence sufficiency, **Task Feasibility** before execution, **Opportunity Decision** for bounded GO/REVIEW/NO\_GO qualification, and **Decision Monitor** for later decision/evidence deltas. Each Actor remains independently callable.

# Actor input Schema

## `task` (type: `string`):

The action or verification task being preflighted.

## `requirements` (type: `array`):

Deterministic requirements. Required mismatches become hard blockers; absent required attributes remain unknown.

## `attributes` (type: `object`):

Map requirement keys to the values currently available to the caller or agent.

## `required_evidence_classes` (type: `array`):

Evidence classes that must be present before full confidence is justified.

## `required_source_ids` (type: `array`):

Specific source identities that must be represented in the evidence inventory.

## `evidence` (type: `array`):

Caller-supplied evidence currently available to the task.

## `as_of` (type: `string`):

ISO 8601 timestamp used for freshness calculations.

## `max_budget_usd` (type: `number`):

Optional maximum known execution/data budget.

## `estimated_cost_usd` (type: `number`):

Optional known execution/data cost. Leave absent when cost is unknown rather than inventing a value.

## `contradiction_ratio` (type: `number`):

Optional upstream contradiction ratio between 0 and 1.

## Actor input object example

```json
{
  "task": "Verify a current official port restriction",
  "requirements": [
    {
      "key": "source_access",
      "required": true,
      "allowed_values": [],
      "match_mode": "present",
      "weight": 1
    }
  ],
  "attributes": {
    "source_access": {
      "values": [
        "available"
      ]
    }
  },
  "required_evidence_classes": [
    "official_notice"
  ],
  "required_source_ids": [
    "port-authority"
  ],
  "evidence": [
    {
      "id": "notice",
      "evidence_class": "official_notice",
      "source": {
        "id": "port-authority",
        "url": "https://example.org/notice"
      },
      "evidence_kind": "TRANSMITTED",
      "observed_at": "2026-09-06T10:00:00Z",
      "max_age_seconds": 86400
    }
  ],
  "as_of": "2026-09-06T12:00:00Z",
  "max_budget_usd": 1,
  "estimated_cost_usd": 0.2,
  "contradiction_ratio": 0
}
```

# Actor output Schema

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

Default dataset items containing decision, hard blockers, unknown requirements, available and missing sources, missing evidence, freshness issues, budget status, confidence ceiling and reasons.

# 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 = {
    "requirements": [
        {
            "key": "source_access",
            "required": true,
            "allowed_values": [],
            "match_mode": "present",
            "weight": 1
        }
    ],
    "attributes": {
        "source_access": {
            "values": [
                "available"
            ]
        }
    },
    "required_evidence_classes": [
        "official_notice"
    ],
    "required_source_ids": [
        "port-authority"
    ],
    "evidence": [
        {
            "id": "notice",
            "evidence_class": "official_notice",
            "source": {
                "id": "port-authority",
                "url": "https://example.org/notice"
            },
            "evidence_kind": "TRANSMITTED",
            "observed_at": "2026-09-06T10:00:00Z",
            "max_age_seconds": 86400
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("suezcanal.xyz/task-feasibility").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 = {
    "requirements": [{
            "key": "source_access",
            "required": True,
            "allowed_values": [],
            "match_mode": "present",
            "weight": 1,
        }],
    "attributes": { "source_access": { "values": ["available"] } },
    "required_evidence_classes": ["official_notice"],
    "required_source_ids": ["port-authority"],
    "evidence": [{
            "id": "notice",
            "evidence_class": "official_notice",
            "source": {
                "id": "port-authority",
                "url": "https://example.org/notice",
            },
            "evidence_kind": "TRANSMITTED",
            "observed_at": "2026-09-06T10:00:00Z",
            "max_age_seconds": 86400,
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("suezcanal.xyz/task-feasibility").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 '{
  "requirements": [
    {
      "key": "source_access",
      "required": true,
      "allowed_values": [],
      "match_mode": "present",
      "weight": 1
    }
  ],
  "attributes": {
    "source_access": {
      "values": [
        "available"
      ]
    }
  },
  "required_evidence_classes": [
    "official_notice"
  ],
  "required_source_ids": [
    "port-authority"
  ],
  "evidence": [
    {
      "id": "notice",
      "evidence_class": "official_notice",
      "source": {
        "id": "port-authority",
        "url": "https://example.org/notice"
      },
      "evidence_kind": "TRANSMITTED",
      "observed_at": "2026-09-06T10:00:00Z",
      "max_age_seconds": 86400
    }
  ]
}' |
apify call suezcanal.xyz/task-feasibility --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,suezcanal.xyz/task-feasibility"
        }
    }
}

```

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/bXTz6iiFab1q1TrvD/builds/LMr0othf9QpHV94hq/openapi.json
