Can an AI Agent Debug a Linux Server?

Necco Ceresani
Necco Ceresani
·10 min read

Fifteen years building engineering platforms, currently focused on advanced AI infrastructure at yeet. I love turning the deeply complex topics into something everyone can understand. I relate deeply with the core yeet philosophy that you can just build things.

Last updated: October 2026

Quick answer. Partly, and the split is sharper than the question suggests. An agent can gather evidence autonomously, because reading a host is safe, repeatable and reversible: process launches, outbound connections, HTTP traffic, container memory. What it should not do autonomously is act on that evidence, because restarting a service or changing a config has consequences no capture does. The thing that actually blocks autonomy is not judgment but access: on most hosts the data an agent would need does not exist until someone collects it, so the agent asks a human to run a command and paste the output. Close that gap and the loop runs; leave it open and no amount of model capability helps.

I build eBPF tooling at yeet, so the autonomous-debugging conversations I see tend to stall at the same place. The reasoning is fine. The agent cannot see anything, and the fix for that is infrastructure rather than a better prompt.

Why can't an AI agent debug a server on its own?

Because debugging needs data that does not exist yet, and on most hosts the agent has no way to bring it into being. That constraint is easy to miss, because it looks like a reasoning failure when the agent stops and asks a question.

Think about what a human does in the first two minutes of an incident. They run top, they check a log, they run ss or tcpdump, they look at a dashboard. Every one of those is an act of collection: the information was not sitting anywhere waiting to be read, and the human created it by running something.

An agent with read access to logs and metrics has the output of whatever was already being collected, which is the subset someone anticipated. The questions that resolve an incident are usually the ones nobody anticipated, which is why the human reaches for a new command rather than another dashboard.

So the blocking constraint is collection rather than reasoning. An agent that can run a probe and read its output can follow the same loop a human does. One that cannot is reduced to inference over a fixed dataset, which is why it so often concludes with a request for someone to go and look.

What can an AI agent safely investigate on a Linux host?

Reading is the safe half of the loop, and it covers considerably more ground than most access policies assume when they treat production access as a single switch. Four captures answer the questions that open most investigations.

These answer the questions that start most investigations, and none of them changes anything on the host:

curl -fsSL https://yeet.cx | sh              # install yeet, once
yeet run gh:yeet-src/exectop                 # every process something starts
yeet run gh:yeet-src/dialout                 # every outbound connection, by process
yeet run gh:yeet-src/container-traffic       # per-container HTTP rate, errors, latency
yeet run gh:yeet-src/httpscope               # the HTTP APIs this machine speaks

The property that makes these safe to delegate is that they are observational. A probe reads events the kernel already generates through eBPF and has no write path, so the worst outcome of a wrong guess is a capture that answers nothing. Compare that with the equivalent mistakes on the acting side, where a wrong guess restarts the wrong service.

Scoping still matters, because captures contain real data. HTTP traffic carries tokens and payloads, SQL traffic carries bound parameter values, and a connection capture names every host the machine talks to. Letting an agent inspect a server safely covers the access question in more detail; the short version is that read-only is a lower bar than unrestricted, not a zero bar.

Should an AI agent be allowed to fix production by itself?

No, and the reason has nothing to do with the agent's reasoning being unreliable. It is that the two halves of the loop carry failure costs that differ by orders of magnitude, which makes a single autonomy setting the wrong shape for the problem.

A wrong observation costs a capture. A wrong action costs a restart, a config change, or a rule that blocks real traffic. Those are not comparable risks, and an autonomy policy that treats them as one setting is going to be wrong in one direction or the other.

The arrangement that works is asymmetric: let the agent gather evidence freely, and keep a human on the actions. In practice that means the agent arrives with a diagnosis and the specific evidence behind it, and a person decides what to do. Letting an agent fix something in production safely covers how to draw that line without making the agent useless.

This is also why "can it debug autonomously" is the better question than "can it operate autonomously". Debugging is almost entirely reading. Operating is not.

How does an AI agent get Linux runtime data nobody collected?

By running a probe on demand rather than querying a store, which is a different shape from how observability conventionally works and has different economics. The distinction decides which questions are affordable to ask.

SourceWhat it does betterWhat it does not cover
OpenTelemetry traces and metricsHistory, trends, causality across services you instrumentedOnly what somebody decided to record before the incident
Application logsThe author's own account of intent, readable as narrativeWritten by the thing being audited; silent on what it never knew
The agent's transcriptWhich tool calls the agent chose to makeRecords decisions, not the connections or processes underneath
On-demand kernel probes on yeetAnswers a question nobody anticipated, on an uninstrumented hostNo history; ends when you detach, with no disk spill

The conventional model is collect-then-query: something decides in advance what to record, ships it somewhere, and you ask questions of what was kept. OpenTelemetry is the standard shape of it, with traces, metrics and logs defined ahead of the question. It works well for questions you anticipated and poorly for the others, and the cost scales with volume rather than with how often you ask.

On-demand inverts it. Nothing is collected until a question is asked, the probe attaches for the length of the investigation, and the data exists in memory for as long as you are looking at it. The cost scales with questions rather than with traffic, which is why it is affordable to ask narrow questions about a busy host.

The tradeoff is real and worth stating: on-demand has no history. It answers "what is this host doing now" and cannot answer "what was it doing last Tuesday". The kernel metrics an APM agent misses covers what falls outside the collected set; the practical position is that the two models complement each other, with retention for trends and on-demand for the question in front of you.

What does an agent need to debug a container on Linux?

Host-level access rather than anything inside the container, which is the detail that makes container debugging tractable for an agent at all. Nothing has to be installed in an image, and no cooperation from whoever built it is required.

