Metadata-Version: 2.4
Name: wekid-sdk
Version: 1.2.0
Summary: WEKID Architecture Style Kit (ASK) runtime gate and SDK — implements WEKID-STD-001 v1.2: five-layer scoring, the Trust Bridge, AI Decision Authority Levels AL-0..AL-4, and a WORM evidence vault.
Author: WEKID LLC
Maintainer: James Madigan Judge
License-Expression: Apache-2.0
Project-URL: Homepage, https://wekid.org
Project-URL: Framework, https://wekid.org/framework.php
Project-URL: Standards, https://wekid.org/standards.php
Project-URL: Blueprint, https://wekid.org/blueprint/ask/index.php
Keywords: wekid,ai-governance,trust-bridge,authority-levels,audit,worm
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Provides-Extra: server
Requires-Dist: fastapi>=0.110; extra == "server"
Requires-Dist: uvicorn>=0.29; extra == "server"
Requires-Dist: pydantic>=2.6; extra == "server"
Provides-Extra: aws
Requires-Dist: boto3>=1.28; extra == "aws"
Provides-Extra: test
Requires-Dist: httpx>=0.27; extra == "test"
Requires-Dist: fastapi>=0.110; extra == "test"
Requires-Dist: pydantic>=2.6; extra == "test"
Provides-Extra: all
Requires-Dist: fastapi>=0.110; extra == "all"
Requires-Dist: uvicorn>=0.29; extra == "all"
Requires-Dist: pydantic>=2.6; extra == "all"
Requires-Dist: boto3>=1.28; extra == "all"
Requires-Dist: httpx>=0.27; extra == "all"
Dynamic: license-file

# WEKID™ SDK 1.2 — Architecture Style Kit runtime

**Score · gate · commit. Authority must be earned.**

The WEKID SDK is the runnable form of the WEKID ASK (Architecture Style Kit). It
puts a deterministic, fail-closed gate between an AI system and the actions it
wants to take, and it implements the WEKID framework as published in
**WEKID-STD-001 v1.2**:

- **Five-layer scoring.** Data, Information, Knowledge, Experience and Wisdom,
  rolled up into a 0–100 Maturity Score.
- **The Decision Matrix.** Its eight rows are evaluated in order, and the first
  match governs.
- **The Trust Bridge.** Evidence sets a *maturity ceiling*, consequence sets a
  *stakes floor*, and the Authority Level is whichever is more conservative.
  Every record states which limit bound the outcome.
- **AI Decision Authority Levels AL-0 to AL-4.** AL-4 is reached only by
  reservation of the decision class, never by maturity.
- **A verifier registry (the ASK Score step).** Each verifier is bound to one
  layer. The registry fails closed and can be frozen after start-up.
- **An evidence vault (the ASK Commit step).** Every attempt, granted or
  denied, is fingerprinted and written *before* authority is returned. Vaults
  are memory, hash-chained file, or S3 Object Lock (WORM). If the commit fails,
  the gate grants no authority.

It runs as a library, as an HTTP service, or from the command line. The core
needs nothing beyond the Python standard library.

```
pip install "wekid_sdk-1.2.0-py3-none-any.whl[server]"
wekid scenarios        # 13 reference scenarios, all should PASS
wekid serve            # http://127.0.0.1:8000/docs
```

## Authority levels at a glance

| Level | Meaning | What your integration does |
|---|---|---|
| **AL-3** Augmented | Autonomous within scope; a human is on the loop | Execute. At 70–79 the record asks for enhanced sampling |
| **AL-2** Supervised | The AI proposes and stages; a human releases each action | Stage the action and route `record_id` to the accountable human |
| **AL-1** Constrained | Whitelisted, reversible, impact-capped actions only | Execute only reversible actions within the cap; hold the rest |
| **AL-0** No Authority | Informational only | Do not execute; re-plan using the governing triggers |
| **AL-4** Human Authority | The decision is reserved to an accountable human | Do not act; present the analysis to the human |

## Use it

**As a library**

```python
from wekid import WekidGate, FileVault, VerifierRegistry

registry = VerifierRegistry()           # built-in: sql_safety; ASK placeholders fail closed
my_verifiers.register(registry)         # your live checks, one layer each
registry.freeze()

gate = WekidGate(registry=registry, vault=FileVault("wekid-evidence.jsonl"))
det = gate.assess(request)              # always committed before it returns

if det.may_execute_autonomously:  run()
elif det.requires_human_release:  stage(det.record_id)
else:                             refuse([t.code for t in det.triggers if t.governing])
```

**As a service**

```bash
WEKID_VAULT=s3 WEKID_CORPUS_BUCKET=my-wekid-vault WEKID_API_KEYS=change-me wekid serve
```

```python
from wekid.client import WekidClient
r = WekidClient("http://127.0.0.1:8000", api_key="change-me").authorize(output=..., consequence=..., evidence=...)
# r.http_status: 200 = execute now, 202 = human release required, 403 = denied
```

## What's in the package

```
wekid-sdk/
  src/wekid/            the SDK (models, calibration, scoring, bridge, verifiers, sqlsafety,
                        vault, gate, api, client, cli)
  tests/                100 unit, integration and HTTP tests
  scenarios/            13 reference scenarios (expected outcomes written from each scenario's intent)
  examples/             in-process quickstart, client quickstart, custom verifiers, worked example
  integrations/         agent gateway, A2A, MCP, invocable action, embedded FastAPI endpoint
  infra/terraform/      S3 Object Lock vault, TLS-only, least-privilege IAM (writer / reader / auditor)
  infra/iam/            the same policies as standalone JSON
  docs/                 WEKID_ASK_CONTEXT.md (manifest v1.3, built by scripts/build_manifest.py);
                        SDK_REFERENCE, TRUST_BRIDGE, SCORING,
                        INTEGRATION_GUIDE, AUDIT_AND_CONTROLS, MIGRATION_FROM_0.1, ROADMAP
  openapi.json          generated OpenAPI spec for the HTTP service
  Dockerfile, docker-compose.yml, scripts/start_wekid.sh|.bat
```

## Read next

- **[INSTALL.md](INSTALL.md)** — installation, configuration, AWS vault set-up, production checklist
- **[docs/SDK_REFERENCE.md](docs/SDK_REFERENCE.md)** — every method: Python API, HTTP endpoints, client, CLI, request and response schema
- **[docs/TRUST_BRIDGE.md](docs/TRUST_BRIDGE.md)** — the Decision Matrix, gates, floors, stakes and calibration
- **[docs/MIGRATION_FROM_0.1.md](docs/MIGRATION_FROM_0.1.md)** — moving from the v0.1 engine
- **[docs/AUDIT_AND_CONTROLS.md](docs/AUDIT_AND_CONTROLS.md)** — how the SDK maps to the manifest's audit checklist and to NIST, SOC 2 and SOX controls

## Conformance and the WEKID name

This SDK *implements the WEKID framework*. Deploying it does not, by itself,
make a system WEKID-conformant. Conformance is assessed against the current
release of WEKID-STD-001 and every applicable companion standard (WEKID-STD-002
v1.1 for sector calibration). A claim such as "WEKID-conformant" or "WEKID
Certified" needs a trademark licence from WEKID LLC.

Licence: **Apache-2.0** (see `LICENSE` and `NOTICE`). You may use, modify and redistribute the SDK,
including commercially. The licence does not grant rights in the WEKID™ name or marks.

---

© 2026 WEKID LLC. All rights reserved. WEKID™ is a trademark of WEKID LLC.
