Run a coding agent in your own CI
Let "Implement with agent" start your own coding agent in GitHub Actions, GitLab CI or Azure Pipelines, with your own AI key.
In short
Connect your CI once as an agent pipeline. On an approved Change, "Implement with agent" then starts your own workflow with the Change's brief; a coding agent writes the code with your AI key, and the workflow opens a pull request. {{brand}} follows the run and the pull request on the Change, and approves nothing.
Before you start
- Who: someone who may manage the organization's connections - owners and admins have it by default.
- Plan: agent runs come with Business and Enterprise, and the 14-day trial has them.
- First: copy the agent template from the {{brand}} CI templates into the repository - kamocore-change-agent.yml for GitHub Actions or Azure Pipelines, kamocore-change-agent.gitlab-ci.yml for GitLab - and add your AI key as its secret.
- The repository's git connection with its webhook, so the pull request reaches {{brand}}.
Give the start-only token
- GitHub Actions: make a fine-grained token for this repository alone with Actions (read and write) and Metadata (read) - nothing else. "Open the token page" fills these in.
- GitLab CI: in the project, Settings › CI/CD › "Pipeline trigger tokens", add one. Choose the GitLab connection that follows the pipeline.
- Azure Pipelines: make a personal access token with only Build (Read & execute), and give the pipeline's id.
- Paste the token, the repository and the workflow, and press "Check this step". A token that can reach your code is refused.
Check and use
- Press "Run the full check" and "Finish". The pipeline shows under "Agent pipelines".
- In a design, open an approved Change, make its card with "Implement", then choose "Run in your CI". The Change shows the run: started, running, the pull request, its checks, merged.
If a step fails
- "Read-only rights" failed: the token reaches more than starting the workflow. Make one with only the rights above.
- "Find the workflow" failed: the workflow file or pipeline id is not on the default branch, or cannot be started by hand.
- A run that stops at once: open it in your CI - the agent, its key or the push token is usually what to fix.
Good to know
- {{brand}} never holds a token that can write your repository, and pays nothing per run: the agent uses your AI key and your runners.
- The pull request goes through your normal review. The Change becomes Done when it merges and Verified only when the merged code is read back and matches.
- The brief is passed to your workflow as an input, so people who may read the repository's CI runs can read it.
- Ask AI on the design can tell you where a Change's agent run stands.
Related
- /help/settings/connect-github
- /help/settings/fix-a-company-connection