Quick start
Fail-closed default
Since v2.1.0: Tools registered without a
verification_fn are rejected by default. This enforces the QWED principle: “Verification decides IF.”Tool call statuses
Tool call flow
- LLM emits tool call with arguments
- QWED intercepts and checks for a registered
verification_fn - If no
verification_fn→ REJECTED (fail-closed, audited) - If
verification_fnexists → execute with error boundary - Returns verified result with cryptographic receipt
Available built-in tools
All built-in tools return
COMPUTED status because they perform deterministic calculations without comparing against an LLM claim.AML country consistency
Thecheck_aml_compliance tool delegates to ComplianceGuard.high_risk_countries for its sanctions list, ensuring a single source of truth across the entire QWED-Finance system.
Black-Scholes input validation
Theprice_option tool rejects non-positive inputs for spot_price, strike_price, time_to_expiry, and volatility before computing, preventing ZeroDivisionError at the math boundary.
Black-Scholes single source of truth
Since N-01 fix:
price_option delegates to DerivativesGuard.verify_black_scholes() — the same mpmath (30 dp) implementation used by direct guard calls. This guarantees that pricing through the OpenResponses integration and pricing through DerivativesGuard produce identical outputs for identical inputs.float-based Black-Scholes routine (math.log/exp/sqrt/erf). Same formula, two precision paths — same input could yield two different outputs depending on call site. The duplicate has been removed.
The tool result now reports the computed price and delta Greek straight from the guard’s quantized Decimal output:
Item wrapper (streaming)
Format results for streaming compatibility:COMPUTED item structure
APPROVED item structure
OpenAI integration
Custom tools
Register your own verified tools. Averification_fn is required — tools without one are rejected.