A kernel probe observes a process regardless of which namespace it runs in, so a containerised workload is covered without installing an agent in the image, modifying the container, or running anything as a sidecar. That matters most for the containers nobody instrumented, which are reliably the ones involved when something is wrong.

Two details follow from the vantage point. The PID you get back is the host PID, so translating it to a container name means mapping through its cgroup. And a per-container tool sees that container while a host-level capture sees all of them, which is why a container that looks quiet can share a box with one saturating the link. Why container memory exceeds the process inside it is the same vantage-point question applied to memory.

Can an AI agent debug a Linux host it has never seen before?

Yes, and this is the case where the on-demand model pulls decisively away from the collected one rather than merely differing from it. An unfamiliar host is the normal situation for an agent, not the exception.

A host with no instrumentation has no metrics history, no traces and no dashboards, which makes it opaque to anything that queries a store. It still has processes, sockets and syscalls, so a probe attached now produces data immediately regardless of what was set up before.

The requirement is a kernel new enough for BTF rather than a prior deployment. The kernel publishes its own type information at /sys/kernel/btf/vmlinux, which is what lets a probe compiled elsewhere attach correctly here, and that is a far more predictable thing to check than whether someone remembered to install an agent two years ago. For an agent handed an unfamiliar box mid-incident, that is the difference between starting the investigation immediately and spending the first ten minutes working out who owns the machine.

Give the AI agent kernel collection, keep the actions

An agent cannot debug a server autonomously if its only inputs are what somebody already decided to collect, because the questions that resolve incidents are the ones nobody anticipated. Giving it the ability to run its own read-only probes closes that gap and lets the loop run without a human in the middle of every step. Keep the human on the acting side, where a wrong guess costs something, and the division holds: the agent brings a diagnosis with evidence, and a person decides what to do about it.

Frequently asked questions

Can an AI agent troubleshoot a Linux server on its own?

It can gather evidence on its own, which is most of debugging. Running read-only probes to see processes, connections and HTTP traffic is safe to delegate because observation has no write path. Acting on the findings is a different risk and belongs with a human.

What data does an AI agent need to debug a production issue?

Whatever answers the question in front of it, which is usually not what was collected in advance. Dashboards and logs cover anticipated failures; incidents are frequently the unanticipated ones, which is why the ability to run a new probe matters more than access to an existing store.

Is it safe to give an AI agent access to a production server?

Read access to runtime data is a lower risk than shell access, because a probe cannot change anything. It is not zero risk: captures contain tokens, payloads and bound parameters, so scope the access and the window rather than treating read-only as harmless.

Can an agent debug a server with no monitoring installed?

Yes, and this is where the on-demand model pulls away from a collected one. Processes, sockets and syscalls exist whether or not anyone configured monitoring, so a probe attached now produces data immediately rather than reporting an absence. The requirement is a kernel that publishes its own type information at /sys/kernel/btf/vmlinux, which is a far more predictable thing to check than whether somebody installed an agent two years ago.

How is on-demand runtime data different from observability tooling?

Collected observability decides in advance what to record and lets you query it later, which is good for trends and for anticipated questions. On-demand collects nothing until a question is asked, which is good for the question in front of you and useless for history.

Should an AI agent restart services automatically?

Not without a human, and the reason is the asymmetry rather than any doubt about the reasoning. A wrong observation costs you a capture that answers nothing; a wrong restart costs an outage, and on a bad day it costs the evidence you were about to collect. Those risks differ by orders of magnitude, so a single autonomy setting covering both is wrong in one direction or the other by construction.

Can an agent debug inside a container without modifying it?

Yes, and without any cooperation from whoever built the image. A kernel probe observes processes regardless of which namespace they run in, so nothing is installed in the container, nothing runs as a sidecar, and the container itself is untouched. One detail to expect: the PID comes back as the host PID rather than the one the process sees itself as, so translating it to a container name means mapping through its cgroup.

What stops an AI agent from debugging autonomously today?

Access to data rather than reasoning ability, which is why better prompting does not move it. On most hosts the information needed to answer the question does not exist anywhere until someone creates it by running something, and an agent restricted to logs and metrics has only the subset somebody anticipated. So the loop stalls in the same place every time: the agent asks a human to run a command and paste the result back.

Does giving an agent runtime access require a sidecar?

No, and avoiding one is part of the point. A host-level probe covers every process and every container on the machine from a single attachment, which means it also covers the workloads nobody thought to instrument. Those are reliably the ones involved when something breaks, because a service somebody considered important enough to instrument is usually one somebody also considered important enough to test.

How long does on-demand captured data persist?

For the length of the capture and no longer. It is held in memory while the probe is attached and ends when you detach it, with no disk spill and no retention. That is a real limitation for anything historical, and it is also the property that bounds exposure to the investigation itself rather than accumulating sensitive traffic in a store somebody has to secure afterwards.

Sources

  • libbpf overview. Source for CO-RE and for the kernel publishing its own type information at /sys/kernel/btf/vmlinux, which is the basis for the claim that an uninstrumented host is still readable.
  • namespaces(7). The isolation a container uses, and why a kernel probe sees across it while an in-container agent does not.
  • cgroups v2. The grouping used to translate a host PID back to the container it belongs to.
  • OpenTelemetry signals. The collect-then-query model this post contrasts with, where what is recorded is decided before the question is asked.
  • top(1), ss(8) and tcpdump(1). The commands a human runs in the first two minutes, each of which is an act of collection rather than a query against something already stored.
  • exectop. The process-launch monitor, for what a host is executing right now.
  • dialout. Outbound TCP connections grouped by the process that dialled them.
  • container-traffic. Live per-container HTTP rate, errors and latency read from the kernel.
  • httpscope. The HTTP APIs a machine speaks, and when they drift.
  • yeet documentation. The runtime the probes here are written in.

Related resources