Skip to main content
Connect Buildkite so CloudThinker agents can measure pipeline health, find why a build failed from its logs and annotations, and check agent capacity. The connection uses a Buildkite API access token, and the scopes you grant it are the hard limit on what agents can do.

Prerequisites

  • A Buildkite account with access to the organization you want agents to monitor.
  • Permission to create an API access token for that organization.

Setup

1

Create an API access token

In Buildkite, go to Personal Settings → API Access Tokens → New API Access Token (buildkite.com/user/api-access-tokens/new) and set:
  • Description: cloudthinker
  • Organization access: the organization CloudThinker should reach
  • REST API scopes: read_organizations, read_pipelines, read_builds, read_build_logs, read_artifacts, read_agents, read_clusters, and read_user. Add write_builds only if you want agents to retry, unblock, rebuild, or cancel.
Copy the token right away. Buildkite shows it only once.
2

Add the connection

Open More → Workspace settings → Connections, stay on the Builtin Connections tab, and select Buildkite. Paste the token into BUILDKITE_API_TOKEN and click Connect.Success state: the dialog closes and the connection shows Connected.
3

Confirm the token works

Run the prompt in Verify the connection. Buildkite accepts the connection even with a bad token and only rejects it when an agent makes its first call, so a Connected status alone doesn’t prove the token is valid.

Connection details

There’s no organization slug to enter. Agents resolve it from the token. CloudThinker sends the token to Buildkite’s hosted MCP server at https://mcp.buildkite.com/direct, which passes it to the Buildkite REST API. Buildkite runs that server, not CloudThinker.

Required permissions

Leave write_builds off for a monitoring-only connection. Agents keep every read, and Buildkite itself refuses any change, so you aren’t relying on approvals alone.

Agent capabilities

A build waiting on a manual block step reports passed in the Buildkite API. Agents check for the gate, name the block step, and leave the build out of the pass rate, so a held deploy never shows up as a green pipeline. Before unblocking, the agent quotes the block step’s label and the build’s annotations so you know which gate you’re releasing. Agents can’t create or edit pipelines, clusters, queues, or schedules, and they don’t read job environment variables. Buildkite Test Engine data isn’t available through this connection. Every change an agent makes goes through your workspace’s Approvals first. On the default Auto · Rules + AI · Ask me mode, AI judgment can let a safe change run without asking — and an Allow Rule can too, once CloudThinker turns on Rule enforcement for your workspace. Choose Manual to approve every change yourself. To be asked every time, choose Manual as your Approval mode so a person approves every change. Once CloudThinker turns on Rule enforcement for your workspace, an Ask first Rule can narrow that to this connection alone.

Verify the connection

Expect each pipeline by slug with its newest build state. A 401 here means the token is invalid even though the connection shows Connected.

Example prompts

Troubleshooting

The token is invalid, expired, or revoked. Create a new API access token and update BUILDKITE_API_TOKEN on the connection.
The token is missing a read scope. Check it against Required permissions and edit the token’s scopes in Buildkite. You don’t need a new token.
The token doesn’t have write_builds. Add the scope in Buildkite, or keep the connection read-only and run the action in Buildkite yourself.
The check for a manual block step failed, usually because of a rate limit. The agent treats the build as unfinished and leaves it out of the pass rate. Unknown never means ungated. Ask again in a minute.
A pipeline name was used where Buildkite expects the slug. Ask the agent to list your pipelines and use the slug from that list.
The request covered too many pipelines or builds. Scope the question to one pipeline, or ask for fewer recent builds.

Security

  • Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
  • Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
  • Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
  • Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
  • Scope the token, not just the approval: Buildkite enforces token scopes. A token without write_builds can’t change CI state at all.
  • Treat unblock as a release: a block step is usually a deploy gate someone added on purpose. Approve an unblock only after reading the label the agent quotes.

CircleCI

Pipeline status, failure logs, flaky tests, and reruns that wait for approval.

Approvals

How CloudThinker decides which actions need a person to approve.