Fix Agent node structured output not updating flow state variables (#5548)
Fix Agent state processing for structured output
Updated the Agent class to handle structured output by passing a JSON string instead of a markdown-wrapped response to the `processTemplateVariables` function. This change allows for proper nested property access and resolves string replacement issues with object coercion.