Skip to main content

ctx.emit({ name, data }) sends a named payload on the current turn. It is not a chat message. It is not a signal.

Use ctx.reply() when the subscriber must see text or a card. Use ctx.emit() when your client needs structured data during the turn, for example progress or a machine-readable status.

The call posts at once. It does not wait for ctx.reply(). Custom-code agents need a @novu/framework version that sends AgentEvents through the event outbox. The bridge always supplies eventsUrl.

Channel support#

ChannelWhat the subscriber sees
Web ChatA data part on the in-flight assistant message
Slack, Teams, WhatsApp, Telegram, EmailNothing in the thread. Novu stores the event on the conversation.

Send an event#

name is a non-empty string. data is yours. JSON size must stay at or under 64 KB. Novu drops the event when name is empty or data is over the limit.

You can call ctx.emit more than once in one turn. Each call is a separate event.

Web Chat#

Web Chat adds each event to the assistant message as part.type === 'data'. The fields are name and data.

Render the parts you support. Skip the rest. The part stays on the message.

Client walk: Custom data.