Quickstart

Get from zero to verified in under 5 minutes. No API key needed; everything runs locally.

Install the SDK

pip install vrdev

Verify your first result

The simplest way to start: verify pre-fetched state with a BYOS (Bring Your Own State) example. No database, no API, no credentials needed:

from vrdev import get_verifier, VerifierInput

v = get_verifier("vr/document.json.valid")
result = v.verify(VerifierInput(
    completions=["Generated valid JSON config"],
    ground_truth={
        "file_path": "config.json",
        "pre_result": {"valid": True, "content": {"name": "my-app", "version": "1.0"}},
    },
))
print(result[0].passed)    # True
print(result[0].score)     # 1.0
print(result[0].evidence)  # dict with validation details

Verify against live state

If you have a Python project with tests, try verifying against real system state:

from vrdev import get_verifier, VerifierInput

v = get_verifier("vr/code.python.tests_pass")
result = v.verify(VerifierInput(
    completions=["Tests pass"],
    ground_truth={"repo": ".", "test_cmd": "pytest"},
))
print(result[0].passed)    # True / False
print(result[0].score)     # 1.0 or 0.0
print(result[0].evidence)  # dict with raw test output

CLI usage

vr verify \
  --verifier vr/code.python.tests_pass \
  --ground-truth '{"repo": ".", "test_cmd": "pytest"}'

# ✓ PASS  score=1.0  evidence=test-output

Compose a reward pipeline

Chain verifiers into a pipeline. HARD verifiers act as gates: if they fail, SOFT scores are discarded.

from vrdev import get_verifier, compose, VerifierInput
from vrdev.core.types import PolicyMode

pipeline = compose(
    [get_verifier("vr/tau2.retail.order_cancelled"),
     get_verifier("vr/rubric.email.tone_professional")],
    policy_mode=PolicyMode.FAIL_CLOSED,
)

result = pipeline.verify(VerifierInput(
    completions=["Order cancelled and confirmation sent"],
    ground_truth={"order_id": "ORD-42"},
))
print(result[0].passed)        # True only if HARD gate passes
print(result[0].evidence)      # dict with evidence

Optional: Hosted API

For tamper-evident evidence, team dashboards, and multi-language access:

  1. Sign up at vr.dev
  2. Navigate to API Keys and create a key
  3. Use the hosted API (see Local vs Hosted)

Next steps

Quickstart | vr.dev Docs