Agent Error Classifier avatar

Agent Error Classifier

Pricing

$0.001 / actor start

Go to Apify Store
Agent Error Classifier

Agent Error Classifier

Sort API, HTTP and tool errors from your AI agent into clear categories like rate limit, auth or timeout, with a hint on whether to retry. The original error is kept. $0.001 per run.

Pricing

$0.001 / actor start

Rating

0.0

(0)

Developer

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Features

Limited permissions

Share

Normalize supplied API, HTTP and tool errors into categories, recoverability hints and handling guidance while preserving the original.

This Actor runs Agent Error Classifier only. Supply its native JSON object directly; no utility selector or dispatcher wrapper is accepted. Core computation is deterministic and offline: no LLM calls, remote schema retrieval or target-site requests. Apify runtime storage is used to save the result.

Behavior and limits

Recognizes documented HTTP classes and network codes ECONNRESET, ECONNREFUSED and ETIMEDOUT. Unrecognized errors retain category unknown and null recoverability. Original error information is intentionally included in data.original; redact sensitive caller content before sharing. A recoverability hint does not authorize replay or prove that retry is safe.

Every request is limited to 2,000,000 bytes of canonical UTF-8 JSON. Runtime validation uses the bundled exact input_schema.json. The Console form is a supported Apify schemaVersion 1 presentation: root fields/types are retained, while nested and cross-field constraints run inside the Actor. Inputs containing arbitrary JSON or boolean schemas stay native JSON, without string encoding or forced object conversion. Schema evaluation is intended for bounded trusted workloads; it is not an adversarial multi-tenant sandbox.

Input

FieldRequiredJSON typeMeaning
erroryes"object"Native utility field; exact nested shape is in input_schema.json.

Example input (example-input.json):

{
"error": {
"status_code": 429,
"message": "Slow down"
}
}

Output and status

The Actor stores one result envelope in the default dataset and the same envelope under key OUTPUT in the default key-value store. Data fields for this utility: category, recoverable, guidance, original.

  • status: pass: execution completed and the result/check passed.
  • status: fail: execution completed and found a failed check, policy or retention constraint. This is a completed Actor run, not a runtime crash.
  • status: error: execution could not complete, with stable errors[].code, message and JSON Pointer path; the local process exits 2.

The envelope also contains utility, version, request_id, data, errors, warnings and provenance. See the output_schema.json, .actor/dataset_schema.json, and .actor/output_schema.json. Fields named errors inside data are check findings; envelope errors describe execution failures. Do not treat a platform run's success flag alone as a passing policy/check.

Actual core output for the example (example-output.json):

{
"utility": "agent-error-classifier",
"version": "1.0.0",
"request_id": "documented-example",
"status": "pass",
"data": {
"category": "rate_limit",
"recoverable": true,
"guidance": "Evaluate replay safety and retry policy",
"original": {
"status_code": 429,
"message": "Slow down"
}
},
"errors": [],
"warnings": [],
"provenance": {
"engine": "deterministic-python",
"network_access": false,
"input_hash": "sha256:9962966953f042ff4d4838fa45e1c16ad7d0c7cb5bbf5b2fada4bfb61b8d6710"
}
}

The request ID above is fixed for illustration; actual Actor runs generate their own request IDs. Runtime provenance additionally identifies local or Apify storage; the example shows the utility's computed envelope before that storage annotation. Hashes identify supplied data, not independently verified facts.

Run through the API

Replace YOUR_APIFY_USERNAME with the namespace of this Actor's published listing. The fixed Actor name is agent-error-classifier. This example assumes the Actor has been built and made accessible in that namespace; this README does not itself establish deployment or publication.

curl --fail-with-body --request POST \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data-binary @example-input.json \
'https://api.apify.com/v2/acts/YOUR_APIFY_USERNAME~agent-error-classifier/run-sync-get-dataset-items?format=json'

The response is an array containing the result envelope. Inspect its status and findings before consuming data. For asynchronous integrations, start a run, wait for completion and retrieve the default dataset or key-value-store OUTPUT. API authorization credentials belong in your client environment, never in utility input or captured fixtures.

Run locally

From this self-contained Actor directory, with Python 3.11 or newer:

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python -m app --input example-input.json --storage-dir ./storage

This executes the fixed utility using real local SDK filesystem storage. It does not start another Actor or dispatch to another portfolio utility. A completed finding has envelope status fail while completing the storage run normally; execution errors exit 2. Inspect the stored envelope rather than assuming that a zero process exit means a check passed.

Compose with other utilities

Send the original failure and explicit replay characteristics to Retry Oracle. Use Sensitive Data Redactor before storing error payloads as offline fixtures.

Composition is explicit caller orchestration: this Actor does not invoke other Actors. Pass only documented data fields between contracts and check every envelope status. Offline core tests use supplied fixtures; the Actor does not fabricate evidence or verify that supplied events, usage or artifact references occurred.