veroq
Verified AI. One function call. Stop shipping hallucinations.
Official Python SDK for VeroQ. shield() any LLM output — every claim fact-checked with evidence chains, confidence scores, and verification receipts.
Migrating from
polaris-news? Drop-in replacement — just change your import.
Prompt Shield — One Line to Verify Any LLM
from veroq import shield
result = shield("NVIDIA reported $22B in Q4 revenue")
print(result.trust_score) # 0.73
print(result.is_trusted) # False — claims contradicted
print(result.corrections) # [{"claim": "...", "correction": "actual revenue was $68B"}]
print(result.verified_text) # text with corrections inline
print(result.receipt_ids) # ["vr_abc123"] — permanent proof
Works with any LLM. One function. Every claim fact-checked.
Installation
pip install veroq
Quick Start
from veroq import VeroqClient
client = VeroqClient() # uses VEROQ_API_KEY env var
# Ask anything — routes to 41 intents automatically
answer = client.ask("How is NVDA doing?")
print(answer["summary"])
print(answer["trade_signal"]) # { action: "hold", score: 55 }
# Verify any claim — evidence chains + confidence breakdown
result = client.verify("NVIDIA beat Q4 earnings by 20%")
print(result["verdict"]) # "supported"
print(result["confidence"]) # 0.92
print(result["evidence_chain"]) # [{ source: "Reuters", ... }]
# Stream in real-time
for event in client.ask_stream("AAPL price and technicals"):
if event["type"] == "summary_token":
print(event["data"]["token"], end="", flush=True)
Multi-Agent Workflows
# Verified Swarm — 5 agents with automatic verification
swarm = client.create_verified_swarm(
"Analyze NVDA for a long position",
roles=["planner", "researcher", "verifier", "critic", "synthesizer"],
escalation_threshold=75,
credit_budget=30,
)
print(swarm["synthesis"]["summary"])
print(swarm["budget"]) # { spent: 12, remaining: 18 }
print(swarm["verification_summary"]) # { avg_confidence: 82 }
# Domain-specific runtime
legal = client.create_runtime(
"GDPR data retention requirements",
vertical="legal",
cost_mode="premium",
)
External Tool Calls
result = client.call_external_tool("alphavantage", "get_quote", {"symbol": "NVDA"})
# Permission engine → rate limiter → cache → execution → audit
Self-Improvement Feedback
client.submit_feedback(
session_id=swarm["session_id"],
query="NVDA analysis",
reason="data_gap",
detail="Missing Q4 insider trading data",
)
Enterprise Features
client.configure_enterprise({
"enterprise_id": "acme-capital",
"escalation_threshold": 80,
"escalation_pauses": True,
"session_id": "trading-session-001",
})
lineage = client.get_decision_lineage("ask", {"question": "Should I buy NVDA?"})
print(lineage["decision"]) # "review" — high-stakes detected
trail = client.get_audit_trail(session_id="trading-session-001")
Why VeroQ?
| What you get | |
|---|---|
| Trust | Evidence chains and confidence breakdowns on every response |
| Safety | Permission engine, decision lineage, human-in-the-loop escalation |
| Cost control | 3 cost modes, per-step budgets, credit transparency |
| Continuous improvement | Feedback loop with web search fallback fills data gaps over time |
| Multi-domain | Finance (flagship), legal, research, compliance, custom verticals |
Cached Shield — High-Volume Pipelines
from veroq import CachedShield
cached = CachedShield(max_cache=1000, ttl_seconds=3600)
result = cached("NVIDIA reported $22B in Q4 revenue") # API call
result = cached("NVIDIA reported $22B in Q4 revenue") # instant, 0 credits
print(cached.stats()) # {'hits': 1, 'misses': 1, 'hit_rate': 0.5, 'size': 1}
Agent Monitoring
# Set up autonomous monitoring
client.agent_auto_monitor("my-bot", trust_threshold=0.7, check_interval_hours=6)
# Manual health check
health = client.agent_health_check("my-bot")
print(health["health"]["status"]) # "healthy" or "degraded"
print(health["health"]["trust_trend"]) # "improving" / "declining" / "stable"
All Methods
| Method | Description |
|---|---|
shield(text) |
Verify any LLM output (module-level) |
CachedShield(...) |
Local LRU cache for high-volume shield calls |
ask(question) |
Ask any financial question |
ask_stream(question) |
Stream via SSE |
verify(claim) |
Fact-check with evidence chain |
verify_output(text) |
Extract + verify claims from any text |
create_verified_swarm(query, ...) |
Multi-agent verified pipeline |
create_runtime(query, ...) |
Domain-specific runtime |
call_external_tool(server_id, tool, params) |
Secure external tool proxy |
submit_feedback(...) |
Self-improvement feedback |
memory_store(agent_id, key, value) |
Store agent memory |
memory_recall(agent_id) |
Recall agent memories |
memory_list(agent_id) |
List all agent memories |
agent_auto_monitor(agent_id) |
Configure autonomous monitoring |
agent_health_check(agent_id) |
Trigger health check |
watch(tickers) |
Real-time SSE verification stream |
configure_enterprise(config) |
Enterprise governance |
get_decision_lineage(tool, input, output) |
Decision audit |
get_audit_trail(session_id?) |
Audit trail |
feed() / brief(id) / search(query) |
Intelligence briefs |
stream(categories?) |
Stream briefs via SSE |
Error Handling
from veroq import AuthenticationError, RateLimitError, NotFoundError
try:
client.ask("NVDA analysis")
except RateLimitError as e:
print(f"Retry after: {e.retry_after}s")
Backward Compatibility
PolarisClient aliased to VeroqClient. Both VEROQ_API_KEY and POLARIS_API_KEY supported.
Links
Metadata
Release files for veroq 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| veroq-2.2.0.tar.gz | 29.9 kB | Without provenance | Details for veroq-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| veroq-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for veroq-2.2.0-py3-none-any.whl |
Total release size: 64.8 kB
Release files / veroq-2.2.0.tar.gz
| Download URL | veroq-2.2.0.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9aa9bd8e07ec69f64ad78903c5ac8de6cdcb2b34e27bff2e0c0b508bd946719
|
|
BLAKE2b-256 checksum How to use checksums |
6c2c4e4823fb6bc4ecd27983b0e09e4d84235fcf24ec3f5e75ff434a05e0df95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / veroq-2.2.0-py3-none-any.whl
| Download URL | veroq-2.2.0-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
020f984976ed6c61a8eafb4c2d66ecdf573176dca787867713883a6c24e4c033
|
|
BLAKE2b-256 checksum How to use checksums |
9e69138b40a8368f3bf7b6c28bdf32f53e06c576c68e619a2db15348a34351c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for veroq 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.