Data Action JSON mapping failing with 500 error

I’m trying to map the response from a simple external REST call into Architect variables. The external service returns a flat JSON object with string values. I’ve set up the Data Action to parse the JSON body, but the mapping step seems to choke on the specific key structure. It’s throwing a generic 500 Internal Server Error in the flow logs. The response looks like {“status”: “success”, “agent_id”: “12345”}. I just need to pull that agent_id into a variable called TargetAgent.

Here is the mapping JSON I’m using in the Data Action definition:

{
 "TargetAgent": "$.agent_id"
}

The documentation suggests this dot notation should work for flat objects. I’ve tried using the full path $.response.body.agent_id but that fails too. The API call itself succeeds with a 200 OK. What am I missing in the mapping syntax?