@absolutejs/agent-reputation
v0.1.2
Published
Evidence-based scoped AI agent reputation with W3C Verifiable Credentials 2.0 adapters.
Readme
@absolutejs/agent-reputation
Portable, evidence-based reputation for AI agents without a gameable universal trust score.
Reputation is always assessed for an explicit scope. Evidence has a stable subject and issuer, bounded value and confidence, issuance and expiration, optional receipt digest, verification status, and revocation state. Assessment uses a neutral Bayesian prior, time decay, configurable issuer trust, and a cap per issuer so one party cannot inflate a score by repeating claims.
import {
createAgentReputation,
createPostgresAgentReputationStore,
} from "@absolutejs/agent-reputation";
const reputation = createAgentReputation({
store: createPostgresAgentReputationStore({ client: postgres }),
verifyEvidence: (evidence) => verifyIssuerReceipt(evidence),
issuerWeights: { "did:web:certifier.example": 1 },
});
await reputation.record(signedConformanceEvidence);
const assessment = await reputation.assess(
"https://agents.example/calendar",
"calendar.scheduling",
);Unsigned or unverifiable evidence is denied by default. allowUnverified is an
explicit local-development escape hatch. Revoked and expired evidence is never
scored, evidence from each issuer is capped, old evidence decays, and evidence
from one scope is never silently reused in another.
createAgentReputationCredential() maps an assessment to the W3C Verifiable
Credentials Data Model 2.0. Signing and verification remain adapters so callers
can use the W3C JOSE/COSE Recommendation, Data Integrity proofs, SD-JWT, a DID
stack, or an enterprise trust service without provider lock-in.
The package publishes a stable remote JSON-LD context at
https://absolutejs.github.io/agents/contexts/reputation/v1.json.
Standards:
License
MIT
