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

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Query Buildkite pipelines and builds from Guild agents

> Connect Guild agents to Buildkite to query pipelines, builds, jobs, and CI/CD data via GraphQL, with server-side credentials and policy controls.

Integrations · Buildkite

Guild agents query Buildkite pipelines, builds, and jobs using GraphQL without handling credentials directly. Guild injects the Buildkite API access token server-side, so the token never appears in agent code. Credential policies let you restrict which operations each agent can perform before any request reaches Buildkite.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Buildkite.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Buildkite to your first agent.

## What the Buildkite integration exposes

Agents use it to retrieve data about pipelines, builds, jobs, and other CI/CD resources. Tools are named with the `buildkite_` prefix and can be narrowed with [pick()](https://docs.guild.ai/sdk/tools.md).

## How it works

**1. Open credentials settings**

In Guild, go to **Access & setup > Credentials** and click **Connect**. Search for and select **buildkite**.

**2. Paste your API key**

Enter your Buildkite API access token in the **API Key** field. Guild sends it as a bearer token in the `Authorization` header on every request.

**3. Import and use the tools**

Import `BuildkiteTools` from the `@guildai-services/guildai~buildkite` package and spread it into your agent's `tools` object. Use [pick()](https://docs.guild.ai/sdk/tools.md) to include only the tools your agent needs.

## Why Buildkite access needs governing

Buildkite API tokens can read pipeline configurations, build histories, and job details across your organization. Guild stores the token as a [credential](https://docs.guild.ai/platform/credentials.md) scoped to an account, workspace, member, or single agent, so the right token reaches the right agent without being exposed in code or logs.

Guild's credential proxy enforces [credential policies](https://docs.guild.ai/platform/credential-policies.md) before each request leaves Guild. You can write ALLOW and DENY rules scoped to specific agents or workspaces, limiting which GraphQL operations each agent may send. The proxy injects the token only after the policy check passes, so agents cannot bypass the rules.

## About the Buildkite integration

This integration lets agents interact with Buildkite using GraphQL queries. Agents can retrieve information about pipelines, builds, jobs, and other CI/CD resources. All requests are authenticated with a Buildkite API access token. The integration is `guildai~buildkite`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as a bearer token in the `Authorization` header

### Setup

**1. Connect Buildkite**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **buildkite**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { BuildkiteTools } from "@guildai-services/guildai~buildkite"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with Buildkite.",
  tools: { ...BuildkiteTools },
})
```

### Selecting specific tools

Tools are named with the `buildkite_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~buildkite`:

| Tool | What it does |
| - | - |
| `buildkite_graphql_query` | Send one GraphQL document. |

## Frequently asked questions

> [accordion] Can I limit which Buildkite operations a specific agent can run?
>
> Yes. [Credential policies](https://docs.guild.ai/platform/credential-policies.md) let you write ALLOW and DENY rules scoped to individual agents or workspaces. Guild's credential proxy evaluates the rules before any request reaches Buildkite.

> [accordion] Does my agent code ever see the Buildkite API token?
>
> No. Guild stores the token and adds it server-side as a bearer token in the Authorization header. Agent code calls the tool; the credential proxy handles authentication.

> [accordion] Can I use different Buildkite tokens in different workspaces?
>
> Yes. You can connect a credential scoped to a single workspace so that workspace uses a different token from the rest of the organization. See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped options.

> [accordion] Does the Buildkite integration support webhook events?
>
> Not yet. The catalog entry for this integration lists no webhook events, so agents cannot react to Buildkite push notifications through Guild at this time.

## Put a governed agent on Buildkite this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Buildkite.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Buildkite to your first agent.

## Related

**Also runs on Guild:** [Azure DevOps](https://docs.guild.ai/integrations/azure-devops.md) · [Bitbucket](https://docs.guild.ai/integrations/bitbucket.md) · [Convex](https://docs.guild.ai/integrations/convex.md) · [Cursor](https://docs.guild.ai/integrations/cursor-cloud-agents.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
