Catalog PyPI
PACKAGE EXPLORERView in registry

aap-manifest

PyPI

Python reference implementation of the Agent Acknowledgment Protocol (AAP)

Versions collected1
Direct dependencies1From release 1.0.0
Last observed20 Oct, 17:00 UTC

README

Version 1.0.0 documentation

aap-ref-lib-py

PyPI License Spec

Python reference implementation of the Agent Acknowledgment Protocol (AAP) — typed acknowledgment events, the §7.2 reference weighting function, and a simple reputation derivation.

Install

pip install aap-manifest

What's in the box

ModuleSpecPurpose
entries§3, §4AcknowledgmentEvent and its parts; the AckType vocabulary
weighting§7.2compute_weight, type_weight, DEFAULT_TYPE_WEIGHTS
reputation§7.1compute_reputation — derive a subject's score from events
store§9.3 / §9.4InMemoryAcknowledgmentStore — dup-id rejection, withdrawal handling

Usage

from aap_manifest import (
    AcknowledgmentEvent, Issuer, Subject,
    compute_weight, InMemoryAcknowledgmentStore,
)

ev = AcknowledgmentEvent(
    id="urn:uuid:5f8a3c2e-…",
    type="ENDORSEMENT",
    issuer=Issuer(did="did:tutus:0xacme", key_id="did:tutus:0xacme#k"),
    subject=Subject(did="did:web:example.com:agents:code-reviewer"),
    signature=Signature(alg="EdDSA", value="…"),
    issued_at="2026-05-20T14:32:00Z",
)

result = compute_weight(ev, issuer_trust=0.8)   # value_weight applies only when verified

store = InMemoryAcknowledgmentStore()
store.append(ev)                                 # raises on duplicate id (§9.3)
rep = store.reputation("did:web:example.com:agents:code-reviewer")

Reference weight (spec §7.2)

weight = type_weight × issuer_trust × value_weight × witness_factor × time_decay
  • value_weight = 1 + log10(1 + usd_equivalent) applies only when the settlement reference is verified (§6.3); otherwise 1.
  • witness_factor = 1 + 0.25 × min(independent_witnesses, 4).
  • time_decay = exp(−Δt/τ), τ = 18 months; omit now for no decay.
  • A WITHDRAWAL zeroes the weight (positive-only vocabulary, §9.1).

This is the informative AAP reference. The normative aggregation — issuer-diversity penalty, recursive-trust bound, mandatory settlement verification — lives in AAR §9 and ships in the aar-manifest package.

How It Composes

aap-manifest   constructs and weights acknowledgment events  (this library)
aar-manifest   stores, chains, federates, and aggregates them
aap-validate   validates events against the schema + anti-abuse rules

Test

pip install -e ".[dev]"
pytest

License

Apache-2.0 — see LICENSE and NOTICE.

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
1.0.02 Jun 20261

Package advisories

0
No matching advisories collected

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

Repository

PENDING
ai-manifests/aap-ref-lib-py

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:00 UTC

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

Record identity

package:eaf34b371316fba8cd670202be2576f494dc20f1a1263c28190fb9d2cb994403