Drop the SDK in at your API edge. Verify agent payments cryptographically. Issue authorization proofs that make disputes cryptographically answerable. Shaped with design partners, no procurement.
Observer Protocol adds one artifact to every agent transaction on your infrastructure: a cryptographically signed authorization proof that shows the purchase was within a valid delegation's scope. The authorization proof is independently verifiable by any third party: no API key, and no Observer Protocol API in the path. Verifying it fetches the issuer's DID document over ordinary HTTPS, or nothing at all if you supply that document yourself.
This guide uses a real integration with Hyperbolic (GPU inference via x402) as the reference. The transaction hashes below are real and verifiable on BaseScan.
Deprecated, and this guide has not been rewritten off it.
@observer-protocol/sdk and the PyPI package observer-protocol were
last released in April 2026, are unmaintained, and carry a deprecation notice on the registry
itself. Everything below still installs and still runs. For verifying a credential use
@observer-protocol/policy-engine instead; for the register/attest flows in Steps 2
and 3 there is no replacement package yet, which is why this page still names the old one. See
the SDK page for what replaces which part.
npm install @observer-protocol/sdk
pip install observer-protocol
Register your AI infrastructure service with a DID so agents can discover and verify you.
import { ObserverClient } from '@observer-protocol/sdk';
const client = new ObserverClient();
const service = await client.registerAgent({
publicKey: 'your_ed25519_public_key_hex',
agentName: 'Your AI Infra Service',
});
// Verify key ownership
const challenge = await client.requestChallenge(service.agentId);
// Sign challenge.nonce with your private key
await client.verifyAgent(service.agentId, signatureHex);
// Your service is now:
// - Discoverable via DID: did:web:observerprotocol.org:agents:{id}
// - Verifiable by any agent or counterparty
// - Ready to issue and verify delegation credentials
from observer_protocol import ObserverClient client = ObserverClient() pub, priv = ObserverClient.generate_keypair() service = client.register_agent(public_key=pub, agent_name="Your AI Infra Service") challenge = client.request_challenge(service.agent_id) sig = ObserverClient.sign_challenge(priv, challenge.nonce) client.verify_agent(service.agent_id, sig)
When an agent pays for your service via x402, verify the payment and issue a credential.
// After receiving an x402 payment from an agent
const result = await client.verifyX402({
agentId: 'd13cdfceaa8f895afe56dc902179d279',
agentDid: 'did:web:observerprotocol.org:agents:d13cdf...',
counterparty: 'did:web:your-service.com',
amount: '100000', // 0.10 USDC in atomic units
resourceUri: 'https://api.your-service.com/v1/inference',
settlementTxHash: '0xd94a6d8bfa9c1634e19b59cac9503e732cb538772b96e02300702bc38fb39b94',
paymentPayload: paymentResponseFromX402,
});
// result.verification.onchainVerified = true
// result.credential = W3C VC signed by OP
// result.eventId = audit trail reference
result = client.verify_x402(
agent_id="d13cdfceaa8f895afe56dc902179d279",
agent_did="did:web:observerprotocol.org:agents:d13cdf...",
counterparty="did:web:your-service.com",
amount="100000",
resource_uri="https://api.your-service.com/v1/inference",
settlement_tx_hash="0xd94a6d8bfa9c...",
payment_payload=payment_response,
)
assert result.verification.onchain_verified # True
Verification requires only the authorization-proof JSON and the issuer's published public key. No API key, no token, no Observer Protocol API in the path. Note that resolve_did below fetches the issuer's DID document over ordinary HTTPS from the origin the credential names — supply the document yourself and it makes no network call at all.
from observer_protocol import verify_receipt, resolve_did issuer_key = resolve_did(receipt_json['issuer']['id']) result = verify_receipt(receipt_json, issuer_key) assert result.valid # cryptographic proof verified
Four lines, no API key, and nothing either OP or the counterparty can withhold to stop it verifying. Any third party can verify.
These are real x402 payments to Hyperbolic's GPU inference API, settled in USDC on Base mainnet, settlement independently confirmed two ways — Coinbase facilitator and Base RPC on-chain. Observer Protocol records that confirmation; it does not perform the settlement.
The counterparty DID is recorded as it stood at the time of the payment, and it no longer
resolves: hyperbolic.xyz redirects to hyperbolic.ai, and
/.well-known/did.json returns 404 there. Checked 9 August 2026. The
settlement is unaffected and still checkable by anyone — it is on Base mainnet at
block 45319014, and the amount, asset and recipient are in the transaction, not in the DID. But a
did:web is only as durable as the domain serving it, and a page about independent
verification is the wrong place to leave that unsaid.
Per-transaction pricing. No minimum. Ship chargeback prevention today.
npm install @observer-protocol/sdk pip install observer-protocol
Questions? DM @boydcohen on X.