execute calls, reasoning about each result before deciding what to check next.
The Triage Flow
This isn’t a single code block — it’s how the agent thinks. Each step is oneexecute call, but the agent decides what to check based on what it finds.
Step 1 — Pod Health Check
CrashLoopBackOff with 12 restarts. It decides to check events and logs.
Step 2 — Recent Events
OOMKilled — the container ran out of memory. The agent checks logs to confirm.
Step 3 — Error Logs
previous: "true" — the agent fetches logs from the crashed container, not the restarting one. It finds memory allocation failures in the last 20 error lines.
Step 4 — Deployment Rollout History
Why This Matters
An SRE manually doing this would:kubectl get pods— check statuskubectl describe pod— read eventskubectl logs --previous— check crash logskubectl rollout history— check what changed
execute calls, but each one filters and extracts only what’s relevant. The LLM reasons about structured findings, not walls of YAML.
More importantly, the agent adapts. It doesn’t run a fixed checklist — it sees OOMKilled and decides to check previous container logs and deployment history. A traditional MCP tool would need a pre-built “debug pod” tool that tries to anticipate every scenario.