You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to aggregate data across parallel iterations in a For Loop node in Workflow (AI Agent studio)?

Summary:
When running a For Loop node in parallel mode within AI Agent Studio, modifying a global variable inside a Code Node causes a race condition. Out of multiple parallel iterations (e.g., 4), only one iteration's output is appended to the global variable, while the rest are overwritten and lost.

Content:

Hi everyone,

I am building a Workflow Agent in AI Agent Studio and encountering a state concurrency issue when accumulating data within a For Loop node running in parallel mode.

(Note: To clarify, I am NOT using a separate "Run in Parallel" node inside the loop—I am using a single For Loop node with parallel execution enabled across an array of records.)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!