Skip to main content
An agent asked “why is my app returning 500s?” runs a full incident triage — checking pod health, recent Kubernetes events, error logs, and deployment rollout history — all composed across multiple 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 one execute call, but the agent decides what to check based on what it finds.

Step 1 — Pod Health Check

The agent sees a pod in CrashLoopBackOff with 12 restarts. It decides to check events and logs.

Step 2 — Recent Events

Events show OOMKilled — the container ran out of memory. The agent checks logs to confirm.

Step 3 — Error Logs

Note 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

The agent finds that the latest revision changed the image but removed memory limits — root cause identified.

Why This Matters

An SRE manually doing this would:
  1. kubectl get pods — check status
  2. kubectl describe pod — read events
  3. kubectl logs --previous — check crash logs
  4. kubectl rollout history — check what changed
That’s 4 separate commands with raw output they need to mentally parse. The agent does it in 4 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.