Buildkite · Arazzo Workflow

Buildkite Stop Disconnected Agent

Version 1.0.0

List agents, inspect one, and stop it when it is no longer connected.

1 workflow 1 source API 1 provider
View Spec View on GitHub CI/CDContinuous IntegrationContinuous DeliveryDevOpsPipelinesHybrid CIBuild AutomationTest EnginePackage RegistriesAgentsGraphQLRESTMCPWebhookArazzoWorkflows

Provider

buildkite-com

Workflows

stop-disconnected-agent
Stop an agent that is no longer connected.
Lists agents, reads the supplied agent, and stops it when its connection state is not connected.
3 steps inputs: id, org outputs: agentName, connectionState
1
listAgents
List the agents in the organization to provide context for the target agent.
2
getAgent
Read the supplied agent and capture its connection state.
3
stopAgent
Stop the agent, releasing its slot in the organization.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Buildkite Stop Disconnected Agent
  summary: List agents, inspect one, and stop it when it is no longer connected.
  description: >-
    A fleet-hygiene flow for reaping stale agents. The workflow lists the agents
    in an organization, reads the supplied agent to capture its connection state,
    and when that agent is no longer connected it issues a stop so the slot is
    released. This keeps an organization's agent inventory clean of agents that
    have lost their connection. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: agentsApi
  url: ../openapi/buildkite-com-agents-api-openapi.yml
  type: openapi
workflows:
- workflowId: stop-disconnected-agent
  summary: Stop an agent that is no longer connected.
  description: >-
    Lists agents, reads the supplied agent, and stops it when its connection
    state is not connected.
  inputs:
    type: object
    required:
    - org
    - id
    properties:
      org:
        type: string
        description: Organization slug that owns the agents.
      id:
        type: string
        description: UUID of the agent to inspect and potentially stop.
  steps:
  - stepId: listAgents
    description: >-
      List the agents in the organization to provide context for the target
      agent.
    operationId: listAgents
    parameters:
    - name: org
      in: path
      value: $inputs.org
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      agents: $response.body
  - stepId: getAgent
    description: >-
      Read the supplied agent and capture its connection state.
    operationId: getAgent
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: id
      in: path
      value: $inputs.id
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      connectionState: $response.body#/connection_state
      name: $response.body#/name
    onSuccess:
    - name: notConnected
      type: goto
      stepId: stopAgent
      criteria:
      - context: $response.body
        condition: $.connection_state != "connected"
        type: jsonpath
    onFailure:
    - name: stillConnected
      type: end
      criteria:
      - context: $response.body
        condition: $.connection_state == "connected"
        type: jsonpath
  - stepId: stopAgent
    description: >-
      Stop the agent, releasing its slot in the organization.
    operationId: stopAgent
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: id
      in: path
      value: $inputs.id
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    agentName: $steps.getAgent.outputs.name
    connectionState: $steps.getAgent.outputs.connectionState

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/buildkite-com-stop-disconnected-agent-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.