Return the text content of the last AIMessage in messages.
Used by the default Invocations and non-streaming Responses converters
to surface the assistant's final answer after a graph run. When no
AIMessage is present the function returns an empty string.