AgentToAgent is a zero-dependency, production-ready message router for agent-to-agent communication in Python.
It lets you send and receive messages between named agents—perfect for coordinating tasks in multi-agent systems, toolchains, or even distributed apps.
Install
pip install AgentToAgent
Usage
from AgentToAgent import AgentToAgent
ata = AgentToAgent()
# Send a message from one agent to another
ata.send("Alpha", "Bravo", "Ping from Alpha!")
# Agent Bravo receives their messages
messages = ata.receive("Bravo")
print(messages)
# Output: [{'from': 'Alpha', 'to': 'Bravo', 'content': 'Ping from Alpha!'}]
# Support for filtering by sender
ata.send("Alpha", "Charlie", "Hello, Charlie!")
ata.send("Beta", "Charlie", "Hi, Charlie!")
msgs = ata.receive("Charlie", allowedFrom=["Beta"])
print(msgs)
# Output: [{'from': 'Beta', 'to': 'Charlie', 'content': 'Hi, Charlie!'}]
Features
- Direct agent-to-agent messaging – Send and receive by agent name.
- Broadcasting – Send to all by using
toAgent=None. - Filtered receive – Optionally receive only from allowed senders.
- In-memory queue – Each receive call pulls all available messages.
- Zero dependencies – No third-party packages required.
- Works with any agent framework – Simple plug-and-play for any system.
Code Examples
You can find code examples on my GitHub repository.
License
Apache License 2.0
Acknowledgements
Project by:
- Tristan McBride Sr.
- Sybil
Release files for AgentToAgent 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agenttoagent-0.1.0.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agenttoagent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / agenttoagent-0.1.0.tar.gz
| Download URL | agenttoagent-0.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec80bba0d685abfd524a429dcde8fb208d55dd7f5e714008f900a2eb5313033c
|
|
BLAKE2b-256 checksum How to use checksums |
61857836268de252ae6b0652b37974eb566d21b09bc26d7b9d238f7b8a408c78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Release files / agenttoagent-0.1.0-py3-none-any.whl
| Download URL | agenttoagent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d507003706b790a9bede4e4fdf4575e41a2a67404cb5596032360f4ab24cabd5
|
|
BLAKE2b-256 checksum How to use checksums |
b13de9f520ef6b276de51b6d2bbe5049094b79d800e50bd8d98a0e5ecaad4c62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|