Observed since 20 Oct, 17:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python reference implementation of the Agent Acknowledgment Record (AAR)
Python reference implementation of the Agent Acknowledgment Record
(AAR) — the append-only, hash-chained ledger that
stores and aggregates AAP acknowledgment events, with Merkle checkpoints and the
normative §9 default reputation algorithm.
pip install aar-manifest
| Module | Spec | Purpose |
|---|---|---|
entries | §3, §5, §8 | RecordEntry, Checkpoint, ReputationResult |
ledger | §3, §4 | canonicalize, compute_entry_hash, compute_commitment, build_genesis, append_event, verify_chain |
checkpoint | §5 | merkle_root, build_inclusion_proof, verify_inclusion_proof, build_checkpoint |
aggregation | §9 | aggregate_reputation — the normative default algorithm |
store | §3/§4/§8 | InMemoryLedger — accept, withdraw, query, verify, reputation |
from aar_manifest import InMemoryLedger
ledger = InMemoryLedger("did:tutus:0xagg")
ev = {
"id": "urn:uuid:…",
"type": "ENDORSEMENT",
"issued_at": "2026-05-20T14:32:00Z",
"issuer": {"did": "did:web:alice"},
"subject": {"did": "did:web:bob"},
}
ledger.accept(ev) # chained Record Entry; raises on duplicate id (§4.1.2)
valid, errors = ledger.verify(recompute_hashes=True)
rep = ledger.reputation("did:web:bob", settlement_verified=lambda e: False)
The wrapped event is a plain dict (snake_case keys, as on the wire) so the
package takes no hard dependency on aap-manifest.
default aggregation (spec §9)weight(a) = type_weight × issuer_trust × value_weight × witness_factor
× time_decay × (0 if withdrawn else 1) × settlement_factor
value_weight = 1 + log10(1 + usd) applies only when settlement is verified (§6.3).settlement_factor = 0.5 when a value is claimed but unverified (T2/T10), else 1.diversity / 0.3 when Simpson diversity over distinct issuers/controllers is below 0.3.issuer_trust= or attestation= to drive it.aggregate_reputation returns the full ReputationResult (the AAR §8
ReputationSource shape ADP consumes).
compute_entry_hash hashes the immutable content (everything except
entry_hash and the mutable status fields withdrawn / withdrawal_ref), so a
withdrawal can flip those fields without breaking chain continuity (§3.2, §4.2,
§7.4). build_checkpoint produces a signed, prev-chained Merkle commitment;
build_inclusion_proof / verify_inclusion_proof give single-entry inclusion
proofs (§5.4).
aap-manifest constructs and weights acknowledgment events
aar-manifest stores, chains, federates, and aggregates them (this library)
aar-validate audits a ledger's chain, sequencing, and replay
pip install -e ".[dev]"
pytest
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 2 Jun 2026 | 1 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 17:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:05cb8571b62a514952c31d397bc12c2ce15aa6f4a51fccbcf76c7e8750ac1b19