TheDocumentation Index
Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
/governance route is the org governance daily home: the read-mostly oversight dashboard an admin opens to answer “is the gateway healthy, are we within budget, did anything anomalous happen overnight, are users actually using this?”. It’s the counterpart of /me for the admin persona.
It is intentionally distinct from the admin-authoring surface at /settings/governance/*, see Control plane → Daily-use vs admin-authoring for why the split exists.
Pairs with: Control plane & integration tiers for the surface map, Anomaly rules for what populates the anomalies strip, and Cost centers for how the Spend by cost center card attributes spend across the org.
Visibility: the
/governance entry only appears in the main sidebar once the org’s setup-state OR-of-flags trips (see When the entry shows up below). A brand-new org sees the Settings → AI Governance admin pages instead until they have data flowing.What you see
The dashboard groups data into four strips, top to bottom.1. KPI strip
Five at-a-glance numbers for the selected window (default: last 30 days):| KPI | What it shows |
|---|---|
| Total spend | USD across every gateway request the org saw, summed |
| Active users | Distinct principal IDs that hit the gateway in the window |
| Active sources | IngestionSources in active state (have received at least one event) |
| Anomaly count | AnomalyAlert rows in the window, broken down by severity (anomalyBreakdown.{critical,warning,info}) |
| Recent activity | Count of governance-tagged events in the last 24h |
2. Spend over time
A daily bar chart of org-wide spend. Click a bar to drill into the per-user breakdown for that day. The chart is the unified view across:- Personal Virtual Keys minted via
/me. - Project Virtual Keys minted from project pages.
- Anything else that hit the gateway with a
vk-lw-*Bearer.
3. Ingestion-source health
A status row per active IngestionSource:- Status pill:
active,awaiting_first_event,error. - Source type:
otel_generic,claude_cowork,workato, etc. - Last event: relative timestamp of the most recent successful ingest.
- Event count: 24h, 7d, 30d, picked from the same
ingestionSources.healthMetricstRPC procedure thatlangwatch ingest healthuses (so the CLI and the web UI are byte-for-byte identical on--json).
4. Anomalies
The list ofAnomalyAlert rows in the window, sorted newest first. Each row shows:
- Severity chip (critical, warning, info).
- Rule name that fired.
- Triggered at timestamp.
- Current vs baseline values for spend-spike anomalies.
- Scope (organization, source_type, source).
When the entry shows up
/governance is gated by an OR-of-flags signal that the org has activated governance. The signal is the api.governance.setupState({ organizationId }) tRPC procedure (read-only, cheap, server-side):
Governance active = any 3 of 5. After the admin walkthrough you’ll have at least 4 (routing policies + ingestion sources + recent activity from the dev pass + the budget you create implies personal VKs once a developer signs in).
The same signal drives:
- The Govern (Preview) entry visibility in the main sidebar.
- The CLI
langwatch governance statusoutput (mirrors the same booleans). - The post-onboarding redirect, when an admin lands on
/, the persona-2 home picker sends them to/governanceif active, else to/settings/governanceto keep configuring.
Permissions
The/governance page itself is gated to governance:view (granted to ADMIN by default). Underlying procedures:
governance.kpis(organizationId, window), KPI strip.governance.spendOverTime(organizationId, window), bar chart.ingestionSources.healthMetrics(organizationId), health strip.activityMonitor.recentAnomalies(organizationId, window), anomaly list (this lives in theactivityMonitorrouter, notgovernance, for routing-through-service reasons).
activityMonitor:view, the recommended permission to grant a security-analyst custom role that should see anomalies without managing rules.
What you can do FROM here
The dashboard is read-mostly, but every section deep-links into the admin-authoring surface where you’d actually change something:- KPI strip → click “Total spend” KPI → drills into per-user breakdown table.
- Spend over time chart → click a day → opens that day’s per-user breakdown filtered to ±2 hours of the spike.
- Ingestion-source health row → click into the per-source detail page.
- Anomalies row → click the rule name → opens the anomaly-rule editor at that rule.
/settings/governance/*.
Where to next
- Detect anomalies: Anomaly rules.
- Inspect ingestion-source health from the terminal: CLI debug.
- Export to your SIEM: Compliance architecture.
- Tighten privacy: No-spy mode.
- Audit who did what when: Audit log.