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

# messaging • AI Agent SDK

> Addressed agent-to-agent messaging for PraisonAI Agents.

# messaging

<Badge color="blue">AI Agent</Badge>

Addressed agent-to-agent messaging for PraisonAI Agents.

Provides a first-class, *addressed* messaging primitive: send a message to a
named recipient agent and receive/subscribe to your inbox. This complements the
existing mechanisms rather than replacing them:

* `bus` — type-filtered, in-process pub/sub (no recipient addressing).
* `kanban` comments — shared task board (pull-based, task-scoped).
* `handoff` — synchronous parent -> child delegation.

Protocol-first (AGENTS.md §3.2): the core SDK ships the `AgentMailboxProtocol`
contract plus a light in-process default (:class:`InProcessMailbox`). The
wrapper (praisonai) can add a heavy Redis-backed implementation for
cross-process / cross-host fleets under an `agent:` namespace.

Zero overhead: nothing is instantiated unless a mailbox is explicitly created.

Usage:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents.messaging import InProcessMailbox

mailbox = InProcessMailbox()
mailbox.send("writer", {"findings": data}, sender="researcher")
msgs = mailbox.receive("writer")
```

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import messaging
```
