VeroQ Shield adapter for OpenAI Agents SDK + Agent Governance Toolkit — output guardrails, trust scoring, content verification
Project description
veroq-agentmesh
VeroQ Shield adapter for the Agent Governance Toolkit. Feeds claim-level verification into AgentMesh content governance and trust evaluation.
Two integration points:
- ShieldEvaluator — Runs VeroQ Shield on agent output and maps results to AgentMesh content quality dimensions (accuracy, completeness, consistency). Generates audit entries with verification receipts.
- ShieldActionGuard — Gates actions based on output verification. An agent's trust score is adjusted by Shield confidence before the allow/deny decision.
Install
pip install veroq-agentmesh
Quick Start
from veroq_agentmesh import ShieldEvaluator, ShieldActionGuard
# 1. Evaluate agent output
evaluator = ShieldEvaluator(api_key="vq_...")
report = evaluator.evaluate(
"NVIDIA reported $22B in Q4 revenue",
agent_id="did:mesh:researcher",
content_id="response-001",
)
print(report.trust_score) # 0.73
print(report.passed) # False (contradiction found)
print(report.scores) # {'accuracy': 0.73, 'completeness': 1.0, 'consistency': 0.67}
print(report.audit_entries) # per-claim receipts
# 2. Feed into policy evaluation context (0-1000 scale)
ctx = report.to_policy_context()
# {'trust_score': 730, 'claims_contradicted': 1, 'receipt_ids': ['r1', 'r2', 'r3'], ...}
# 3. Gate actions with verification
guard = ShieldActionGuard(
min_trust_score=500,
sensitive_actions={"publish": 800},
shield_evaluator=evaluator,
)
result = guard.check_with_verification(
agent_did="did:mesh:writer",
agent_trust_score=900,
action="publish",
output_text="NVIDIA reported $22B in Q4 revenue",
)
# effective_score = 900 * 0.73 = 657 < 800 -> denied
How It Maps
| Shield Output | AgentMesh Dimension | Description |
|---|---|---|
trust_score (0-1) |
accuracy |
Overall factual accuracy of the output |
| verifiable / total claims | completeness |
Fraction of claims that could be checked |
| 1 - contradicted / total | consistency |
Absence of contradictions |
| Per-claim receipts | Audit trail entries | Cryptographic proof of each verification |
trust_score * 1000 |
Policy context trust_score |
0-1000 scale for PolicyEvaluator |
With ContentQualityEvaluator
from agent_os.content_governance import (
ContentQualityEvaluator, ContentQualityRule,
ContentDimension, QualityGate,
)
from veroq_agentmesh import ShieldEvaluator
# Configure quality gates
quality_eval = ContentQualityEvaluator()
quality_eval.add_rule(ContentQualityRule(
name="min-accuracy",
dimension=ContentDimension.ACCURACY,
threshold=0.8,
gate=QualityGate.FAIL,
))
quality_eval.add_rule(ContentQualityRule(
name="min-consistency",
dimension=ContentDimension.CONSISTENCY,
threshold=0.9,
gate=QualityGate.WARN,
))
# Run Shield and map to quality dimensions
shield_eval = ShieldEvaluator(api_key="vq_...")
scores = shield_eval.evaluate_to_quality_scores(agent_output)
dim_scores = {ContentDimension(k): v for k, v in scores.items()}
report = quality_eval.evaluate("agent-1", "resp-1", dim_scores)
print(report.passed) # True/False
print(report.warnings) # consistency warnings
print(report.failures) # accuracy failures
Trust Adjustment Formula
When using ShieldActionGuard.check_with_verification():
effective_score = base_trust_score * shield_trust_score
An agent with trust 800 that produces output with 0.5 accuracy gets an effective score of 400 — below most thresholds. This means even a highly trusted agent gets gated if its output can't be verified.
Components
| Component | Purpose |
|---|---|
ShieldEvaluator |
Runs Shield verification and maps to quality dimensions |
ShieldActionGuard |
Trust-gated actions with optional output verification |
ShieldContentReport |
Aggregated quality report with policy context conversion |
ShieldAuditEntry |
Per-claim verification receipt for audit trail |
Links
- VeroQ Shield —
pip install veroq - Agent Governance Toolkit
- Integration template
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 veroq_agentmesh-0.2.0.tar.gz.
File metadata
- Download URL: veroq_agentmesh-0.2.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87b92d8eee70d337c93f582f4cbc8fb2bcfef2e4dba97ca37ee27f49c20040a3
|
|
| MD5 |
2e5ac6ff3caf434e5257f45ed69b6bc9
|
|
| BLAKE2b-256 |
f6a71d988a1a470c1320e2a964ac96d8177f3b09c1a2c8d6b115a807ce08a9c9
|
File details
Details for the file veroq_agentmesh-0.2.0-py3-none-any.whl.
File metadata
- Download URL: veroq_agentmesh-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0284311c5ce641a6e2ac437b81782b34295d54c8e8678d77cf9ce98be76c4fef
|
|
| MD5 |
6e17cf1e306293f72f358153055df18d
|
|
| BLAKE2b-256 |
52684a27d3210f6c90576f9f194e0657ad792de7719f5ce5fc9c49b025a2ab4b
|