Skip to main content
If you already have an orchestration loop and don’t want a framework adapter, call Guard.verify(...) directly or decorate your tools with @guard.wrap(...). Both are framework-free.

Direct verify

verify() returns a VerifyResult with allowed, reason, violations, redacted_content, redacted_params, pii_found, latency_ms, and certificate.

Wrap a function

@guard.wrap runs verify before the function body. On a block it raises CertiorBlocked(result) without calling the function. The decorator works on sync and async functions.

Wrap with a content extractor

If your tool’s textual content is buried inside a structured payload, supply a content_extractor:
The extractor’s output is fed to the content scanner so PII detection and the active policy’s content rules apply.

CertiorMiddleware

For loop architectures that prefer middleware over decorators, certior.adapters.tool_use.CertiorMiddleware exposes the same verification as a callable middleware object. See certior/adapters/tool_use.py for the protocol.

See also