name: judgment_event_protocol description: Cryptographic event logging for autonomous agents. Record tamper-proof judgment, delegation, termination, and verification events using the Judgment Event Protocol. Provides verifiable decision trails with JCS canonicalization and Ed25519 signatures. user-invocable: true tags:
You have a minimal, verifiable event logging system for AI agent decisions. Use it when you need to record judgments, delegate authority, terminate decision lifecycles, or verify existing events with cryptographic integrity.
bash
pip install jep-protocol
This skill handles cryptographic keys and external dependencies. Please observe the following practices to ensure safe usage:
private_key and public_key are securely loaded from such a source.jep-protocol PyPI package is open source. Verify its integrity by checking the source code at https://github.com/hjs-spec/jep. Consider pinning the package to a reviewed version hash in your dependency manager.JEP defines four immutable verbs:
VerbNamePurposeJJudgeInitiate a new decision or root audit eventDDelegateTransfer decision authority to another agentTTerminateClose the decision lifecycleVVerifyVerify authenticity of an existing event
A minimal JEP event before signing:
json
{
"jep": "1",
"verb": "J",
"who": "did:example:agent-123",
"when": 1742345678,
"what": "sha256:e8878aa9a38f4d123456789abcdef01234",
"nonce": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"aud": "https://platform.example.com",
"ref": null
}
python
from jep import JEPEvent, Verb
# Assumes private_key is loaded from a secure source
event = JEPEvent(
verb=Verb.J,
who="did:example:agent-123",
what="sha256:hash-of-decision-content",
aud="https://platform.example.com"
)
receipt = event.sign(private_key)
print(receipt.to_json())
python
event = JEPEvent(
verb=Verb.D,
who="did:example:agent-123",
what="sha256:hash-of-delegation-details",
aud="https://platform.example.com",
ref="hash-of-parent-event" # Link to previous event
)
python
event = JEPEvent(
verb=Verb.T,
who="did:example:agent-123",
what=None,
aud="https://platform.example.com",
ref="hash-of-decision-chain-head"
)
python
event = JEPEvent(
verb=Verb.V,
who="did:example:verifier-456",
what=None,
aud="https://platform.example.com",
ref="hash-of-target-event"
)
python
from jep import verify_receipt
result = verify_receipt(
receipt_json,
public_key,
expected_aud="https://platform.example.com"
)
if result.valid:
print("Signature valid, chain intact")
else:
print(f"Verification failed: {result.error}")
# Possible error codes:
# - INVALID_SIGNATURE: Signature doesn't match
# - REPLAY_DETECTED: Nonce already seen
# - EXPIRED: Timestamp outside allowed window
# - BROKEN_CHAIN: Parent event hash mismatch
# - INVALID_AUDIENCE: aud field doesn't match expected value
JEP supports modular extensions for privacy and compliance:
ExtensionPurposedigest-onlyAnonymize actor identities with salted hashesmultisigRequire multiple signatures for distributed accountabilityttlAuto-expire events for data retention compliancestorageDecouple event storage from protocol for data sovereigntysubjectExplicitly reference decision subjects for traceability
JEP is the foundational event format for the broader accountability stack:
LayerProtocolPurposeBaseJEPTamper-proof event recording (this skill)ResponsibilityHJSHuman oversight and privacy protectionCausalityJACCross-agent judgment chain tracking
JEP events serve as the immutable data layer that HJS and JAC build upon. All three protocols share the same JSON canonicalization (JCS/RFC 8785) and signature scheme (JWS/RFC 7515).
text