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

# Platform Event • AI Agent SDK

> PlatformEvent: A normalised inbound platform event that is not a text/media message.

# PlatformEvent

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

A normalised inbound platform event that is not a text/media message.

Reactions, edits, deletions, membership changes and thread lifecycle are
delivered by the platform SDK but are not messages. This is the single
shared, protocol-only contract every adapter emits into and every hook or
plugin consumes — the inbound counterpart to the outbound `ReactionResult`
/ message-action surface the bot already ships.

Adapters build one of these from the native event and emit it via
`MessageHookMixin.fire_platform_event` (praisonai-bot), which routes it to
the matching :class:`~praisonaiagents.hooks.types.HookEvent`
(`REACTION_RECEIVED`/`MESSAGE_EDITED`/`MESSAGE_DELETED`/
`MEMBER_JOINED`/`MEMBER_LEFT`/`THREAD_CREATED`). Platforms that cannot
deliver a given event simply never build one — graceful, capability-gated,
exactly like the outbound `capabilities["reactions"]` gate.

Attributes:
kind: Which normalised event this is (see :data:`PlatformEventKind`).
platform: Emitting platform name (`"telegram"`/`"discord"`/…).
chat\_id: Channel/chat the event occurred in.
user\_id: The user who caused the event (reactor, editor, joiner, …).
message\_id: The message the event targets (reactions/edits/deletes).
emoji: The reaction emoji, for reaction add/remove.
new\_text: The new content, for an edit.
thread\_id: The thread identifier, for thread creation / threaded events.
raw: Escape hatch to the native SDK payload for adapter-specific needs.

## Properties

**kind** `PlatformEventKind`

No description available.

**platform** `str`

No description available.

**chat\_id** `str`

No description available.

**user\_id** `str`

No description available.

**message\_id** `Optional[str]`

No description available.

**emoji** `Optional[str]`

No description available.

**new\_text** `Optional[str]`

No description available.

**thread\_id** `Optional[str]`

No description available.

**raw** `Optional`

No description available.

> **Internal & Generic Methods**
>
> * **to\_dict**: Convert to dictionary (native `raw` payload intentionally omitted).

## Source

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


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