Install
QWED runs in your own environment. Install the library for your language, then run qwed init to check the engines and connect a model provider.
$ pip install qwedPython 3.10+$ npm install @qwed-ai/sdkTypeScript$ go get github.com/QWED-AI/qwed-verification/sdk-go/v7Go$ cargo add qwedRust$ docker pull qwedai/qwed-verificationContainerPython
Python 3.10 or newer. One command installs the core engines (Math, Logic with Z3, SQL with SQLGlot, Code, Schema, Fact and Stats) and the qwed command line tool.
$ pip install qwedOptional extras
qwed[server]The FastAPI server and its dependenciesqwed[symbolic]CrossHair, for the Symbolic engineqwed[pii]PII masking with Microsoft Presidioqwed[langchain], qwed[crewai], qwed[llamaindex]Framework integrations (experimental, not covered by CI)
$ pip install "qwed[server]"Other languages and runtimes
-
TypeScript
$ npm install @qwed-ai/sdkLatest on npm: 7.3.0.
-
Go
$ go get github.com/QWED-AI/qwed-verification/sdk-go/v7Releases are tagged sdk-go/vX.Y.Z; the module path ends in /v7.
-
Rust
$ cargo add qwed -
Docker
$ docker pull qwedai/qwed-verificationThe API server. It needs API_KEY_SECRET and QWED_CORS_ORIGINS.
Self-hosting guide
From source
$ git clone https://github.com/QWED-AI/qwed-verification.git$ cd qwed-verification$ pip install -e ".[server,dev]"First run
Three commands take you from a fresh install to a working setup.
qwed initChecks the engines, sets up a model provider and creates a local API key.qwed doctorHealth check for the engines, provider, server and database.qwed testRuns twelve deterministic checks. Needs no model and no server.
$ qwed init[QWED] Initializing verification engines... [ok] SymPy math engine ready [ok] Z3 logic engine ready [ok] AST code engine ready [ok] SQLGlot sql engine readyRunning verification suite... [ok] 2+2=5 -> BLOCKED [ok] x>5 AND x<3 -> UNVERIFIABLE [ok] SELECT * WHERE 1=1 -> BLOCKED [ok] eval(user_input) -> VERIFIED (unsafe)All engines verified. QWED is operational.Step 1/3: LLM Provider SetupStep 2/3: API KeyStep 3/3: Generate QWED API Key Starting local server... Warning: Save this key. It is shown only once.QWED is ready.The suite feeds each engine a known-bad input, and every case must come back denied. This is the CLI’s output today, and two of its labels are out of date: 2+2=5 was checked and proven false, which the protocol records as VERIFIED · DENY rather than BLOCKED, and “All engines verified” means the engines are ready. Both are being fixed in qwed-verification#438.
Model providers
QWED uses a model only to translate natural language into a formal statement, and treats it as an untrusted translator. Pick a provider with --provider. Any OpenAI-compatible API works through custom.
nvidiaopenaianthropicgeminicustom
To run against a local model such as Ollama, see LLM configuration in the docs.
$ qwed init --provider anthropic# In CI, skip the prompts$ qwed init --non-interactive --provider nvidiaYour data stays where you run QWED. QWED does not send data anywhere by itself. Checks that use a model send the prompt to the provider you configure; with a self-hosted model, nothing leaves your infrastructure. Optional PII masking (qwed[pii]) redacts card numbers, social security numbers and email addresses before the model call.
In CI with GitHub Actions
Scan for secrets, unsafe code or unsafe shell commands on every push. With output_format: sarif the action writes qwed-results.sarif; upload it with codeql-action/upload-sarif to see findings in the Security tab.
For pull request checks without writing a workflow, install the QWED Security GitHub App.
- uses: QWED-AI/qwed-verification@v7.3.0 with: action: scan-secrets # or scan-code, verify-shell paths: "**/*.py,**/*.env" output_format: sarifDomain packages
Each domain package adds checks for one field and installs on its own.
- qwed-financeBanking, payments and financial calculationsv3.0.1
pip install qwed-finance - qwed-legalDeadlines, amounts and legal claimsv0.5.1
pip install qwed-legal - qwed-taxTax compliance and withholdingv0.2.1
pip install qwed-tax - qwed-infraTerraform, IAM and cloud costv0.3.0
pip install qwed-infra - qwed-open-responsesAgent tool calls, checked before they runv0.6.1
pip install qwed-open-responses - qwed-mcpMCP server for any MCP clientv0.2.2
pip install qwed-mcp - qwed-a2aAgent-to-agent verificationv0.3.0
pip install qwed-a2a - qwed-ucpUniversal Commerce Protocol transactionsv0.3.0
pip install qwed-ucp