Skip to main content
QWED v4.0.0 Sentinel Edition is now live β€” Agentic Security Guards, Process Determinism, and 147 commits of hardening. See what’s new β†’

What is QWED?

QWED (Query With Evidence & Determinism) is a model-agnostic trust boundary for AI systems.
β€œDon’t fix the liar. Verify the lie.” β€” QWED verifies outputs, processes, and tool interactions before they enter production. It doesn’t reduce hallucinations β€” it makes them irrelevant.
Where QWED fits first: Verify AI-generated math, logic, SQL, code, and schemas before execution. Protect RAG pipelines against prompt injection. Inspect agent tool calls before they reach external systems. Enforce deterministic process steps in high-stakes workflows.

Quick Start

pip install qwed
# Verify math
qwed verify "Is 2+2=5?"
# β†’ ❌ CORRECTED: The answer is 4, not 5.

# Verify logic
qwed verify-logic "(AND (GT x 5) (LT y 10))"
# β†’ βœ… SAT: {x=6, y=9}

Why QWED?

LLMs hallucinate math

QWED uses SymPy for symbolic verification β€” algebraic proof, not pattern matching.

LLMs break logic

Z3 SAT solver provides formal satisfiability checks with model generation.

LLMs generate unsafe code

AST analysis + pattern detection catches vulnerabilities before execution.

LLMs produce SQL injection

Query parsing + schema validation catches injections and malformed queries.

11 Verification Engines

Math

Symbolic algebra with SymPy

Logic

SAT/SMT solving with Z3

Code

AST security analysis

SQL

Query validation & injection detection

Fact

NLI-based fact checking

Stats

Statistical claim verification

Reasoning

Chain-of-Thought verification

Image

Visual content verification

Graph

Knowledge graph fact checking

Schema

JSON/API schema validation

Taint

Data flow taint analysis

Model Agnostic = Your Choice

QWED works with ANY LLM β€” OpenAI, Anthropic, Gemini, Llama (via Ollama), or any local model. Same verification quality, your choice of cost.
1

Choose your LLM

Use any provider β€” cloud or local. QWED stays neutral. No vendor lock-in.
2

Send queries through QWED

QWED routes LLM responses through the appropriate symbolic engine for verification.
3

Get verified results

Receive deterministic, provably-correct responses with optional cryptographic attestations.

Ecosystem & SDKs

Python SDK

pip install qwed β€” Full-featured SDK with CLI.

TypeScript SDK

npm install @qwed-ai/sdk β€” Browser and Node.js support.

Go SDK

Lightweight Go module for backend services.

Rust SDK

cargo add qwed β€” Zero-cost abstractions.

LangChain

Drop-in verification guard

LlamaIndex

Query engine integration

CrewAI

Multi-agent verification

πŸ†• What’s New in v4.0.0: Sentinel Edition

The v4.0.0 Sentinel Release introduces Agentic Security Guards, Process Determinism, and critical security hardening. 147 commits β€” the largest update in QWED history.

Agentic Security Guards (Phase 17)

  • RAGGuard β€” Detects prompt injection and data poisoning in RAG pipelines.
  • ExfiltrationGuard β€” Prevents data exfiltration through agent tool calls.
  • MCP Poison Guard β€” Detects poisoned MCP tool definitions.
  • SovereigntyGuard β€” Data residency and local routing enforcement.
  • ToxicFlowGuard β€” Stateful toxic tool-chaining detection.
  • SelfInitiatedCoTGuard β€” Reasoning integrity verification.
  • ProcessVerifier β€” IRAC/milestone-based verification with decimal scoring, budget-aware timeouts, and structured compliance reporting.
  • Replaced all eval() with AST-compiled execution.
  • Patched sandbox escape, SymPy injection, and protocol bypass vulnerabilities.
  • Resolved CVE-2026-24049 (Critical), 19 Snyk findings, and CodeQL alerts.

Full Changelog

See the complete release history including v3.0.1 Ironclad and v2.4.1 Reasoning Engine.

Next Steps

Installation

Install QWED via pip, Docker, or from source.

Quick Start

Verify your first LLM output in 5 minutes.

SDK Documentation

Choose your language β€” Python, TypeScript, Go, or Rust.

Specifications

Read the formal protocol specification.