Strands Agents Typescript SDK
    Preparing search index...

    Class AgentResult

    Result returned by the agent loop.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    type: "agentResult" = ...
    stopReason: string

    The stop reason from the final model response.

    lastMessage: Message

    The last message added to the messages array.

    Methods

    • Extracts and concatenates all text content from the last message. Includes text from TextBlock and ReasoningBlock content blocks.

      Returns string

      The agent's last message as a string, with multiple blocks joined by newlines.