Delegus

Live demo · development environment

One order, verified by a stranger.

A company's purchasing agent orders from a service that has never seen it. Watch the Grant, the Proof, the one call and the signed receipt, executed by the real engine on the development environment. Every receipt below is real; the identities are sandbox ones, not production.

Checking the sandbox…

The handshake, step by step

Companyprincipal · did:web Agentdid:key Your servicerelying party DelegusPOST /verify Grant order + 2 headers grant · proof · action signed receipt
ReadyPress Run the handshake. The sandbox company signs a Grant for its agent, the agent signs a Proof for one order, and your service asks Delegus once.

Timing · measured on the development environment

network round trip
server handler
engine + signing
One small task in one region. Not a production measurement.

24 checks, in evaluation order

  1. P1 · GRANT_MALFORMED
  2. T1 · ISSUER_UNKNOWN
  3. T2 · ISSUER_UNVERIFIED
  4. T3 · ISSUER_KEY_COMPROMISED
  5. P2 · ISSUER_KEY_NOT_FOUND
  6. P3 · GRANT_SIGNATURE_INVALID
  7. P4 · GRANT_NOT_YET_VALID
  8. P5 · GRANT_EXPIRED
  9. P6 · AUTHORITY_REVOKED
  10. P7 · AUDIENCE_MISMATCH
  11. P8 · PROOF_MALFORMED
  12. P9 · PROOF_SIGNATURE_INVALID
  13. P10 · PROOF_AGENT_MISMATCH
  14. P11 · PROOF_GRANT_MISMATCH
  15. P12 · PROOF_AUDIENCE_MISMATCH
  16. P13 · PROOF_EXPIRED
  17. P14 · PROOF_ACTION_MISMATCH
  18. T5 · PROOF_REPLAYED
  19. P15 · ACTION_MALFORMED
  20. P16 · ACTION_NOT_AUTHORIZED
  21. P17 · UNKNOWN_CONSTRAINT
  22. P18 · CURRENCY_NOT_AUTHORIZED
  23. P19 · AMOUNT_EXCEEDS_AUTHORITY
  24. P20 · RESOURCE_NOT_AUTHORIZED

The story in the bytes

waitingThe Grant and Proof claims appear here as they are signed.

What happened

Nothing yet.

What was exchanged

Run the handshake to see the Grant the company signed.

Watch a full run: one company policy, two sellers, card and invoice

A company’s procurement agent buys GPU time paid by card and datasets on a net-30 invoice, under one signed permission. Orders outside it are refused before any payment runs. One revoke, and both sellers refuse.

Recorded from a live run in Stripe test mode, with example companies. Full recording page

How long it takes to integrate

The receiving service adds one call to its request handler. This is the whole relying-party integration as spec §15 gives it; the seller in our demo application, including its error handling, is 68 lines.

import { Delegus } from "@delegus/sdk";
const delegus = new Delegus({ apiKey: process.env.DELEGUS_API_KEY, publicBaseUrl: "https://seller.example" });

app.post("/orders", async (req, res) => {
  const d = await delegus.verify({
    grant: req.header("Delegus-Grant"),
    proof: req.header("Delegus-Proof"),
    action: { type: "commerce:purchase", resource: req.body.orderId, amount: req.body.amountMinor, currency: req.body.currency },
    request: { method: req.method, path: req.path },
  });
  if (d.decision !== "ALLOW") return res.status(403).json({ reason: d.reason });
  // proceed; persist d.receipt with the order
});

A note on the receipts above: on a revocation the receipt reports trust.result FAIL as well as protocol FAIL. No trust check failed; the replay check T5 is skipped once P6 fails, and the specification defines PASS as every check true. The per-check list shows exactly that.

Two headers come in with the agent's request. Your service forwards them with its own description of the action, gets ALLOW or DENY with a reason, and keeps the receipt. No keys, credential formats or revocation lists to handle. Read the integration guide or try the same calls yourself.

What it costs

Free to start: a sandbox with no card, then 14 days free in production. See pricing

Running agents across many sellers? Talk to us.