Skip to main content
Every incoming message arrives through app.messages as a tuple containing a and a . The space is already bound to the originating conversation — you don’t need to resolve it yourself to reply.

Receiving messages

Messages from every configured provider merge into this single stream. The order reflects arrival time.

The Message shape

Every message conforms to .

Narrowing content

is a discriminated union. Narrow on message.content.type before accessing fields:
Outgoing-only variants like "effect" (an iMessage screen effect wrapping inner content) appear on messages you sent and are echoed by the platform; see iMessage for the builder. Group-management events (rename, avatar, addMember, removeMember, leaveSpace) arrive with message.sender set to the acting user — or undefined when the platform recorded no actor — so narrow with message.sender?.id. The agent’s own actions (e.g. space.add(...)) are not echoed back.

Filtering out your own messages

Every carries a direction. Skip outbound messages when you only want user input:

Acting on a message

Every message is its own context. You can reply, react, or send new content into the space:
See Content for all the ways to build outgoing messages, and Reactions and replies for the details of react and reply.