Edit sent messages
Update a message in place after sending it with ctx.reply() and ReplyHandle.
ctx.reply() returns a ReplyHandle so that you can edit the message you just sent on the provider. This is useful when you post "Processing..." and replace it with the final text.
That is not a reply type; it updates a message you already sent.
Basic edit
The following example sends a placeholder message, does work, then updates the same message in place:
Edit with attachments
You can attach files when editing plain text or markdown content. The next example attaches a file when updating the message text:
Edits update the existing platform message rather than posting a new one. Not every provider supports message editing. For which capabilities each provider supports, see Agents and providers.