Agent webhook events

Events

Event Description
agent.connected An agent has connected to the API
agent.lost An agent has been marked as lost. This happens when Buildkite stops receiving pings from the agent
agent.disconnected An agent has disconnected. This happens when the agent shuts down and disconnects from the API
agent.stopping An agent is stopping. This happens when an agent is instructed to stop from the API. It first transitions to stopping and finishes any current jobs
agent.stopped An agent has stopped. This happens when an agent is instructed to stop from the API. It can be graceful or forceful
agent.blocked An agent has been blocked. This happens when an agent's IP address is no longer included in the agent token's allowed IP addresses

Common event data

The following properties are sent by all events.

Property Type Description
agent Agent The agent this notification relates to
sender String The user who created the webhook

Example request body:

{
  "event": "agent.connected",
  "agent": {
    "...": "..."
  },
  "sender": {
    "id": "8a7693f8-dbae-4783-9137-84090fce9045",
    "name": "Some Person"
  }
}

Agent blocked event data

The following properties are sent by the agent.blocked event.

Property Type Description
blocked_ip String The blocked request IP address
agent Agent The agent this notification relates to
cluster_token Agent token The agent token used in the registration attempt
sender String The user who created the webhook

Example request body:

{
  "event": "agent.blocked",
  "blocked_ip": "202.188.43.20",
  "agent": {
    "...": "..."
  },
  "cluster_token": {
    "...": "..."
  },
  "sender": {
    "id": "8a7693f8-dbae-4783-9137-84090fce9045",
    "name": "Some Person"
  }
}