Is there a way to know how many agents are connected?

Hi, using latest drone 0.8
I’d like to know how many agents are connected, is that possible?

It is possible to see the number of workers actively polling the queue:

/api/info/queue

The data looks like this:

{
    "pending": null,
    "running": null,
    "stats": {
        "worker_count": 12,
        "pending_count": 0,
        "running_count": 0,
        "completed_count": 0
    }
}

I have 6 agents with 2x concurrency (6 x 2 = 12). Note that once a worker receives a build from the queue, the running_count increments and the worker_count decrements, like this:

{
    "pending": null,
    "running": null,
    "stats": {
-       "worker_count": 12,
+       "worker_count": 11,
        "pending_count": 0,
-       "running_count": 0,
+       "running_count": 1,
        "completed_count": 0
    }
}

As always Brad - Thanks for the fast reply!
It has been very helpful!
I’d add it to the docs, it’s a relatively common thing to ask and check for.