AI Runtime Control & Governance Layer
Runtime detection · Runtime control · Governance · Signed execution evidence
Getting Started · Architecture · Runtime Control · Evidence Model · Why WAIL · Telemetry
AI requests don't always behave as expected.
They slow down, time out, fail, or become unreliable.
Most applications can detect these runtime issues. Few can control what happens next.
WAIL is an AI runtime control and governance layer for your existing provider clients. It observes execution as it happens, detects unhealthy runtime behavior, and can retry or reroute execution when intervention is justified. Every decision and action can be recorded as signed, verifiable evidence.
WAIL is not a gateway. It works with your existing provider SDK and request flow instead of replacing them.
Runtime reroute applies to the next request and does not permanently change the model or provider configured by your application.
Architecture
What WAIL Does
- Detect Runtime Issues — Observe AI execution and identify abnormal latency, streaming behavior, errors, timeouts, and other runtime degradation.
- Assess Execution Health — Determine how serious a runtime issue is and whether it justifies intervention.
- Evaluate Alternatives — Compare observed models and providers using live runtime measurements when another execution path may be needed.
- Control Runtime Execution — Retry or reroute when runtime conditions and policy justify intervention; otherwise preserve the application's current execution path.
- Record What Happened — Produce signed, verifiable runtime evidence for decisions, actions, and execution outcomes.
- Support Governance — Preserve structured incident and execution records for governance, audit, and compliance workflows where enabled.
Runtime Control Loop
Runtime measurements
↓
Baseline + anomaly detection
↓
Risk / severity evaluation
↓
Candidate scoring
↓
Runtime decision
↓
Intervention when required
(next request for runtime reroute)
↓
Signed execution evidence
WAIL does not route requests simply because another model scores better. Candidate ranking informs runtime control; intervention remains driven by observed runtime conditions and control policy.
Installation
Install WAIL from PyPI:
pip install wail
Quick Start
Wrap your existing AI client with WAIL.
from openai import OpenAI
import wail
client = wail.wrap(OpenAI())
Use it exactly as you normally would.
response = client.responses.create(
model="gpt-4o-mini",
input="Explain what WAIL does."
)
print(response.output_text)
After each request, WAIL prints a runtime summary.
[WAIL] AI Runtime Control Layer
----------------------------------------------------------------------
[14:33:10] Plan Developer
[14:33:10] Provider openai
[14:33:10] Model gpt-4o-mini
[14:33:10] Duration 842 ms (1.08x)
[14:33:10] TTFT 186 ms (0.94x)
[14:33:10] Throughput 42.50 tok/s
[14:33:10] Mean Token Gap 24 ms
[14:33:10] Active Signals 0
[14:33:10] Runtime Severity NONE
[14:33:10] Risk Score 0.00
[14:33:10] Dominant Surface NONE
[14:33:10] Decision OBSERVE
[14:33:10] Trace SAVED · 01M00N3X...
----------------------------------------------------------------------
Every execution also generates a signed runtime artifact that includes:
- Runtime observations
- Execution assessment
- Runtime decisions
- Control actions
- Execution outcome
- Cryptographic integrity metadata
Supported Providers
| Provider | Runtime Detection | Runtime Control | Runtime Evidence |
|---|---|---|---|
| OpenAI | ✅ | ✅ | ✅ |
| Anthropic | ✅ | ✅ | ✅ |
| Google Gemini | ✅ | ✅ | ✅ |
| OpenAI-compatible Local LLM | ✅ | ✅ | ✅ |
| OpenRouter | ✅ | ✅ | ✅ |
The runtime evidence model remains consistent across all supported providers.
CLI
Inspect and verify runtime artifacts directly from the command line.
wail traces incidents
wail trace show <TRACE_ID>
wail verify <ARTIFACT_FILE>
Documentation
Learn more about WAIL:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wail_runtime-1.0.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: wail_runtime-1.0.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e2be2ab97631bb7fe727ca6b53cd4d1ca41933fd03de3143abc17c66702fd2b
|
|
| MD5 |
51565d8c4ecbee4a455c5024618d7409
|
|
| BLAKE2b-256 |
3bcb4b601cf271d8cda4364c301f5e9462854b692ea2781c22b8eab903ec934f
|