agentsentriopen-source LLM observabilityDashboard

guide

Key usage monitoring

Know whose key is whose, what normal looks like, and when something's off — for both your BYO LLM connection (the one that can burn provider budget) and your project API keys. Per-project under the Keys tab; viewer+ reads, admin+ configures.

How it works

Inventory & assignment
Every monitored key — the BYO LLM connection and each project API key — carries one owner: an org member or a free-text service label. Only display prefixes are ever shown; full key material is never stored in plaintext.
Usage events
Metadata-only: LLM calls record model/tokens/cost/latency; project-key requests record route/status and a coarse hashed IP (unsalted truncated SHA-256) — a fingerprint for novelty detection, not anonymization (an unsalted IPv4 hash is reversible; treat it as personal data). Retention defaults to 30 days.
Baselines
A nightly job snapshots each key's normal window (default 14-day lookback). It only counts as warm after ≥20 events AND ≥48h of history — until then, detection falls back to your static caps.
Privacy
Nothing phones home. Events, baselines, and digests live in your Postgres; alerts and digests carry display prefixes only.

The alerts

Real-time checks run as usage arrives; the hygiene sweep runs nightly. Each alert names the key's display prefix, project, and assignee — never key material — and repeats of the same type for the same key dedupe within 6 hours (except key.unassigned, which uses a 24-hour window matching the nightly sweep).

AlertFires whenBasis
llm_key.cost_spike24h LLM spend exceeds your static daily cost cap.static
llm_key.baseline_deviation24h cost or tokens exceed sensitivity × the baseline average.warm baseline
llm_key.new_modelThe connection called a model not in its baseline set.warm baseline
api_key.rate_spikeHourly requests exceed the static cap or sensitivity × the baseline hourly rate.static / warm
api_key.new_networkA request arrived from a hashed IP not in the baseline.warm baseline
api_key.auth_failuresA disabled key was used repeatedly within an hour.static
key.unassignedA key has no assignee (nightly hygiene sweep).static
a2a.budget_approachA2A usage ≥ soft % of an active hard cap (UTC day).A2A budget
a2a.budget_breachA2A hard cut-off fired (429 on /api/a2a only).A2A budget

Tuning it

New to a project? Set the static caps first — they protect you immediately, before any baseline warms up. Then let baselines fill in the nuance.

SettingDefaultWhat it does
Sensitivity3Baseline-deviation multiplier — usage must exceed N× normal to fire. Range 1.1–100.
Static daily cost cap (USD)offHard ceiling for cost_spike; the safety net while a baseline is cold.
Static hourly request capoffAlert-only ceiling for rate_spike (does not cut off A2A or REST).
Project A2A daily ceiling50,000 onHard A2A cut-off (UTC day); see /guides/a2a-usage.
A2A soft approach %80Approach banner/email before A2A hard reject.
Baseline lookback (days)14How far back the nightly baseline looks. Range 1–90.
Event retention (days)30How long raw usage events are kept. Range 1–365.

Disabling a compromised key

Toggle disabled from the inventory. A disabled project key stops authenticating (requests 401), and continued use raises api_key.auth_failures so you see the leaked key still being tried. A disabled LLM connection pauses all judge calls and scheduled evals. This stops use inside AgentSentri — for a leaked provider key, also rotate it at the provider's console; AgentSentri can't revoke a key your provider issued.

Daily digests

Org admins enable a daily digest in org settings — a UTC hour and recipient emails. It leads with LLM-key spend, then other keys, anomalies, and hygiene flags. Always stored in-app; also emailed when the server has SMTP_URL configured. The scheduler recomputes baselines and sweeps hygiene at 02:30 UTC and checks digests hourly (disable with KEY_MONITOR_SCHEDULER=0).