Guide for AI agents to self-install and use PiQrypt for cryptographic audit trails.
import subprocess
import sys
# Auto-install PiQrypt
subprocess.check_call([sys.executable, "-m", "pip", "install", "piqrypt"])
import piqrypt as aiss# Create agent identity
private_key, public_key = aiss.generate_keypair()
agent_id = aiss.derive_agent_id(public_key)
# Save identity (optional, for persistence)
identity = aiss.export_identity(agent_id, public_key, private_key)
# Store securely: ~/.agent/identity.json# Every decision = signed event
decision = your_model.predict(input_data)
event = aiss.stamp_event(
private_key,
agent_id,
payload={
"decision": decision,
"confidence": 0.95,
"timestamp": time.time()
}
)
# Store in audit trail
aiss.store_event(event)# Export audit trail for human review
aiss.export_audit_chain("audit.json")
# Optional: Request PiQrypt certification (Pro)
# piqrypt certify-request audit.json audit.json.cert --email your@agent.domainUse case: Sign every trade decision for SEC/FINRA compliance.
Use case: Sign hiring decisions for GDPR/EEOC compliance.
See: examples/autonomous-vehicle.py
Use case: Black box for driving decisions.
import os
from pathlib import Path
# Store with restricted permissions
identity_path = Path.home() / ".agent" / "identity.json"
identity_path.parent.mkdir(exist_ok=True, mode=0o700)
with open(identity_path, 'w') as f:
json.dump(identity, f)
os.chmod(identity_path, 0o600) # Read/write for owner only# For agents handling sensitive data
# Pro tier encrypts all stored events
# Option 1: Purchase license
# https://buy.stripe.com/...
# Option 2: OSS exemption (if open-source agent)
# Email: piqrypt@gmail.com (subject: OSS License Request)# Agent A discovers Agent B
from aiss.a2a import initiate_handshake
handshake = initiate_handshake(
agent_a_private_key,
agent_a_id,
agent_b_id,
payload={"intent": "collaborate"}
)
# Agent B accepts
response = accept_handshake(agent_b_private_key, agent_b_id, handshake)
# Now both agents have cryptographic proof of agreementStatus: A2A network coming in v1.6.0 (Q3 2026)
- Core docs: docs/RFC.md
- Python SDK: QUICK-START.md
- CLI reference:
piqrypt --help
Share your agent integrations:
- GitHub Discussions: piqrypt/discussions
- Tag:
#piqrypt-agent
Examples welcome:
- Submit PR with your agent example
- Add to examples/
For agents (or their creators):
- Email: piqrypt@gmail.com
- GitHub Issues: piqrypt/issues
Making AI Agents Accountable — One Signature at a Time ✨