Two Actors, one agent, and the three ways my chain broke
A client asked a question that sounds simple: which sellers on the marketplaces are risky to buy from? Answering it takes two steps. Find the sellers behind the product listings, then check each seller's legal entity against public risk registries. I had an Actor for each half already. One walks marketplace search results and returns sellers with their tax ID, legal name and store URL. The other…
Two actors, one agent, and the three ways my chain broke. I had two actors working on a task, each responsible for a different part of the process. The first actor scraped marketplace search results and returned sellers with their tax ID, legal name, and store URL. The second actor took those tax IDs and returned a risk score built from various sources.
The two actors ran separately, with each one providing input for the next. When I tried to connect them using an agent, the chain broke three times. The first break occurred because the agent couldn't properly hand off data between the two actors. The agent accessed the actors through the Apify MCP server, which exposed them as tools over the Model Context Protocol.
However, the agent's treatment of the actors as one tool led to issues when wiring them together. The second break happened because the output from the first actor did not fit the input requirements of the second actor. The seller scraper returned a tax ID for most sellers, but not all. Some storefronts had no legal entity attached at all.
When those sellers were passed to the risk checker, the actor treated empty strings as valid input, resulting in incorrect risk scores for those sellers. The third break was due to permissions issues when running the agents on the platform. The agent attempted to read data from the first actor's dataset using standard permissions, but it was unable to do so.
This resulted in the agent failing to complete its task and contributing to the overall failure of the chain.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.