Skip to main content

VeroQ Python SDK — the verified intelligence layer for AI agents.

Project description

veroq

Official Python SDK for VeroQ — the verified intelligence layer for AI agents.

Every claim is fact-checked with evidence chains. Every output includes confidence scores. Enterprise customers get decision lineage, escalation triggers, and full audit trails.

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

All Methods

Method Description
ask(question) Ask any financial question
ask_stream(question) Stream via SSE
verify(claim) Fact-check with evidence chain
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
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veroq-2.1.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veroq-2.1.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file veroq-2.1.0.tar.gz.

File metadata

  • Download URL: veroq-2.1.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for veroq-2.1.0.tar.gz
Algorithm Hash digest
SHA256 000684bd43cd88ba7cb9e814870d741b1521cfa8f1f1bb2fac00ea3c903a1e02
MD5 3fa605855a95eca9f5fa4c30e0964d7e
BLAKE2b-256 fcc27c59e73b2f377f0648b6f88c9f94c73a37ee874b87ee2a65d10b7755fc4e

See more details on using hashes here.

File details

Details for the file veroq-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: veroq-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for veroq-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d80c5c0d9e9751ff7f30ac510bd96e03db6e6405acd896e21ac17f1007c395d
MD5 f27435bed4622235775ea2aa83d48c15
BLAKE2b-256 9b231c317348c0a2304332fcf283daef41b8a0563063a141e6d84e89b3d6ece3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page