Skip to main content

Ingest quality signal

POST /api/v1/jobs/{job_id}/quality
No authentication required. Called by the SDK or HTTP webhook. Body:
{
  "agent_id": "invoice-processor-v2",
  "job_id": "job-20240315-001",
  "overall_passed": true,
  "token_input": 1247,
  "token_output": 312,
  "model": "gpt-4o",
  "latency_ms": 1840,
  "checks": [
    {
      "check_id": "output_not_empty",
      "severity": "HIGH",
      "passed": true
    },
    {
      "check_id": "subtotal_arithmetic",
      "severity": "HIGH",
      "passed": true,
      "expected": "1234.56",
      "actual": "1234.56",
      "delta": "0.00"
    }
  ]
}
Response:
{
  "signal_id": "uuid",
  "agent_id": "uuid",
  "job_id": "job-20240315-001",
  "overall_passed": true,
  "check_count": 2,
  "passed_count": 2,
  "received_at": "2026-03-24T10:00:00Z"
}

Get agent signals

GET /api/v1/agents/{agent_id}/signals?limit=50
Returns recent quality signals for an agent.

Get agent accuracy

GET /api/v1/agents/{agent_id}/accuracy?days=30
Returns daily aggregated pass rates per check:
[
  {
    "check_id": "subtotal_arithmetic",
    "severity": "HIGH",
    "agg_date": "2026-03-24",
    "total_runs": 85,
    "passed_runs": 72,
    "pass_rate": 0.847,
    "trend": "DEGRADING"
  }
]

Health heatmap

GET /api/v1/optimise/heatmap?window_days=30&severity=ALL
Returns the full heatmap data used by the dashboard — pass rates for every agent × check combination.