> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# delete • AI Agent SDK

> delete: Delete/unsend a prior message this agent/session sent (Issue #5054).

# delete

AsyncMethod

> This is a method of the [**OutboundMessengerProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/OutboundMessengerProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) 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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def delete(target: str, message_id: str) -> 'MessageActionResult'
```

## Parameters

**target** `str` *required*

Symbolic target token ("origin", "\<platform>", "\<platform>:\<chat\_id>\[:\<thread\_id>]", or a friendly alias).

**message\_id** `str` *required*

The id of the message to delete.

### Returns

**Returns** `'MessageActionResult'`

class:`MessageActionResult` describing the outcome.

## Used By

* [`Knowledge.delete`](../functions/Knowledge-delete)
* [`Memory.delete_long_term`](../functions/Memory-delete_long_term)

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L3556)**
>
> `praisonaiagents/gateway/protocols.py` at line 3556


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.