QWED

Type to search pages, engines and advisories.

    Looking for API details?Search the docs

    Engines

    The tier decides what an engine may claim

    Every engine sits in a tier, and the tier decides what the engine is allowed to claim. Only a deterministic proof can make a result verified.

    Three tiers

    1. Proof enginesCan return VERIFIED
    2. Policy guardsBlock or hold
    3. Advisory enginesSignals for review
    • 13engines
    • 9policy guards
    • 3results, each with an admission decision

    Three tiers

    The tier, not the engine, decides whether a result can be VERIFIED.

    The 13 engines are counted by module: 6 proof engines, with Logic counted twice (the Z3 verifier and the QWED DSL verifier), 1 execution engine and 5 advisory engines. QWED Security, a separate GitHub App, runs 20 engines of its own.

    Proof engines

    Symbolic solvers and formal methods. For the claims they cover, an answer either has a reproducible proof or it is not verified.

    EngineUsesWhat it checks
    MathSymPyArithmetic and algebraic identitiesverifier.pyGuide: can LLMs do maths? How to check AI calculations
    LogicZ3Satisfiability of constraints, through the Z3 solver and the QWED DSLlogic_verifier.py, dsl_logic_verifier.py
    SQLSQLGlotQuery structure, destructive statements, injection patterns, schemasql_verifier.pyGuide: checking AI-generated SQL before it runs
    CodePython AST and rulesDangerous calls and patterns in generated codecode_verifier.py
    SchemaJSON SchemaStructure of JSON outputschema_verifier.pyGuide: validating LLM output with JSON Schema and Pydantic
    SymbolicCrossHair (qwed[symbolic])Searches for counterexamples. Returns UNVERIFIABLE or BLOCKED, not proofs.symbolic_verifier.py
    Runs, does not verify

    The Stats engine (stats_verifier.py) runs statistical code in a sandbox and returns UNVERIFIABLE: running code successfully is not treated as verification. SecureCodeExecutor runs code; it does not verify it.

    The core counts its engines by module, as listed under each row: 13 in all, because Logic has two.

    Logic, settled by Z3

    The same constraints give the same answer, every time. Satisfiable constraints come with a model; contradictory ones are proven to have none.

    From the quick start
    (AND (GT x 5) (LT y 10))SAT    x = 6, y = 9(AND (GT x 10) (LT x 5))UNSAT  no values satisfy it

    Policy guards

    Deterministic rules applied at runtime. The same input against the same policy always gives the same decision. Guards return block or hold decisions, never VERIFIED.

    • SystemGuard

      Shell commands and file paths

    • ConfigGuard

      Secrets in configuration

    • RAGGuard

      Retrieved context

    • MCPPoisonGuard

      MCP tool definitions

    • ExfiltrationGuard

      Outbound data

    • SelfInitiatedCoTGuard

      Reasoning flow

    • SovereigntyGuard

      Data residency and routing

    • StartupHookGuard

      Startup hooks

    • ProcessVerifier

      Process milestones such as IRAC

    Advisory engines

    For questions where no formal proof exists. Graph, Image and Consensus can return VERIFIED only on a deterministic sub-path that carries a proof_ref. A model fallback never overrides a deterministic result.

    FactTF-IDF and entity matchingfact_verifier.py
    GraphCan return VERIFIED on a deterministic sub-pathgraph_fact_verifier.py
    ImageCan return VERIFIED on a deterministic sub-pathimage_verifier.py
    ReasoningSignals for review onlyreasoning_verifier.py
    ConsensusCan return VERIFIED on a deterministic sub-pathconsensus_verifier.py

    Every check returns the same shape

    Since v6.0.0 every engine and guard returns a DiagnosticResult with three layers: an agent_message that is safe to show an agent, structured developer_fields with the evidence, and a proof_ref, a hash that binds a VERIFIED result to its proof.

    DiagnosticResult
    status            VERIFIED | UNVERIFIABLE | BLOCKEDagent_message     safe for agents, no internalsdeveloper_fields  structured evidence for developersproof_ref         present only when status is VERIFIED
    • VERIFIEDAdmission: ADMIT or DENY

      The claim was settled with a proof, and proof_ref is present. It is admitted only if it holds; a claim proven false or unsafe is denied, with the evidence.

    • UNVERIFIABLEAdmission: DENY

      The claim could not be proven, for example from insufficient evidence, ambiguous input or model-only support. No proof_ref. Denied by default; a person or your policy can review it.

    • BLOCKEDAdmission: DENY

      Verification could not be attempted or completed, for example from a parse error, a missing declaration or a security policy violation. No proof_ref. Denied.

    Who enforces DENY?

    QWED returns the result and the admission decision; it does not stop anything by itself. Your integration enforces DENY, or a QWED product does it for you, as QWED Security does by failing the pull request check.

    The spec names the admission values ADMIT and DENY. The core library still calls DENY “BLOCKED” in one place; that is being aligned.

    Other checks

    Taint analysis follows untrusted input through generated code and flags it before it reaches a sensitive sink such as SQL or a shell. Domain packages such as qwed-finance add their own checks on top of these engines.