Catalog PyPI
PACKAGE EXPLORERView in registry

add-mesh

PyPI

ADD Protocol — an open discovery, delegation, and trust overlay for the Agentic Web

a2aagentsdelegationdided25519mcpprotocol
Versions collected1
Direct dependencies6From release 0.1.0
Last observed20 Oct, 19:19 UTC

README

Version 0.1.0 documentation

add-mesh

Python reference implementation of the ADD Protocol (Agent Discovery, Delegation & Trust) — an open overlay for the Agentic Web that adds discovery, capability delegation, and trust attestation on top of A2A and MCP.

Specifications live in spec/; the normative cross-language conformance vectors live in test-vectors/.

Install

pip install add-mesh

Usage

from add_mesh.core import generate_signer, sign_envelope, verify_envelope

key_pair, signer = generate_signer()
print(key_pair.did)  # did:key:z6Mk...

envelope = sign_envelope(signer, "add/delegation", {
    "aud": "did:key:z6MkSubAgent...",
    "maxSpendUsd": 5,
    "ttl": 1200,
})

result = verify_envelope(envelope)
print(result.issuer, result.payload)

Verification establishes only that the holder of iss's key signed this payload at the claimed time. It says nothing about whether they were entitled to what the payload requests — that is the delegation layer's job.

Signers

sign_envelope takes any object satisfying the Signer protocol, so an agent identity can live in a KMS or HSM rather than in local memory:

from add_mesh.core import Signer

class KmsSigner:
    @property
    def did(self) -> str:
        return "did:key:z6Mk..."

    def sign(self, message: bytes) -> bytes:
        return my_kms.sign(key_id, message)

Notes on parity with the TypeScript implementation

The wire format is identical and validated by a bidirectional interop harness. The APIs differ in one deliberate, idiomatic way: these functions are synchronous, because signing is a microsecond-scale CPU operation and cryptography exposes it synchronously. The TypeScript API is async because WebCrypto and remote KMS clients are async there.

Two portability details are handled internally and are worth knowing about if you implement ADD in another language:

  • RFC 8785 mandates ECMAScript number formatting, which differs from Python's repr (1e-7 not 1e-07, 1 not 1.0, 100000000000000000000 not 1e+20).
  • RFC 8785 orders object keys by UTF-16 code unit, not code point. These disagree for non-BMP characters, so a naive sorted() produces a different signature over the same payload.

Development

pip install -e ".[dev]"
pytest

License

Apache-2.0.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.025 Jul 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
das-subha123/agent-mesh-protocol

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:19 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:db59240e73862763369a7fe0185dccc4b4f49b7e76933361ebfc385c036efd49