Skip to main content
A reply sends a message back into the conversation. Agents can reply with plain text, markdown with files, or interactive cards, depending on provider capabilities. Interactive cards include buttons, dropdowns, links, and text inputs. When a user interacts with a card, the onAction handler fires with the action ID and selected value. Use replies when the agent needs to communicate something to the participant in the conversation. Replies are user-facing messages your agent sends back into the conversation. Use signals when you need to update conversation state, trigger workflows, or resolve the thread without messaging the user. The public API is ctx.reply(content, options?). You can also return a string or JSX card from a handler instead of calling ctx.reply() directly. To send a reply from your backend without going through the bridge handler, use the Send an agent reply API.

Reply types at a glance

The following table summarizes the reply types your agent can send: To change a message after you send it, see Edit sent messages.

Plain text

Send a simple string reply with ctx.reply():

Markdown

Send formatted text by passing a markdown string to ctx.reply():

Sending attachments

Include files with string or markdown replies via the optional second argument. When sending attachments, keep these limits in mind:
  • Attachments are limited to 25 MB per file.
  • Files are only supported with string or markdown replies, not card replies.
  • Provide each file with exactly one of url or data.

File reference type

Each file uses a FileRef object with the following shape:
Use url for larger files. Novu fetches public HTTP(S) URLs server-side. Use data for small generated files in memory. The following examples show both approaches:

Interactive cards

Cards are structured messages with buttons, dropdowns, links, and more. Build them with function calls or JSX.
The following example builds a card with the function call API:

Available card components

The following table lists the card components you can use in replies:

Edit sent messages

Update a message in place after sending it with ReplyHandle.

Signals

Metadata, workflow triggers, and conversation resolution.

AI SDK

Build end to end with @novu/framework/ai-sdk.

Send an agent reply API

Send replies from your backend without a bridge handler.