Agent-native event bus — connect agents, humans, and systems via typed events
Project description
agentmesh is the event bus built for production AI agents. Kafka moves bytes. AgentMesh moves meaning — every event carries tenant, trace, causality chain, and publisher type.
Install
pip install agentmesh-py # zero-dep core
pip install "agentmesh-py[redis]" # Redis Streams transport
pip install "agentmesh-py[kafka]" # Kafka transport
pip install "agentmesh-py[all]" # everything
Quickstart
import asyncio
from agentmesh import AgentMesh, AgentEvent
async def main():
mesh = AgentMesh()
await mesh.start()
@mesh.subscribe("order.*")
async def handle(e: AgentEvent) -> None:
print(f"[{e.tenant_id}] {e.event_type}: {e.data}")
await mesh.publish("order.created",
data={"order_id": "ORD-001", "amount": 299.99},
publisher_id="billing-agent",
session_id="sess-001", run_id="run-001",
tenant_id="acme",
)
await asyncio.sleep(0.1)
await mesh.close()
asyncio.run(main())
Why AgentMesh
| Kafka / Redis | AgentMesh | |
|---|---|---|
| Tenant isolation | Manual | ✓ Built-in |
| Trace propagation | Manual | ✓ Automatic |
| Causality chain | None | ✓ caused_by_event_id |
| Human publishers | No concept | ✓ First-class |
| Zero-dep start | Needs server | ✓ pip install, run |
| 14 event categories | Raw bytes | ✓ Typed taxonomy |
| Always persistent | Config required | ✓ Default on |
Features
- NATS wildcards —
order.*,*.failed,acme:>,> - Consumer groups —
group="workers", one handler per event - Full replay —
async for e in mesh.replay("order.created") - Human publishers —
publisher_type="human"is first-class - Request/reply —
await mesh.request(...)for HITL flows - Dead letter queue — per-topic, configurable
max_retries - Idempotency —
event_iddedup (default 24h window) - Server-side filters —
filter={"data.amount": {"$gt": 1000}} - Topic pause/resume — queue events, flush on resume
- OTel native — spans + metrics, Grafana/Datadog/Honeycomb
Stack
agentmesh → event bus connects agents, humans, systems
agentplane → control plane runtime policy, versioning, escalation
agenthooks → extensibility hookpoints, customer hooks
AgentGuard → safety injection, PII, jailbreak
agentregistry → discovery publish, version, deploy agents
agenteval → quality golden, adversarial, policy tests
pip install agentmesh-py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agentmesh_bus-0.1.0.tar.gz
(38.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentmesh_bus-0.1.0.tar.gz.
File metadata
- Download URL: agentmesh_bus-0.1.0.tar.gz
- Upload date:
- Size: 38.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa848b3836bbae83f7b455d2e76c4ea793c801441deff23599542c2d97a58494
|
|
| MD5 |
443c1943bbe7ebf201f0d24cf2efb042
|
|
| BLAKE2b-256 |
6f09cefec0babc0088ac3c2ab051f9d448ab33ef2bb14b2569285ee136f97232
|
File details
Details for the file agentmesh_bus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentmesh_bus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
372fbb5a88c14afcf640f46d39811fc23a73d2c837c9547b062121bde54de0c5
|
|
| MD5 |
013b0895597ce2dec3cd61c6d6c125a5
|
|
| BLAKE2b-256 |
066042728c3c33f752d2fe36023ecbc52e55275fd90db17dff263341b8312d6f
|