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
Metadata
Release files for agentmesh-bus 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 | Provenance | Actions |
|---|---|---|---|---|
| agentmesh_bus-0.1.0.tar.gz | 38.3 kB | Without provenance | Details for agentmesh_bus-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentmesh_bus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentmesh_bus-0.1.0-py3-none-any.whl |
Total release size: 53.3 kB
Release files / agentmesh_bus-0.1.0.tar.gz
| Download URL | agentmesh_bus-0.1.0.tar.gz |
|---|---|
| Size | 38.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa848b3836bbae83f7b455d2e76c4ea793c801441deff23599542c2d97a58494
|
|
BLAKE2b-256 checksum How to use checksums |
6f09cefec0babc0088ac3c2ab051f9d448ab33ef2bb14b2569285ee136f97232
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / agentmesh_bus-0.1.0-py3-none-any.whl
| Download URL | agentmesh_bus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
372fbb5a88c14afcf640f46d39811fc23a73d2c837c9547b062121bde54de0c5
|
|
BLAKE2b-256 checksum How to use checksums |
066042728c3c33f752d2fe36023ecbc52e55275fd90db17dff263341b8312d6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for agentmesh-bus 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.