Skip to main content

Agent SLOs

An Agent SLO (Service Level Objective) defines a performance target for a specific agent. LangSight evaluates SLOs continuously against live session data and shows breaches on the Overview dashboard.

SLO types

MetricWhat it measuresTarget format
success_rate% of sessions tagged success or success_with_fallback in the evaluation windowpercentage 0–100 (e.g. 95.0)
latency_p9999th percentile session duration in millisecondsmilliseconds (e.g. 5000)

Creating an SLO

Open the Agents page, click an agent row to open the detail panel, then select the SLOs tab. Click + Add SLO, choose a metric, set your target and window, and click Create SLO. The new SLO appears immediately with its evaluated status — no API call required. For a full walkthrough of the form fields and target guidance, see Configuring SLOs.

Via API

curl -X POST http://localhost:8000/api/slos \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "customer-support-bot",
    "metric": "success_rate",
    "target": 95.0,
    "window_hours": 24
  }'

Checking SLO status

curl http://localhost:8000/api/slos/status \
  -H "X-API-Key: <your-key>"
Response:
[
  {
    "slo_id": "abc123",
    "agent_name": "customer-support-bot",
    "metric": "success_rate",
    "target": 95.0,
    "current_value": 97.3,
    "window_hours": 24,
    "status": "ok",
    "evaluated_at": "2026-03-19T10:00:00Z"
  }
]
Status values: ok | breached | no_data

Dashboard

The Overview page shows an “Agent SLOs” panel when SLOs are defined. Each row shows the agent, metric, target, current value, and a colour-coded status dot (green = ok, red = breached, grey = no data).

API reference

EndpointDescription
GET /api/slosList all SLO definitions
POST /api/slosCreate a new SLO
GET /api/slos/statusEvaluate all SLOs against current data
DELETE /api/slos/{id}Delete an SLO