---
title: "Install"
description: "Install QWED with pip, npm, Go, Cargo or Docker, then run qwed init to check the engines and connect a model provider."
url: https://qwedai.tech/install
---

# 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 qwed` Python 3.10+

`$ npm install @qwed-ai/sdk` TypeScript

`$ go get github.com/QWED-AI/qwed-verification/sdk-go/v7` Go

`$ cargo add qwed` Rust

`$ docker pull qwedai/qwed-verification` Container

## Python

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.

shell

```
$ pip install qwed
```

### Optional extras

-   `qwed[server]` The FastAPI server and its dependencies
-   `qwed[symbolic]` CrossHair, for the Symbolic engine
-   `qwed[pii]` PII masking with Microsoft Presidio
-   `qwed[langchain], qwed[crewai], qwed[llamaindex]` Framework integrations (experimental, not covered by CI)

shell

```
$ pip install "qwed[server]"
```

## Other languages and runtimes

-   ### TypeScript

    ```
    $ npm install @qwed-ai/sdk
    ```

    Latest on npm: 7.3.0.

-   ### Go

    ```
    $ go get github.com/QWED-AI/qwed-verification/sdk-go/v7
    ```

    Releases are tagged sdk-go/vX.Y.Z; the module path ends in /v7.

-   ### Rust

    ```
    $ cargo add qwed
    ```

-   ### Docker

    ```
    $ docker pull qwedai/qwed-verification
    ```

    The API server. It needs API\_KEY\_SECRET and QWED\_CORS\_ORIGINS.

    [Self-hosting guide](https://docs.qwedai.com/advanced/self-hosting)

### From source

shell

```
$ 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 init` Checks the engines, sets up a model provider and creates a local API key.
-   `qwed doctor` Health check for the engines, provider, server and database.
-   `qwed test` Runs twelve deterministic checks. Needs no model and no server.

qwed init, shortened

```
$ 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 ready

Running 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 Setup
Step 2/3: API Key
Step 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](https://github.com/QWED-AI/qwed-verification/issues/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`.

-   `nvidia`
-   `openai`
-   `anthropic`
-   `gemini`
-   `custom`

To run against a local model such as Ollama, see [LLM configuration](https://docs.qwedai.com/getting-started/llm-configuration) in the docs.

shell

```
$ qwed init --provider anthropic
# In CI, skip the prompts
$ qwed init --non-interactive --provider nvidia
```

**Your 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](https://github.com/github/codeql-action) to see findings in the Security tab.

For pull request checks without writing a workflow, install the [QWED Security](https://qwedai.tech/platform/security) GitHub App.

.github/workflows/qwed.yml

```
- uses: QWED-AI/qwed-verification@v7.3.0
  with:
    action: scan-secrets        # or scan-code, verify-shell
    paths: "**/*.py,**/*.env"
    output_format: sarif
```

## Domain packages

Each domain package adds checks for one field and installs on its own.

-   [qwed-finance](https://finance.qwedai.com) Banking, payments and financial calculations

    v3.0.1 `pip install qwed-finance`
-   [qwed-legal](https://github.com/QWED-AI/qwed-legal) Deadlines, amounts and legal claims

    v0.5.1 `pip install qwed-legal`
-   [qwed-tax](https://github.com/QWED-AI/qwed-tax) Tax compliance and withholding

    v0.2.1 `pip install qwed-tax`
-   [qwed-infra](https://github.com/QWED-AI/qwed-infra) Terraform, IAM and cloud cost

    v0.3.0 `pip install qwed-infra`
-   [qwed-open-responses](https://github.com/QWED-AI/qwed-open-responses) Agent tool calls, checked before they run

    v0.6.1 `pip install qwed-open-responses`
-   [qwed-mcp](https://github.com/QWED-AI/qwed-mcp) MCP server for any MCP client

    v0.2.2 `pip install qwed-mcp`
-   [qwed-a2a](https://github.com/QWED-AI/qwed-a2a) Agent-to-agent verification

    v0.3.0 `pip install qwed-a2a`
-   [qwed-ucp](https://github.com/QWED-AI/qwed-ucp) Universal Commerce Protocol transactions

    v0.3.0 `pip install qwed-ucp`

[Next: the quickstart](https://docs.qwedai.com/getting-started/quickstart) [How the engines work](https://qwedai.tech/engines) [Install problem? Open an issue](https://github.com/QWED-AI/qwed-verification/issues/new/choose)
