---
title: "Get real-time workload recommendation"
method: GET
path: "/api/workload"
tags: ["Monitoring"]
---

# Get real-time workload recommendation

`GET /api/workload`

Returns system workload metrics and an actionable recommendation: `normal`, `throttle`, `shed`, or `pause`. Thresholds are runtime-configurable via `MC_WORKLOAD_*` environment variables.

## Response `200`

Workload snapshot and recommendation

- object
  - `timestamp` integer
  - `workspace_id` integer
  - `capacity` object
    - `active_tasks` integer
    - `tasks_last_5m` integer
    - `errors_last_5m` integer
    - `error_rate_5m` number
    - `completions_last_hour` integer
    - `avg_completion_rate_per_hour` number
  - `queue` object
    - `total_pending` integer
    - `by_status` object
    - `by_priority` object
    - `oldest_pending_age_seconds` integer, nullable
    - `estimated_wait_seconds` integer, nullable
    - `estimated_wait_confidence` 'calculated' | 'unknown'
  - `agents` object
    - `total` integer
    - `online` integer
    - `busy` integer
    - `idle` integer
    - `offline` integer
    - `busy_ratio` number
    - `load_distribution` object[]
      - `agent` string
      - `assigned` integer
      - `in_progress` integer
  - `recommendation` object
    - `action` 'normal' | 'throttle' | 'shed' | 'pause'
    - `reason` string
    - `details` string[]
    - `submit_ok` boolean
    - `suggested_delay_ms` integer
  - `thresholds` object — Effective runtime thresholds after environment overrides.

## Other responses

- `401` — Authentication required

---

[API](https://skmtc.net/builderz-labs/apis/mission-control-api.md) · [All operations](https://skmtc.net/builderz-labs/apis/mission-control-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/builderz-labs/mission-control-api/versions/b920835b2793/schema)
