Skip to main content
This page gives the high-level architecture.
For deeper diagrams, see Architecture Diagrams.
QWED separates untrusted model translation from deterministic verification so you can enforce AI reliability, tool call verification, and zero-trust policy boundaries at runtime.

Core principle

Translation is useful but untrusted. Verification is the trust anchor.

Layered architecture

1) API Gateway

  • Authentication and authorization
  • Rate limiting and tenancy controls
  • Request routing and transport security

2) Translation Layer (untrusted)

  • Converts natural language into structured inputs
  • Can use any LLM provider (cloud or local)
  • Output is always treated as untrusted until verified

3) Verification Engines (deterministic)

EnginePurpose
MathSymbolic arithmetic and algebra checks
LogicSAT/SMT verification and constraint solving
CodeAST and symbolic security analysis
SQLQuery safety and structure validation
Schema/Taint/Graph/Stats/Fact/Image/ReasoningDomain-specific verification paths

4) Agent security guards

Guards inspect tool calls, contexts, and policy boundaries before execution.
GuardPurpose
RAGGuardDefends retrieval contexts from injection/poisoning
ExfiltrationGuardPrevents unauthorized data movement
MCPPoisonGuardValidates MCP tool definitions and safety
SovereigntyGuardEnforces data residency and routing policy
SelfInitiatedCoTGuardChecks reasoning flow integrity
ProcessVerifierMilestone-based process validation
StateGuardDeterministic workspace rollback via shadow git snapshots

5) Attestation and audit

Each verification can emit signed evidence for traceability and compliance workflows.
{
  "query_hash": "sha256(...)",
  "verification_result": true,
  "engine": "QWED-Math-v2",
  "timestamp": 1735689600
}

Request lifecycle

Security model snapshot

ThreatQWED response
Hallucinated claimRejected or corrected by deterministic check
Prompt injectionTranslation may be affected, but verifier/guards enforce policy
Unsafe code or SQLBlocked by parser, AST checks, and guard rules
Untrusted tool actionGuarded and policy-checked before execution

LLM verification

See how QWED validates LLM outputs with formal methods instead of probability-only confidence.

AI agent verification

Apply policy enforcement and pre-execution checks to autonomous agents.

Prompt injection defense

Review production guidance for prompt injection defense and OWASP LLM risks.

MCP security

Secure Model Context Protocol integrations and verify tool execution paths.

Deployment modes

ModeFit
Cloud APIFastest start, hosted control plane
Self-hostedData control in your VPC/Kubernetes
HybridMix cloud scale with local policy boundaries

Next steps

  1. Core Concepts
  2. Architecture Diagrams
  3. SDK Guards
  4. Self-Hosting