Skip to main content
agent-mesh

agent-mesh

Cryptographic peer-to-peer agent coordination.

No broker. No scp'd tokens. No centralized configuration.

CI PyPI License


A small Rust workspace that gives multi-agent systems a shared root of trust (ed25519 user key, cross-signed by your existing GitHub SSH key) and direct, verifiable peer messaging.

Two agents that share a user identity discover each other on the LAN, authenticate via cert chain at the QUIC handshake, and exchange signed envelopes — without a broker in the middle and without scp'ing tokens around.

CLI: amesh (workspace member agent-mesh-cli). Libraries:

  • agent-mesh-protocol — identity types, signed envelopes.
  • agent-mesh-discovery — LAN discovery via mDNS.
  • agent-mesh-transport — authenticated QUIC transport via iroh.
  • agent-mesh-transport-ssh — AgentKey-authenticated sessions over OpenSSH.
  • agent-mesh-bus — high-level pub/sub + request/reply.
  • agent-mesh-py — Python bindings (PyPI package agent-mesh).

License: Apache-2.0.

Python install

pip install newt-agent-mesh

(The PyPI distribution name is newt-agent-mesh because agent-mesh is blocked by PyPI's similarity check — see the note in pyproject.toml. The Python import path is unchanged: import agent_mesh.core.)

This installs the Python package agent_mesh with submodules .core, .discovery, .transport, .bus, and puts a native-Python amesh on $PATH (agent_mesh.cli:main) with full subcommand parity with the Rust binary below — both operate on the same ~/.agent-mesh/ layout, so you can swap between them freely.

Rust install

The library crates are on crates.io:

# Cargo.toml
[dependencies]
agent-mesh-protocol = "0.8"   # ed25519 identity, signed envelopes
agent-mesh-discovery = "0.8"  # mDNS LAN discovery
agent-mesh-transport = "0.8"  # authenticated QUIC via iroh
agent-mesh-bus = "0.8"        # high-level pub/sub + request/reply
agent-mesh-flock = "0.8"      # a flock's signed, verified work log

The amesh CLI:

cargo install agent-mesh-cli   # binary lands as `amesh` on PATH

(The -protocol suffix on the foundation crate is because agent-mesh-core on crates.io is owned by an unrelated project. The Rust crate name is agent-mesh-protocol; the Python user-facing submodule it powers is still agent_mesh.core.)

Discovery (Phase 1)

amesh can announce itself on the LAN and list every other agent it sees there, with no broker or central registry. Service type: _agent-mesh._udp.local.

# Terminal A — announce this agent for 5 minutes, advertising
# `ollama` and `vllm` capabilities under the role `inference-worker`.
amesh announce --capability ollama --capability vllm \
                --role inference-worker --duration 5m

# Terminal B — list everyone on the LAN for the next 5 seconds.
amesh peers --listen 5s

# Or only those sharing our user fingerprint:
amesh peers --listen 5s --same-user

Sample amesh peers output:

listening for peers for 5s...

discovered 2 peer(s):

AGENT          SAME?  ROLE@HOST                     PORT   CAPABILITIES
abcd12345678   yes    inference-worker@host-a       0      ollama,vllm
ef9876543210   no     orchestrator@host-b           0      orchestrator

The fingerprints in mDNS TXT records are claims; verification happens during the Phase 2 transport handshake (below).

Transport (Phase 2)

Phase 2 layers an authenticated QUIC transport on top of Phase 1 discovery. Two architectural notes:

  • The agent's ed25519 signing key doubles as its iroh EndpointId, so a peer who knows your agent fingerprint already knows enough to address your iroh endpoint. No separate "node ID" to manage.
  • After ALPN negotiation (agent-mesh/v1), both ends exchange cert chains and enforce the auto-team rule fail-closed: if peer user_pubkey != ours and no pact exists, the handshake rejects before any payload data crosses the boundary.

The CLI splits "I want to be discovered" from "I want to be reachable":

Subcommand Discoverable? Reachable (QUIC)?
amesh announce yes no (publishes port 0)
amesh listen yes yes (binds + announces)

End-to-end smoke (same user on two terminals):

# Terminal A — bind QUIC, announce on mDNS, accept envelopes
amesh listen --duration 60s
# prints:
#   listening on udp/<port>
#     agent_fp=<fp>
#     user_fp =<user_fp>

# Terminal B — within that 60s window:
amesh send <fp-from-terminal-A> --payload '{"hello":"world"}'
# Terminal A then prints one JSON line per received envelope:
#   {"sender_agent_fp":"...","sender_user_fp":"...","sequence":0,
#    "payload":{"encoding":"utf8","text":"{\"hello\":\"world\"}"}}

If you point amesh send at a peer that belongs to a different user, the handshake closes the connection cleanly and both sides report auto-team check failed: ....

For networks reached through an SSH bastion, the optional agent-mesh-transport-ssh crate treats OpenSSH as a byte-stream carrier and runs a separate, mutually authenticated AgentKey session inside it. The inner session proves live possession, binds records to a fresh transcript, and is the only source of AuthenticatedPeer provenance; neither the SSH account nor a SignedEnvelope is treated as carrier identity. See the SSH transport decision record for the trust model and its explicit relay limitations.

Revocation

amesh keygen also writes revocation.json beside user.key: a signed, append-only log (see docs/decisions/revocation.md).

amesh revoke <agent-fingerprint>     # revoke an agent (may be on another machine)
amesh revocation bump                # raise the generation; older-scoped certs lapse
amesh revocation show                # user, length, head, generation, revoked set
amesh revocation export <path>       # atomic copy of the verified log
amesh revocation init                # genesis log for a user key that has none

Every write holds a lock on revocation.json.lock, verifies the log first and refuses one that fails verify(). The pip-installed amesh has the same commands.

Python Usage

Install the wheel:

pip install newt-agent-mesh

(See the install section above for why the distribution name is newt-agent-mesh and not agent-mesh. The import path is unchanged.)

Identity round-trip — no network required:

import agent_mesh.core as core

# Generate a user key (root of trust).
user = core.UserKey.generate()
print("user fp:", user.fingerprint().hex())

# Issue an agent key signed by that user.
meta = core.AgentMetadata(
    role="my-agent",
    host="my-machine",
    capabilities=["inference"],
    issued_at="2026-05-29T00:00:00Z",
)
agent = core.AgentKey.issue(user, meta)
print("agent fp:", agent.fingerprint().hex())

# Build and verify a signed envelope.
recipient = core.Recipient.topic("hello/world")
env = core.SignedEnvelope(agent, recipient, sequence=1, payload=b"hi")
env.verify()  # raises core.MeshError on tamper

Request/reply over an authenticated mesh — needs mDNS on the LAN:

import asyncio
import agent_mesh.core as core
import agent_mesh.bus as bus


async def main() -> None:
    user = core.UserKey.generate()
    meta = core.AgentMetadata(
        role="echo",
        host="localhost",
        capabilities=["test"],
        issued_at="2026-05-29T00:00:00Z",
    )
    server_agent = core.AgentKey.issue(user, meta)
    client_agent = core.AgentKey.issue(user, meta)

    server_bus = await bus.Bus.bind(user, server_agent, 0)
    client_bus = await bus.Bus.bind(user, client_agent, 0)

    topic = bus.Topic(user.fingerprint(), "echo")
    server_bus.handle_requests(topic, lambda body: b"echo: " + body)

    # Let mDNS settle.
    await asyncio.sleep(0.5)

    reply = await client_bus.request(
        server_bus.agent_fingerprint(),
        topic,
        b"hi",
        timeout_ms=5000,
    )
    print(reply)  # b'echo: hi'

    await server_bus.close()
    await client_bus.close()


asyncio.run(main())

The handler must return bytes directly. Async handlers (callables that return a coroutine) are recognized and rejected in this release; wrap any async work in asyncio.run(...) inside the sync handler.

Metadata

Release files for newt-agent-mesh 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for newt-agent-mesh 0.8.2
File Size Uploaded Provenance Actions
newt_agent_mesh-0.8.2.tar.gz 273.1 kB With provenance Details for newt_agent_mesh-0.8.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for newt-agent-mesh 0.8.2
File Actions
newt_agent_mesh-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for newt_agent_mesh-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
newt_agent_mesh-0.8.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for newt_agent_mesh-0.8.2-cp312-cp312-macosx_11_0_arm64.whl
newt_agent_mesh-0.8.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for newt_agent_mesh-0.8.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
newt_agent_mesh-0.8.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for newt_agent_mesh-0.8.2-cp311-cp311-macosx_11_0_arm64.whl
newt_agent_mesh-0.8.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for newt_agent_mesh-0.8.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
newt_agent_mesh-0.8.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for newt_agent_mesh-0.8.2-cp310-cp310-macosx_11_0_arm64.whl
newt_agent_mesh-0.8.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for newt_agent_mesh-0.8.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
newt_agent_mesh-0.8.2-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details for newt_agent_mesh-0.8.2-cp39-cp39-macosx_11_0_arm64.whl

Total release size: 48.4 MB

Release files / newt_agent_mesh-0.8.2.tar.gz

Download URL newt_agent_mesh-0.8.2.tar.gz
Size 273.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6b82ca301d572773ff2daf0945d75ad9a7dd4e622137a4144fa9dbb873cce031
BLAKE2b-256 checksum
How to use checksums
dfd434cbe76e8c9858d35c3c3a0d5158516cdb18726c86de3fa71a6c22b8a397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL newt_agent_mesh-0.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.8 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3d6f0a648ac80a73fdcf3e74bb63e34e9b421605d936a74ab1fee9e24ad77013
BLAKE2b-256 checksum
How to use checksums
73d6764567fd4f7013471d7211b77dd4b81957c9be79bf8c4ef86fc10e911c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL newt_agent_mesh-0.8.2-cp312-cp312-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
184ca2f1825f653b2dfa7492d95b5bfaa4f699a7df461972280fac7af2b80061
BLAKE2b-256 checksum
How to use checksums
f21483f2b8156f0df056a5a32c617a21115e26c947f0f24d8716d914a9197b24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL newt_agent_mesh-0.8.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.8 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
39e65aa6974a95bd19bee59671f4e202dd0c3f8bf99913418d3edbf08578c2d7
BLAKE2b-256 checksum
How to use checksums
003b79855eb7f4e09ca6bf8a546f54452222eb1932078a4a48b9e621e8957407
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL newt_agent_mesh-0.8.2-cp311-cp311-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8c7f5f80dab9e5dbb27fc34494568448b0a443d9742e0fe86ed251f23c235111
BLAKE2b-256 checksum
How to use checksums
ea092f41950a0078d07c1f302c7c4498d22ac9d498b29b7c66b680ebd18cc541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL newt_agent_mesh-0.8.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
723e48416f863461b32d0e6d6102a46b98a37e31be2df0c1506b08b5eb4db7fd
BLAKE2b-256 checksum
How to use checksums
087aee1f0d5260f07f46393d39e95601646ca1dd22bf829bf40f418629013bb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL newt_agent_mesh-0.8.2-cp310-cp310-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e7bddfc38e60d19a062b9c74c47c2e48cc74ab42459a9361150fb026a6d0b0b2
BLAKE2b-256 checksum
How to use checksums
9f4858e752b92380e2cc4304ed76fe72ab10f5784291e3a72207c24bfeedbdac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL newt_agent_mesh-0.8.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.8 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
485faee2e5285f98ca3ea85ceba846d5eeaa15fc8a5c7fecb54b2083f99e0acc
BLAKE2b-256 checksum
How to use checksums
fdfa73f4afb545dc35ac277739842823f1c0595ff36fe69904edb494ba8bba0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / newt_agent_mesh-0.8.2-cp39-cp39-macosx_11_0_arm64.whl

Download URL newt_agent_mesh-0.8.2-cp39-cp39-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6bedb728e2ec596f90ef02f2b370c4dc806737a0b2c283e6e6e5107f7b150ecf
BLAKE2b-256 checksum
How to use checksums
a5d64ec196a90e26f02e69baad166fa6ee256bfe6ec305770c1854005417528d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for newt-agent-mesh 0.8.2

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.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for newt_agent_mesh-0.8.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

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.

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