Fencing an alert agent: A2A, RBAC and an admission policy
16 November 2026
Why
- One operator and, at the start, 72 alert rules (81 today). Three of them had a procedure beside them; the rest pointed at a runbook page that explained the theory, which is not the same as a procedure at 03:00.
- The goal: every alert arrives with the first look already done, in the chat it fires into, without giving a model the power to change the cluster.
Design rule
Agents diagnose; they do not repair. Repairs stay in Git, behind a human review.
Flow
- A CronJob polls Alertmanager every 10 minutes and asks the triage agent over A2A JSON-RPC, deduplicated by alert start time. A six-hour alert went from about 72 runs and 72 messages to one.
- Poll, not webhook: no ingress, no shared secret, nothing that must be up at 03:00.
- Triage agent: 4 read-only tools (list, describe, events, pod logs).
- Diagnose agent: 2 tools (read the runbook index, create one Argo Workflow).
- The runbook index is generated from the alert rules, one row per alert. CI fails an alert that has neither an action nor a written waiver. 64 of the 81 alerts have no scripted action; for those, the answer is the runbook link.
Fences
- Tool grants: the triage agent has no write tool.
- RBAC: the submitter may create Workflows in
argo: one verb, one resource, one namespace. - ValidatingAdmissionPolicy: the kagent chart binds its tool server to a wildcard ClusterRole that its values cannot remove. Its kubectl calls over three days were
get1,034,describe326,logs116. The policy turns that measurement into a boundary: every write except a Workflow create inargois denied.
kubectl create --dry-run=server --as=system:serviceaccount:kagent:kagent-tools -f pvc.yaml # denied
kubectl create --dry-run=server --as=system:serviceaccount:kagent:kagent-tools -f wf.yaml # allowedA separate policy refuses the deletion of any PVC, PV or Namespace, by anyone.
Known failure
- First live diagnosis: the agent saw
egress-node=trueon one node and the probe pod on another, concluded the egress policy “can never match”, and proposed relabelling nodes. - Wrong: Cilium tunnels a selected pod’s traffic to the gateway node, so a pod elsewhere is the supported case.
- Countermeasure: five eval cases check that the agent reaches the known conclusion from the same symptoms.
What it bought
- Each alert now arrives with a record of what was checked, when, and by which procedure in Git.
- A new alert cannot merge without a decision: an action, or a written waiver with a reason.
- An agent that can be wrong without being dangerous, and an eval corpus that says how often it is wrong.