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 Legalv0.5.1

    Exact checks for dates, amounts and legal claims.

    Guards for the computable parts of legal work. Deadlines and liability caps are recomputed exactly, contradictory clauses are found with a solver, and every check says whether it is a proof or a signal.

    At a glance

    Version
    0.5.1
    Status on PyPI
    Beta
    Install
    pip install qwed-legal
    Also on
    npm (@qwed-ai/legal) and as a GitHub Action
    Model in the check
    None, except the fairness check, which uses a model you supply
    Limitation periods
    Nine jurisdictions, including the UK and India
    Licence
    Apache-2.0

    What it checks

    • DeadlineGuard

      Deadlines

      Date and business-day arithmetic that knows about holidays. Exact.

    • LiabilityGuard

      Liability caps

      Cap and tier arithmetic. Exact.

    • ContradictionGuard

      Contradictory clauses

      Uses the Z3 solver to find clauses that cannot both be true.

    • StatuteOfLimitationsGuard

      Limitation periods

      Including California, New York, Texas, Delaware, the UK, Germany, France, Australia and India.

    • JurisdictionGuard

      Governing law and forum

      Checks governing-law and forum combinations.

    • ProvenanceGuard

      AI disclosure

      AI-content disclosure and hash integrity, for rules such as Article 50 of the EU AI Act.

    • IRACGuard

      Structure of legal reasoning

      Whether reasoning follows Issue, Rule, Application, Conclusion.

    • ClauseGuard

      Clause consistency

      A heuristic signal, not a proof.

    • CitationGuard

      Citation format

      A valid format does not prove the cited case exists, so this check never returns verified.

    Mistakes it is built to catch

    Nobody checked any of it

    Without QWED Legal

    • A deadline off by days“Net 30 business days from 20 December” lands on the wrong date once weekends and holidays are counted.
    • A cap worked out wrong“Liability capped at 2x fees” is multiplied incorrectly, and the wrong figure goes into the summary.
    • Clauses that cannot both holdA $10,000 liability cap sits next to a $50,000 minimum penalty, and nobody notices the conflict.

    Each one checked before it is used

    With QWED Legal

    1. A deadline off by daysDeadlineGuardThe real date is worked out, and the wrong one is held.
      VERIFIED · DENY
    2. A cap worked out wrongLiabilityGuardThe cap is recomputed, and the wrong figure is held.
      VERIFIED · DENY
    3. Clauses that cannot both holdContradictionGuardThe solver shows both clauses cannot hold.
      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-legal

    Good to know

    • QWED Legal is not a legal reasoning engine and not a replacement for lawyers. Interpretive legal reasoning is never trusted automatically.
    • Clause, citation and fairness checks are signals for review, not proofs. The fairness check uses a model you supply.
    Use case: LegalDeadlines, amounts and claims in contracts checked against the rules.

    More domain packages