Skip to main content
agentmesh

CI PyPI Python License


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 wildcardsorder.*, *.failed, acme:>, >
  • Consumer groupsgroup="workers", one handler per event
  • Full replayasync for e in mesh.replay("order.created")
  • Human publisherspublisher_type="human" is first-class
  • Request/replyawait mesh.request(...) for HITL flows
  • Dead letter queue — per-topic, configurable max_retries
  • Idempotencyevent_id dedup (default 24h window)
  • Server-side filtersfilter={"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

Apache 2.0 · Docs · PyPI

pip install agentmesh-py

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)

Source distribution for agentmesh-bus 0.1.0
File Size Uploaded
agentmesh_bus-0.1.0.tar.gz 38.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentmesh-bus 0.1.0
File Interpreter ABI Platform
agentmesh_bus-0.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page