A pipeline agent is an ordinary CI job that calls the Ankra CLI -
ankra chat for reasoning and ankra cluster apply --wait for deploys - and posts the result to a PR or Slack. There is no framework and no orchestration layer to run: your existing CI already provides the schedule, secrets, and logs.ankra chat is one-shot and scriptable. It runs with server-side access to your cluster context - logs, events, manifests, and stack history - so a single command can answer “what will this change do?” or “why did this deploy fail?” from inside a pipeline.
Prerequisites
- A CI system (GitHub Actions, GitLab CI, or any runner).
- An API token stored as a CI secret (
ANKRA_API_TOKEN). Scope it to the least privilege the job needs with--scopes. - The Ankra CLI installed in the job (
curl -fsSL https://get.ankra.io | shor the direct download).
Pattern 1 - PR review agent
Validate cluster-definition changes against the live platform on every pull request, and comment with what will actually change - including capacity headroom.Pattern 2 - Deploy watcher
On merge, apply the change, wait for it to roll out, and post a root cause to Slack when it fails - instead of a red X with no explanation.ankra cluster apply --wait returns exit code 5 on --timeout expiry, so you can branch on a slow rollout separately from a hard failure.
Pattern 3 - Scheduled health watcher
Run every 30 minutes, stay silent while healthy, and post to Slack only when something degrades - so the channel stays signal, not noise.GitLab CI
The same patterns run unchanged in GitLab CI - userules/only for the PR trigger and a scheduled pipeline for the health watcher. See the GitLab CI/CD guide for the pipeline scaffolding.
Keep agents read-only where you can
- Review and health agents only need read scopes - pin the token with
--scopes clusters.read,stacks.read. - Only the deploy watcher needs write (
stacks.deploy). Give it a separate, narrowly scoped token. ankra chatnever mutates the cluster; all changes go throughankra cluster applyand your GitOps repo.
Related
Ankra CLI
Full command reference, including
chat and cluster apply.GitHub Actions
Build a deployment pipeline.
GitLab CI/CD
The same, on GitLab.
Webhooks & Alerts
Route platform alerts to Slack and more.