Open-source runtime verification for AI, licensed under Apache-2.0.
QWED
Contact

Type to search pages, engines and advisories.

    Looking for API details?Search the docs

    QWED UCPv0.3.0

    Verify agent checkouts before the money moves.

    Verification middleware for the Universal Commerce Protocol. It checks the totals, state and structure of a checkout an agent prepared, before payment.

    At a glance

    Version
    0.3.0
    Status on PyPI
    Alpha
    Install
    pip install qwed-ucp
    Also on
    GitHub Action (QWED-AI/qwed-ucp@v1)
    Model in the check
    None
    Licence
    Apache-2.0

    Guards

    • MoneyGuard

      Totals

      Total must equal subtotal minus discount, plus fulfilment, tax and fees.

    • StateGuard

      Checkout state

      The checkout must move through valid states.

    • SchemaGuard

      Structure

      The checkout must match the UCP v1.0 schema.

    • LineItemsGuard, DiscountGuard, CurrencyGuard

      Line items, discounts, currency

      Standalone guards for the parts of a checkout.

    • RefundGuard, TipGuard, FeeGuard

      Refunds, tips and fees

      Standalone guards for money added or returned.

    • AttestationGuard

      Signed checkouts

      JWT verification with replay protection.

    Mistakes it is built to catch

    Nobody checked any of it

    Without QWED UCP

    • Tax worked out wrongTax of 8.25% on $100 charged as $8.00.
    • Items that do not add up$50 + $30 + $20 totalled as $110.00.
    • A discount in the wrong placeA discount applied after tax instead of before.

    Each one checked before it is used

    With QWED UCP

    1. Tax worked out wrongMoneyGuard8.25% of $100 is $8.25, so payment is held.
      VERIFIED · DENY
    2. Items that do not add upLineItemsGuardThe items come to $100.00, so it is held.
      VERIFIED · DENY
    3. A discount in the wrong placeDiscountGuardApplied in the wrong order, so it is held.
      VERIFIED · DENY

    What is proven correct goes through, with a record of why.

    QWED returns the decision; your integration acts on it.

    Get started

    shell
    pip install qwed-ucp

    Good to know

    • It is not a cart, a payment processor or a fraud system.
    • verify_totals_only() checks totals alone and should not be treated as a final verdict.
    • Replay protection is kept in memory only.
    Use case: AI agentsRuntime verification for agents: before an agent runs a tool, messages another agent or makes a purchase, QWED checks the action.

    More agents and protocols