Skip to content
BENIBIX Learn

StreamEvent

AI🧩 Claude Agent SDKSDK Messages

Also known as partial message, includePartialMessages, Claude Agent SDK StreamEvent

The message for each small bit of a reply. It lets text show as it is typed.

Think of it like

It is like hearing each word as it is said.

Example

Mia wants her chat to type out answers live. She turns on partial messages and draws each StreamEvent's text as it comes.

Why it matters

Users trust a reply more when they can see it being written.

Definition

StreamEvent is the message type for small raw parts of a reply as the model writes them. You only get them when you turn on partial messages. The option is includePartialMessages in TypeScript. Use them to show text as it is typed. Without them, you see each block only when it is done.

Common mistake

Waiting for StreamEvents with the option off. They never come unless you turn it on.

Key takeaways

  1. 1
    Raw pieces. As they are written.
  2. 2
    Off by default. Turn it on.
  3. 3
    For live text. Typing effect.