---
title: "Workspace agent operations — active/idle agents, run-failure rate, PR-merge rate (the agent-ops differentiator)"
method: GET
path: "/api/workspaces/{workspaceId}/insights/agent-ops"
tags: ["Insights"]
---

# Workspace agent operations — active/idle agents, run-failure rate, PR-merge rate (the agent-ops differentiator)

`GET /api/workspaces/{workspaceId}/insights/agent-ops`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/workspaces/{workspaceId}/insights/agent-ops`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `hiveship_access`
  - HTTP bearer

## Path parameters

- `workspaceId` string, required

## Query parameters

- `from` string
- `to` string
- `projectIds` string
- `priorities` string
- `assigneeIds` string
- `labelIds` string

## Response `200`

Snapshot agent counts + windowed session-failure and PR-merge raw counts (the UI computes the rates)

- object
  - `success` boolean, required
  - `data` object, required
    - `totalAgentCount` integer, required
    - `activeAgentCount` integer, required
    - `erroredSessionCount` integer, required
    - `completedSessionCount` integer, required
    - `mergedPrCount` integer, required
    - `totalPrCount` integer, required
    - `windowStart` string, required
    - `windowEnd` string, required
    - `emptyReason` 'no_agents', nullable, required

## Other responses

- `403`: Plan does not include insights, or caller lacks OWNER/ADMIN role (PLAT-105)

---

[API](https://skmtc.dev/hiveship/apis/hiveship-api.md) · [All operations](https://skmtc.dev/hiveship/apis/hiveship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hiveship/apis/hiveship-api/revisions/73d3e26544e4?raw)
