Interactive Demos
Experience PEAC Protocol in action with live examples and interactive demonstrations
Run an Agreement Demo
This demo shows how an agent discovers a policy, negotiates terms, and receives a payment receipt using PEAC Protocol.
1. Discover Policy
curl -H "x-peac-agent: demo-agent/1.0" \
https://example.com/.well-known/peac.txt
Response:
# PEAC Policy v0.9.10
version: 0.9.10
usage: conditional
attribution: required
purposes: [research, analysis]
free_quota: 1000/day
paid_tiers:
- tier: basic
price_usd: 0.01/request
quota: 10000/day
2. Request Access with Payment
curl -X POST https://example.com/api/content \
-H "x-peac-protocol: 0.9.10" \
-H "x-peac-agent: demo-agent/1.0" \
-H "x-peac-purpose: research" \
-H "x-peac-attribution: required" \
-H "x-peac-tier: basic"
402 Payment Required Response:
HTTP/1.1 402 Payment Required
x-peac-payment-required: true
x-peac-adapter: stripe
x-peac-session-id: sess_1234567890
Location: https://checkout.stripe.com/c/pay/cs_test_...
{
"type": "https://peacprotocol.org/problems/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "Basic tier requires $0.01 payment",
"payment_url": "https://checkout.stripe.com/c/pay/cs_test_..."
}
3. Access with Valid Receipt
curl -X POST https://example.com/api/content \
-H "x-peac-protocol: 0.9.10" \
-H "x-peac-agent: demo-agent/1.0" \
-H "x-peac-receipt: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9..."
Success Response:
HTTP/1.1 200 OK
x-peac-receipt-verified: true
x-peac-quota-remaining: 9999/10000
x-peac-quota-reset: 2024-11-30T00:00:00Z
{
"data": "Your requested content here...",
"attribution": "Content provided under PEAC Protocol terms"
}
Try PEAC Simulator
Interactive playground to test PEAC policies and see generated receipts in real-time
Your Policy
# Your /.well-known/peac.txt
version: 0.9.10
usage: conditional
attribution: required
purposes: [research, testing]
free_quota: 100/hour
paid_tiers:
- tier: premium
price_usd: 0.05/request
quota: unlimited
Generated Receipt
✅ Policy validated
✅ Agent authenticated
✅ Payment processed
✅ Receipt signed
Receipt ID: rcpt_sim_789012345
This is a simulation. Real integration requires implementing PEAC adapters.
Additional Resources
Tools and resources for deeper PEAC Protocol exploration
Ready to integrate PEAC?
Start with our quickstart guide or join the working group to discuss your use case