Strangly sometimes i need to add {{ JSON.stringify ($json.output) }} because it wont show me the correct structure on Agent .
Then i redo only {{ $json.output }} and it come back working well .
The problem is that it crash my workflow sometimes and it take me some times to undestand that this things suddenly appear .
It’s not strange once you know what’s going on. Internally, in some places, n8n needs the final result of the value/input, for a node parameter, to be a valid JSON string. Sometimes a JS object (different from JSON) still looks exactly like valid JSON (double quotes, array brackets, etc.), so it might work, but you can do some things in JS object syntax that are not allowed in JSON (object notation), so just auto-converting an object to a string does not work.
This post has more detail on how you can more reliably avoid this type of issue in n8n. tl/dr => Use an expression like: {{ { anyValid: 'js object' }.toJsonString() }}