Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

My Actors worked fine until an AI agent called them

Description and use

Claude’s AI agent exposed issues in 14 Apify Actors due to input schema design and error handling. Redesigning schemas, adding explicit status fields, and proper dataset access made the Actors robust for AI calls.

Problem

An AI agent calling Apify Actors via MCP misinterpreted input schemas and output handling, causing empty results, permission errors, and incorrect data interpretation.

Outcome

By refining input schemas, adding explicit status fields, and handling dataset access properly, the Actors became robust against AI agent calls, preventing silent failures and misinterpretations.

Workflow

  • 1. Expose Actors as MCP tools and connect to Claude.
  • 2. Agent sends a natural language task to find a product across stores.
  • 3. Actor receives input, runs scraper, and returns results.
  • 4. Agent interprets output; if empty array, assumes no data.
  • 5. Issues arise: empty arrays for both missing data and errors, permission errors when accessing datasets, and ambiguous input fields.
  • 6. Redesign input schema: remove site‑specific IDs, use enums, and document fields clearly.
  • 7. Modify output to include status, lookupStatus, and lookupDetail fields.
  • 8. Update product pipeline to pass dataset path or items directly, avoiding cross‑run dataset access.
  • 9. Test with agents to ensure correct branching and error handling.

Evidence

The agent picked my Actor, filled the input, started the run. Status: succeeded. Zero results, no error.

Source

Empty result. The same thing the Actor returns when a company is genuinely absent from the registry.

Source

An Actor with standard permissions cannot read the default dataset of a different run, and the API answers Insufficient permissions.

Source

  • Record date: 2026-09-05T19:15:00.149Z