---
title: "Get self diagnostics for an agent"
method: GET
path: "/api/agents/{id}/diagnostics"
tags: ["Agents"]
---

# Get self diagnostics for an agent

`GET /api/agents/{id}/diagnostics`

Self-scoped diagnostics by default. Cross-agent access requires `privileged=1` with admin credentials. Trend alerts are informational signals derived from current-vs-previous window deltas (error spikes, throughput drops, activity stalls).

## Path parameters

- `id` string, required

## Query parameters

- `hours` integer
- `section` string
- `privileged` '1'

## Response `200`

Diagnostics payload

- object
  - `agent` object
    - `id` integer
    - `name` string
    - `role` string
    - `status` string
  - `timeframe` object
    - `hours` integer
    - `since` integer
    - `until` integer
  - `summary` object
  - `tasks` object
  - `errors` object
  - `activity` object
  - `trends` object
    - `current_period` object
    - `previous_period` object
    - `change` object
    - `alerts` object[]
      - `level` 'info' | 'warning'
      - `message` string
  - `tokens` object

## Other responses

- `400` — Invalid request
- `401` — Authentication required
- `403` — Insufficient permissions
- `404` — Resource not found

---

[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/revisions/b920835b2793/schema)
