> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qwedai.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Protocol specifications

> QWED formal specifications for interoperability. Overview of QWED-SPEC, QWED-Attestation, and QWED-Agent protocols for deterministic AI verification systems.

QWED is defined by formal specifications that enable interoperability.

## Core specifications

| Specification | Version | Description |
| - | - | - |
| [QWED-SPEC](/specs/qwed-spec) | v1.0.0 | Core protocol definition |
| [Verification Context](/specs/verification-context) | v1.0 | Atomic record of a verification |
| [QWED-Attestation](/specs/attestation) | v1.0.0 | Cryptographic proofs |
| [QWED-Agent](/specs/agent) | v1.0.0 | AI agent verification |

## What's in a spec?

### QWED-SPEC v1.0

The core specification defines:

* **Request/response format** — JSON schemas for API
* **Verification engines** — Math, Logic, Code, SQL, etc.
* **QWED-Logic DSL** — Grammar for logical expressions
* **Error codes** — Standardized error taxonomy
* **Versioning** — Semantic versioning rules

### Verification Context v1.0

The Verification Context specification defines:

* **Document format** — the atomic JSON record of a verification
* **Four context layers** — interpretation, proof, evidence, decision
* **Verdict invariants** — `VERIFIED` requires a `sha256` `proof_ref`; `UNVERIFIABLE`/`BLOCKED` require `null`
* **`proof_ref`** — canonical RFC 8785 evidence commitment
* **Truth vs. admission** — gate execution on `admission == "ADMIT"` only

### QWED-Attestation v1.0

The attestation specification defines:

* **JWT format** — ES256 signed tokens
* **Claims** — Standard and custom JWT claims
* **Trust anchors** — Issuer verification
* **Chain validation** — Linked attestations

### QWED-Agent v1.0

The agent specification defines:

* **Registration** — Agent identity and permissions
* **Action verification** — Pre-execution checks
* **Budget management** — Cost and rate limits
* **Trust levels** — 0-3 autonomy scale

## JSON schemas

Machine-readable schemas are available at:

```
specs/schemas/
├── request.v1.json
├── response.v1.json
├── attestation.v1.json
└── agent.v1.json
```

## Implementing QWED

To implement the QWED protocol:

1. Parse requests per `request.v1.json`
2. Route to appropriate verification engine
3. Return responses per `response.v1.json`
4. Optionally generate attestations per QWED-Attestation

## Conformance levels

| Level | Requirements |
| - | - |
| **Basic** | Request/response format |
| **Standard** | + All 8 engines |
| **Full** | + Attestations + Agent API |


## Related topics

- [QWED protocol specification](/specs/qwed-spec.md)
- [Verification Context specification](/specs/verification-context.md)
- [QWED-Agent specification v1.1](/specs/agent.md)
- [QWED Protocol: deterministic verification for LLMs](/whitepaper.md)
- [QWED A2A zero-trust protocol for agent-to-agent verification](/a2a/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.