October 20, 2026 · 6 min read
What is an AI CI agent?
An AI CI agent reads a red build, edits the repo, and opens a draft PR only after your own tests pass.
An AI CI agent is a tool that runs where your continuous integration already runs. It reads a failed build, edits the repository, and stops only when your own verify command exits 0. If that command stays red, the run is not done. code-agent is a verify-gated CI agent built around that rule: failed build, fix in the repo, the same tests CI already uses, then a draft pull request for a person to review.
A chat window that suggests a patch is a different product. An AI CI agent is tied to the pipeline that already decides whether the branch is green.
What an AI CI agent does on a red build
Failed CI repair is a loop, not a single reply.
- Read the failure. The log, the test name, and the files that command touches are the input. A confident summary of "this might be the bug" is not.
- Edit the repo. The agent changes source, tests, or config that the failure actually points at.
- Run your verify command. That is usually the same command the pipeline already trusts:
pytest -q,go test ./...,npm test, or a narrower check you pass in on purpose. - Judge the exit code.
0means this attempt is verified. Anything else means retry with a narrower change, or stop and report that the run could not verify. - Open a draft pull request only after that gate. A human still merges.
The short form on a laptop looks like this:
code-agent run "fix failing tests" --verify-cmd "pytest -q" -w /path/to/your/project
verify_cmd is the ground truth. The model can propose the next edit. It does not get to declare the build green.
How an AI CI agent differs from a chat coding assistant
A coding assistant lives in the editor. You paste an error, it drafts a diff, and you decide whether to apply it. That is useful for exploration. It is a weak fit for a red main at 11pm, because nothing in that chat is required to run the command your pipeline runs.
An AI CI agent is built for that second job:
- It runs on your runner or laptop, next to the checkout CI already has.
- It uses your LLM key. KramLipi does not need a copy of the repository to do the repair.
- It is gated by the same command the pipeline already uses, so "looks fixed" and "CI would pass" are not the same claim.
- The artifact you review is a draft pull request or a local diff, not a chat transcript.
If the model is wrong, the verify command says so and the draft does not go out on a false green. We wrote up that rule in why we don't trust the model to grade its own homework.
What "done" means for a verify-gated CI agent
Verify-gated means one thing: success is a subprocess exit code.
Plan → edit files → run verify_cmd → exit code → retry or draft PR
A few consequences follow from that, and they are the difference between a demo and a tool you can leave on a branch:
- A task that never ran the command is not finished.
- A malformed or unclear verifier result fails closed. The run does not guess "probably fine."
- Publishing is withheld until the command exits
0.code-agent experts run bug-fix --verify-cmd "pytest -q" --publishdoes not open a pull request on a red result. - The agent does not edit
.github/workflows/**to make the gate easier. A green board that came from weakening CI is not a repair.
That last point is easy to skip in a product comparison and expensive in production. An agent that can rewrite the workflow can certify itself. A verify-gated CI agent refuses that path so the command you already trust stays the command that runs.
What stays with people
CI repair and design review are different jobs.
An AI CI agent is for the first: a known red command, a bounded edit, a draft you can reject. It is not a substitute for the question "should we ship this?" Architecture, product trade-offs, and whether the test is even the right test stay with the people who own the system.
Human review still burns time on the cheap catches — naming, nits, comments that never needed a senior engineer. That cost is real, and we wrote about it in the real cost of manual code review. First-pass line comments on a pull request are a separate expert (code-review) from failed-build repair. Both leave the judgment calls with your team. Neither one is there to replace the person who approves the merge.
Where a customer-hosted agent runs
Customer-hosted means the process runs in your environment. Source stays on the machine or runner you already use. You bring the model key. There is no step that uploads the monorepo to KramLipi for the repair to happen.
Three places cover most teams:
- Laptop binary. Fastest way to see a red test go through the loop before you touch CI.
- GitHub Action. A step in the workflow you already have, on your runner, with your key.
- Docker. The same binary for GitLab CI, CircleCI, Jenkins, or any other system that can run a container.
Setup for each path is in install code-agent in 5 minutes. The product page has the same install block, pricing, and the guardrails around the loop: code-agent.
FAQ
Does an AI CI agent edit workflow files?
code-agent does not edit .github/workflows/**. The verify command has to stay the one your pipeline already runs. Changing the workflow to force a green result is out of bounds.
Does KramLipi host the repository?
No. The agent runs on your laptop or on your CI runner. You supply the LLM key. We do not take a copy of the repo in order to open the draft.
When does it open a pull request?
After verify_cmd exits 0, and only if you asked it to publish. A failed or ambiguous verify ends as a failed run, not as a draft that claims the build is fixed.
If you want the shortest path from a red command to that loop, start with the binary on a repo you already trust, point --verify-cmd at the test CI runs, and read the draft before anyone merges it.
Ready to stop babysitting CI by hand?
Get the binary — free