edit • AI Agent SDK

edit: Edit a prior message this agent/session sent (Issue #5054).

edit

Async

Method

</div>

This is a method of the OutboundMessengerProtocol class in the protocols module.

Edit a prior message this agent/session sent (Issue #5054).

Lets an agent update its own live status message in place rather than posting a follow-up — e.g. editing “Working…” to “Done ✅”. Gated on the channel’s `PlatformCapabilities.supports_edit; a channel that cannot edit returns a typed unsupported` outcome instead of raising.

Signature

python
async def edit(target: str, message_id: str, text: str) -> 'MessageActionResult'

Parameters

ParamField str

Symbolic target token (“origin”, “&lt;platform&gt;”, “&lt;platform&gt;:&lt;chat_id&gt;[:&lt;thread_id&gt;]”, or a friendly alias).

ParamField str

The id of the message to edit.

ParamField str

The new message text.

Returns

ResponseField 'MessageActionResult'

class:MessageActionResult describing the outcome.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3671