a2cn
The Python reference implementation of A2CN, the open protocol for agent-to-agent B2B commercial negotiation: signed offers, counteroffers and acceptances between two parties' agents, and a transaction record that both sides can verify on their own.
- Specification: spec/
- Source: reference-implementation/python
- Changelog: CHANGELOG.md
- Security policy: SECURITY.md
Status: pre-1.0, and the specification is a draft. A minor (0.x) release may change the API, the wire protocol or a record format; the CHANGELOG says what changed. Security fixes go to the latest 0.3.x release, as the security policy describes.
Install
pip install a2cn
Requires Python 3.11 or later.
import a2cn
print(a2cn.__version__, a2cn.PROTOCOL_VERSIONS)
The library lives in the a2cn package's modules: a2cn.client and
a2cn.server for the HTTP client and server, a2cn.record and
a2cn.evidence for the transaction and evidence records, a2cn.crypto for
signing and verification, and a2cn.did for DID resolution. The
repository README
walks through the demos and the architecture.
Verify a record
Installing the package installs a2cn-verify. Put a deal's TransactionRecord
and its session's evidence record in one folder, and point the verifier at it:
a2cn-verify deal/ # or: python -m a2cn.verify deal/
a2cn-verify deal/ --offline # fetch nothing; use DID documents saved in the folder
It verifies each record with the library's own checks and fetches the parties'
DID documents from their sites (a did:web DID is its own address). For every
record it prints VERIFIED, REFUSED: with the reason, or COULD NOT FINISH
with what is missing. Exit status: 0 everything verified, 1 something was
refused, 3 nothing was refused but something could not finish, 2 bad usage.
a2cn-verify --help lists every option.
MCP server
The MCP server (mcp_server.py) is not part of this package. Run it from a
source checkout with the mcp extra:
git clone https://github.com/A2CN-protocol/A2CN.git
cd A2CN/reference-implementation/python
pip install -e '.[mcp]'
python mcp_server.py
Questions, bugs and security
- Questions and ideas go in GitHub Discussions.
- Bugs go in GitHub Issues.
Include the package version (
a2cn.__version__), your Python version, and how you installed the package (from PyPI or from a source checkout). - Security vulnerabilities never go in a public issue. Report them privately, as SECURITY.md describes.
License
Apache-2.0. See LICENSE.
Metadata
Release files for a2cn 0.3.4
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 |
|---|---|---|---|---|
| a2cn-0.3.4.tar.gz | 123.2 kB | With provenance | Details for a2cn-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| a2cn-0.3.4-py3-none-any.whl | Python 3 | none | any | Details for a2cn-0.3.4-py3-none-any.whl |
Total release size: 252.2 kB
Release files / a2cn-0.3.4.tar.gz
| Download URL | a2cn-0.3.4.tar.gz |
|---|---|
| Size | 123.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
699f18acf497a10e52b76363e12b8b619280c0dd9f1209ad101345d264d40985
|
|
BLAKE2b-256 checksum How to use checksums |
11d8c78d71d60ad9488bed7edad9f9f335fcb0ccb00fa57c288222cdabb786ae
|
| 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 12, 2026.
Transparency logRelease files / a2cn-0.3.4-py3-none-any.whl
| Download URL | a2cn-0.3.4-py3-none-any.whl |
|---|---|
| Size | 129.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89efa6e1d4df01958975556618b80db2bac234383cc81d4fd574ebd4e6ca89d3
|
|
BLAKE2b-256 checksum How to use checksums |
2313c60d2fd3a235e20c072d5bb3dd5149edd1d0a27620b55a5ae4571088bae1
|
| 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 12, 2026.
Transparency logSecurity for a2cn 0.3.4
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
Both files in this release have been uploaded with provenance metadata.
Attestation for a2cn-0.3.4.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 12, 2026.
Transparency logA 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.