Minimal stdlib helpers for the AI-oriented A2A peer protocol (Experience Packets, optional HMAC and replay checks).
pip install ai-oriented-a2a Copy PIP instructions
Minimal peer protocol for AI capability growth: Experience Packets + constraint negotiation. Not the Google A2A task/agent-card stack — this repo is about sharing compressed improvement signals between peers.
Protocol for AI-to-AI capability growth: first-class Experience Packet exchange, constraint negotiation, proposal_id, no mandatory human mediation or central registry. See SPEC.md and examples/experience-packet.json.
v0.1 parsers still parse core messages (Profile, Experience Packet, negotiation four types, Absorption Result) but cannot use the new primitives (provenance, verification_claim, effect_summary, conditional_packet, constraint_scope, duration, expanded absorption methods, interest_tags).
v0.3 does not add message types. It tightens Absorption Result: a peer that emits status=absorbed MUST include effect_summary with a non-empty note. v0.2 absorbed results that omitted effect_summary are not valid under v0.3 schemas. Metric keys stay OPTIONAL.
Non-breaking additions still under v0.3 (all OPTIONAL; omitted messages remain valid): an on-wire version field (canonical "0.3", no leading v); nonce, timestamp, and signature on every message type; and identity on Agent Profile. See docs/VERSIONING.md and docs/TRANSPORT.md.
v0.3 minimal subset documented with schemas and examples. Independent implementations of this minimal subset are welcome. Report actual interop defects (parse or exchange failures against SPEC.md, schema/, and examples/) rather than open-ended design suggestions. When reporting defects, specify the protocol version.
First dual-endpoint comparison task set (non-normative): tool-call timeout / failure recovery. See SPEC.md §5 and IMPLEMENTATION.md.
The core library uses only the Python standard library. Schema validation is an optional extra. Signature verification and the replay window stay off unless you pass the corresponding arguments.
pip install ai-oriented-a2a # optional JSON Schema validation: pip install "ai-oriented-a2a[schema]" The PyPI commands work once ai-oriented-a2a has been published to PyPI. The import name is ai_oriented_a2a.
For development, install from a checkout or straight from GitHub:
pip install -e ".[schema]" # or, without cloning: pip install "ai-oriented-a2a[schema] @ git+https://github.com/robotmarvin0706/ai-oriented-a2a" Maintainers: see docs/RELEASING.md for the release and PyPI publishing steps.
from ai_oriented_a2a import check_incoming, sign_message msg = {"id": "pkt-1", "version": "0.3"} # Default: version check only; signature and replay stay off. rejected = check_incoming(msg) # None, or a legal rejected Absorption Result # Opt in by passing arguments. Reuse `seen` across calls when the window is on. seen = set() signed = sign_message(msg, "secret") rejected = check_incoming(signed, sign_key="secret", replay_window=600, seen=seen) The HTTP binding (POST /a2a/message) ships as a submodule. It is not re-exported, so import ai_oriented_a2a does not load http.server; import it explicitly:
from ai_oriented_a2a.transport import send_message, make_server, serve def on_message(msg): # Called only after the version / signature / replay checks pass. # The reply passes the absorption hard gate before it is sent. return {"packet_ref": msg["id"], "status": "isolated", "reason": "isolated: no local regression"} server = make_server(on_message, port=8002, sign_key="secret", replay_window=600) # server.serve_forever() (or serve(on_message, 8002, ...) to block) reply = send_message("http://127.0.0.1:8002", msg, sign_key="secret", add_replay_fields=True) send_message options are keyword-only (timeout defaults to 30 seconds). If the callback raises, the peer gets HTTP 500 with a rejected Absorption Result whose reason starts with internal_error:. See docs/TRANSPORT.md.
String timestamp values must be ISO-8601 with a timezone (for example 2026-11-14T08:00:00Z); integer Unix seconds are recommended.
examples/network_dual_end.py remains the HTTP dual-endpoint demo and is built on ai_oriented_a2a.transport. New code should use the package module rather than copy the demo. It still runs without installing the package:
python3 examples/network_dual_end.py --role receiver --port 8002 Quick local check python3 -c "import json; json.load(open('examples/experience-packet.json')); print('ok')" pip install jsonschema -q && python3 -c " import json, pathlib from jsonschema import validate schema = json.load(open('schema/experience-packet.schema.json')) instance = json.load(open('examples/experience-packet.json')) validate(instance, schema) print('schema ok') " Non-normative one-round demo (not a reference implementation):
python3 examples/demo_round.py Keywords experience packet absorption proposal_id constraint set improvement_prefs peer negotiation AI-to-AI no mandatory human mediation no central registry provenance trajectory_replay conditional_packet Project links Data verified by PyPI on Nov 14, 2026 Data provided by the project maintainers, verified at the time the release was uploaded to PyPI. Changelog Homepage Issues Release Repository Key dates PyPI data Data sourced directly from PyPI's database. Released: Nov 14, 2026 Latest release 1 maintainer PyPI data Data sourced directly from PyPI's database. robotmarvin Credits Author: robotmarvin0706
Both files in this release have provenance metadata.
a2a absorption experience-packet peer-protocol
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Both files in this release have been uploaded with provenance metadata.
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.




