← Documentation

Getting Started

From zero to validated agent output in five steps. ValGuard sits between your app and LLM providers — rules run on every completion in microseconds, not seconds. For curl, SDKs, and webhooks see Quickstart.

Current dashboard flow: go to Dashboard -> Agents -> Create agent, pick a preset (or Blank agent), then optionally copy rules from an existing agent.

Recommended first templates: Invoice extraction, RAG Q&A baseline, PII detection. Each pack is production-ready and runs deterministically — no LLM-as-judge latency.

  1. 1Create account & agent

    Loading

  2. 2Generate an API key

    In Account → API keys, create a live key. Store it securely — it is shown once. The in-dashboard launch wizard walks you through keys, optional provider vault (Growth+), playbooks, and a sandbox validation run.

  3. 3Pick a validator template

    Apply one of the three recommended starter packs below, or browse all system templates in the marketplace. Templates copy curated rules into your agent — no YAML required.

    extraction

    Invoice extraction

    12 rules · 26 µs · p50 24 µs · 0 allocs · 0 B

    Structured invoice JSON with line items, tax math, ISO currency codes, and dates — the fastest path for finance workflows.

    Best for: AP automation · ERP ingestion · OCR post-processing

    valid_format · required_fields · numeric_relations · valid_iso_currency · valid_iso_date

    rag

    RAG Q&A baseline

    Catch truncation markers, unsafe URLs, repetition, and malformed citations before answers reach users.

    Best for: Knowledge-base chat · Support copilots · Internal search assistants

    no_truncation_markers · repetition_ratio_max · url_safety · markdown_link_well_formed · no_lorem_ipsum

    compliance

    PII detection

    5 rules · 7.5 µs · p50 7.2 µs · 0 allocs · 0 B

    Block common personal-data and secret patterns in model output — a quick compliance win with zero LLM judges.

    Best for: Customer-facing chatbots · Support replies · Data-handling guardrails

    pii_detection · pii_ssn_us · pii_pesel · secrets_detection · forbidden_patterns

  4. 4First API call

    Point your existing OpenAI-compatible client at the ValGuard validation layer. Set X-VG-Agent to the agent slug (usually default or a template mirror like invoice_extraction_agent).

    export VG_PROXY="https://api.valguard.ai"
    export VG_API_KEY="vg_live_YOUR_KEY"
    export VG_AGENT="default"
    # Required when PROXY_MOCK_UPSTREAM=false (BYOK):
    export VG_PROVIDER_KEY="sk-..."
    
    curl -s "$VG_PROXY/v1/chat/completions" \
      -H "Authorization: Bearer $VG_API_KEY" \
      -H "X-VG-Agent: $VG_AGENT" \
      -H "X-Provider-Key: $VG_PROVIDER_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"Return JSON with name and email"}]}'
  5. 5Shadow mode → enforcement

    Start in shadow mode to log validation failures without blocking traffic. When rules look right, switch individual validators to block or reask in your selected agent's Validatorstab, or turn off shadow mode in the same agent's Settings tab. Open the agents list in Dashboard → Agents, then select the target agent.. See shadow mode docs.

What's next?

  • Tutorials — step-by-step guides for validation, playbooks, and deployment
  • Validators catalog — browse all built-in rules and parameters
  • Playground — test rules without an LLM call
  • Providers — route to OpenAI, Anthropic, Gemini, and 20+ backends
  • Beta program — 90-day Developer or Growth trial