<!-- canonical: https://buildkite.com/platform/agentic-workflows/ -->

# Agentic Workflows

## Build AI agents into your CI pipeline

> Build agentic CI workflows on Buildkite from four composable primitives. Connect any AI model, automate fixes and PRs, and govern 100,000+ concurrent CI agents.

Build agentic CI workflows on Buildkite from four composable primitives. Connect any AI model, automate fixes and PRs, and govern 100,000+ concurrent CI agents.

## Summary

Buildkite gives you composable building blocks for agentic workflows in your CI pipeline. Each one is a governed step that scopes, logs, and reverts any agent action on command. Wayfair used the Buildkite MCP Server, one of these blocks, to [cut its build-fix time from 30 minutes to under 5](https://cloud.google.com/customers/wayfair-developer) and save a projected 31,000+ engineering hours a year.

- Build agent workflows with four composable primitives: the [Buildkite MCP Server](https://buildkite.com/docs/apis/mcp-server), [Model Providers](https://buildkite.com/docs/apis/model-providers), [Pipeline Triggers](https://buildkite.com/docs/apis/webhooks/incoming/pipeline-triggers), and [Preflight](https://buildkite.com/docs/platform/cli/preflight) (experimental).
- Connect any AI model and give it scoped, low-token access to pipelines, test results, and logs.
- Automatically record every action, for a full audit trail.
- Govern at production scale, across [100,000+ concurrent CI agents](https://buildkite.com/solutions/testing-at-scale) (confirmed June 24, 2026).

## Why can’t traditional CI pipelines keep up with AI agents?

Traditional CI pipelines struggle to keep up with AI agents because they weren’t built to govern autonomous agents at scale. [90% of surveyed technology professionals report using AI at work](https://cloud.google.com/blog/products/ai-machine-learning/announcing-the-2025-dora-report), and most of that work now runs through CI, where agents act on their own across thousands of builds.

> "AI accelerates software development, but that acceleration can expose weaknesses downstream. Without robust control systems, like strong automated testing, mature version control practices, and fast feedback loops, an increase in change volume leads to instability."

Citation: [2025 DORA Report: state of AI-assisted software development](https://cloud.google.com/blog/products/ai-machine-learning/announcing-the-2025-dora-report)

## Buildkite’s agentic workflow building blocks

You can build any agentic workflow on Buildkite from four composable primitives. Combine them to automate a single build fix or orchestrate a full multi-agent pipeline. Each runs as a governed pipeline step, with scoped permissions and audited access.

### Buildkite MCP Server

The [Buildkite MCP Server](https://buildkite.com/docs/apis/mcp-server) connects to any AI model and gives it precise, scoped access. Spend less time in the logs, burn fewer tokens, get a record of every action, and run faster.

- **Choose your setup** — Run the server remotely or locally, whichever works best for your team.
- **Make every token count** — Convert and cache logs so agents only see what matters and work faster.
- **Track performance metrics** — Catch bottlenecks early and keep delivery moving with real-time and historical data.

### Model Providers

[Model Providers](https://buildkite.com/docs/apis/model-providers) give your pipelines direct access to the LLMs you already use, so builds react and adapt to failures the moment they happen.

- **Skip the manual setup** — Instantly connect to LLMs, with credentials set automatically, and only pay for what you use.
- **Use your own key** — Enter your API key once. No more credentials buried in YAML.

### Pipeline Triggers

[Pipeline Triggers](https://buildkite.com/docs/apis/webhooks/incoming/pipeline-triggers) start a pipeline from anywhere: an API call, webhook, schedule, or custom integration. Platform teams have full control over how and when workflows run.

- **Trigger builds from anywhere** — Launch builds from any tool, system, or AI agent. No workarounds.
- **Go beyond Git commits** — Automate builds and respond to events in real-time, from webhooks to status changes.
- **Control who runs what** — Restrict each pipeline to authorized sources only.

### Preflight

_Experimental feature — its behavior may change._

[Preflight](https://buildkite.com/docs/platform/cli/preflight) catches build failures the moment they happen. Agents instantly receive structured signals to act on, fix, and re-run.

- **Fail fast, fix faster** — Stop a run the instant a test fails, so an agent fixes one test instead of waiting for the full build.
- **Run tests that matter first** — Reuse caches and prioritize relevant tests for quicker results.
- **Give agents clear next steps** — Get structured results before you commit. Automatically capture changes in a temporary branch that's cleaned up after.

## Agentic CI at scale on Buildkite

The agentic workflows you build on Buildkite run unchanged from a single CI agent to [100,000+ running concurrently](https://buildkite.com/solutions/testing-at-scale), all under the same primitives and controls, whether you run builds on your own compute, Buildkite-hosted, or both.

## How Wayfair cut CI build-fix time from 30 minutes to under 5 on Buildkite

Wayfair cut CI build-fix time from 30 minutes to under 5 on Buildkite by building a GenAI system on the Buildkite MCP Server to cut manual triage, surfacing failures and fixes directly in Slack and the IDE. Running across 25,000+ daily builds, it patches issues inline through tools like Cursor and won the [2025 Google Cloud DORA Award for Embracing AI](https://dora.dev/awards/).

- **58%** — lower mean time to recovery (MTTR)
- **12,000+** — build retries avoided monthly
- **31,000+** — engineering hours/year saved (projected)
- **4.8 → 8.2** — developer NPS score

> "Wayfair learned that the biggest gains came not just from detecting failures faster, but from reducing the effort required to fix them. Embedding AI into the CI/CD loop showed that developers respond best to targeted, explainable suggestions delivered directly in the tools they already use." — Pushkar Sharan, Associate Director, Software Engineering

— [Google Cloud: Wayfair case study](https://cloud.google.com/customers/wayfair-developer)

Full story: [Buildkite webinar with Pushkar Sharan](https://buildkite.com/resources/webinars/how-wayfairs-ai-solution-transformed-developer-feedback-loops/)

## Create agentic workflows with Buildkite and Claude Code

Pair a coding agent with Buildkite’s composable primitives, and pipelines pick up the busywork on their own. No more manual triage, no more idle PRs.

- **Code review bot** — Trigger a code review seconds after you open a PR.
- **Linear issue handler** — Label routine issues and a working PR follows, no queue required.
- **PR build fixer** — Skip the log dive and get a patched PR the moment a build fails, ready for review.

[Explore repos →](https://github.com/buildkite-agentic-examples)

Watch the demo: [Bootstrapping a New Pipeline with the Buildkite MCP Server](https://www.youtube-nocookie.com/embed/GUIK4AdcKM0) — Demo of bootstrapping a new CI pipeline with the Buildkite MCP Server: an AI agent uses MCP tools like create_pipeline to set up and run a working Buildkite pipeline.

## Keep reading

- [What's new in the Buildkite MCP Server →](https://buildkite.com/resources/blog/whats-new-in-the-buildkite-mcp-server/)
- [What AI is teaching us about CI →](https://buildkite.com/resources/blog/what-ai-is-teaching-us-about-ci/)
- [Agentic CI: three practical examples →](https://buildkite.com/resources/blog/building-ai-powered-ci-workflows-three-practical-examples/)

## Frequently asked questions

### What is an agentic workflow in CI?

A CI pipeline is agentic when an AI agent reads logs, fixes builds, or starts a new one on its own, instead of running the same scripted steps. It adapts to what happens during the build in real time. Buildkite runs agentic workflows at the same scale and control as regular CI, so more AI activity doesn't mean more mess.

### Is Buildkite’s MCP server open source?

Yes, it’s on [GitHub](https://github.com/buildkite/buildkite-mcp-server). Contributions welcome :)

### Should I run Buildkite’s MCP server remotely or locally?

Either works. Depends on your latency, security, and infra needs.

- **Remotely:** Best for shared teams or enterprise setups. It’s hosted with no local install needed.
- **Locally:** Best if it’s just for you, using your own credentials, on your own machine.

### How does Buildkite’s MCP server reduce token usage and context inflation?

Most MCP tools hand agents raw API payloads. With build logs, this gets pricy fast. Buildkite’s MCP server converts logs to Apache Parquet format and caches them on demand, so agents run targeted queries and only pull what’s relevant. [Learn more](https://buildkite.com/docs/apis/mcp-server).

### Does Buildkite’s MCP server work with Context7?

Not directly, but [Buildkite documentation is available in Markdown](https://context7.com/websites/buildkite) and kept current there. You’d install and configure Context7’s MCP server separately.
