Quickstart
Prerequisites
- Docker installed and running
- A GOVERN API key (get one at govern.archetypal.ai)
- An application making AI API calls
Step 1 — Pull and run
docker run -d \ --name govern-probe \ -p 4020:4020 \ -e GOVERN_API_KEY=gvn_live_xxxxxxxxxxxx \ -e GOVERN_ORG_ID=org_xxxxxxxxxxxx \ -e UPSTREAM_URL=https://api.anthropic.com \ archetypal/govern-probe:latestThe Probe is now running on port 4020, forwarding to Anthropic.
Step 2 — Redirect your app
Change one environment variable in your application:
# BeforeANTHROPIC_BASE_URL=https://api.anthropic.com
# AfterANTHROPIC_BASE_URL=http://localhost:4020Your app code stays identical. The SDK uses the base URL automatically.
Step 3 — Make an inference
Run your application normally. The Probe intercepts the inference and begins scoring.
import anthropic
client = anthropic.Anthropic( base_url="http://localhost:4020", # <- Probe endpoint api_key="your-anthropic-key",)
message = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{"role": "user", "content": "Summarize our Q3 results."}])print(message.content)Step 4 — Verify it’s working
Check the Probe health endpoint:
curl http://localhost:4020/healthz# {"status":"ok","version":"1.0.0","upstreamReachable":true,"telemetryConnected":true}Check the metrics endpoint:
curl http://localhost:4020/metrics# govern_inferences_total 1# govern_inferences_scored_total 1# govern_telemetry_batches_flushed_total 1# govern_proxy_latency_p50_ms 3.2Step 5 — Open the GOVERN dashboard
Navigate to your organization in govern.archetypal.ai. Within 10 seconds of your first inference, you will see:
- The inference logged with full metadata
- Security, bias, accuracy, drift, and cost scores
- Latency and token usage metrics
What just happened
Your App → POST /v1/messages → GOVERN Probe → POST /v1/messages → Anthropic │ ├── forwarded response immediately (p50: 3ms overhead) │ └── scored asynchronously → buffered → flushed to GOVERNCommon provider configurations
OpenAI
docker run -d \ -p 4020:4020 \ -e GOVERN_API_KEY=gvn_live_xxxx \ -e GOVERN_ORG_ID=org_xxxx \ -e UPSTREAM_URL=https://api.openai.com \ archetypal/govern-probe:latestfrom openai import OpenAIclient = OpenAI(base_url="http://localhost:4020/v1", api_key="your-openai-key")Ollama (local models)
docker run -d \ -p 4020:4020 \ -e GOVERN_API_KEY=gvn_live_xxxx \ -e GOVERN_ORG_ID=org_xxxx \ -e UPSTREAM_URL=http://host.docker.internal:11434 \ archetypal/govern-probe:latestNext steps
- Docker Compose — run Probe alongside your app
- Scoring modes — switch from log to flag to block
- Configuration reference — full YAML config options