> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keebai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/agents/{id}/tests/summary

> How the active tests of an agent are doing, by verdict.

Counts the active tests of an agent by the verdict of their latest run, says when the last run finished and which run is in progress, if any.

## Endpoint

```
GET https://api.keebai.com/v1/agents/{id}/tests/summary
```

## Required scope

`agents:read`

## Path parameters

| Parameter | Type | Description |
| - | - | - |
| `id` | `string` | `ObjectId` of the agent. |

## Example request

```bash curl theme={"system"}
curl -X GET https://api.keebai.com/v1/agents/6650a1b2c3d4e5f6a7b8c9d0/tests/summary \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

## Response

### 200 OK

```json theme={"system"}
{
  "total": 5,
  "counts": {
    "passing": 3,
    "flaky": 1,
    "failing": 0,
    "error": 0,
    "new": 1
  },
  "last_run_at": "2026-11-11T14:20:41.002000",
  "running_run_id": null
}
```

| Field | Description |
| - | - |
| `counts.new` | Active tests that never ran. |
| `running_run_id` | The run that is `queued` or `running`. While it is set, a new run fails with `run_in_progress`. |

### 404 Not Found

`AGENT_NOT_FOUND` when the agent belongs to another project of the company, `UPSTREAM_ERROR` (message `AGENT_NOT_FOUND`) when no agent has that id in the company.

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `agents:read` scope.

### 502 Bad Gateway

The agent service is unreachable.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.