Describe the problem/error/question
I want to get access to the last message my AI Agent generated (gemini model) in a variable that i can proceed working with.
Is there any way to get this access?
Yes, it’s in the output field of the AI Agent node’s JSON output, no matter which chat model is plugged into it.
Accessing it
| The node right after AI Agent |
| Anywhere further downstream |
Turning it into a reusable variable
agentMessage{{ $json.output }}{{ $json.agentMessage }} (or {{ $('Edit Fields').item.json.agentMessage }} from further away) instead of the raw agent outputTo Check If It Is Not Working
output anymore it’ll be whatever fields your schema defines instead.output, it only carries the final message. Pulling cost/token data requires a separate setup, since the Agent node doesn’t expose the raw Gemini response by default.