Skip to content
BENIBIX Learn

AssistantMessage

AI🧩 Claude Agent SDKSDK Messages

Also known as SDK assistant message, Claude Agent SDK AssistantMessage

The message that holds one piece of Claude's reply: some text or a tool call.

Think of it like

It is like a note from a helper. It says what they are doing, or gives the answer.

Example

Mia's app shows a line such as Reading auth.ts each time a tool is called.

Why it matters

It is how you show progress while the agent works, step by step.

Definition

AssistantMessage is the Agent SDK message type for what Claude says or asks for. Each one holds a single content block, such as some text or a tool call. Blocks from one model reply share a message ID. The last AssistantMessage in a run holds the final text with no tool call. In TypeScript the blocks sit at message.message.content.

Common mistake

Reading the content field in TypeScript and getting nothing. The blocks sit one level down, inside message.

Key takeaways

  1. 1
    One block each. Text or tool call.
  2. 2
    Shares a message ID. Per reply.
  3. 3
    Shows progress. Step by step.