> ## 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.

# edit • AI Agent SDK

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

# edit

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.

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 theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def edit(target: str, message_id: str, text: 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 edit.

**text** `str` *required*

The new message text.

### Returns

**Returns** `'MessageActionResult'`

class:`MessageActionResult` describing the outcome.

## Source

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


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