delete • AI Agent SDK
delete: Delete/unsend a prior message this agent/session sent (Issue #5054).
delete
Async
Method
</div>
This is a method of the OutboundMessengerProtocol class in the protocols module.
Delete/unsend a prior message this agent/session sent (Issue #5054).
Lets an agent retract a message it should not have sent. Gated on the channel’s `PlatformCapabilities.supports_delete; a channel that cannot delete returns a typed unsupported` outcome instead of raising.
Signature
async def delete(target: str, message_id: str) -> 'MessageActionResult'Parameters
ParamField
strSymbolic target token (“origin”, “<platform>”, “<platform>:<chat_id>[:<thread_id>]”, or a friendly alias).
ParamField
strThe id of the message to delete.
Returns
ResponseField
'MessageActionResult'class:MessageActionResult describing the outcome.
Used By
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 3695