Case study
AI agent for on-call alert triage
Software Engineer, Mercado Libre. I built the agent.
- response time per alert
- ~30 → ~5 min
- alerts a week
- 10–20
Stack
The problem
On-call alerts came from a known set of errors with an external provider. They arrived at 10–20 a week, usually in bursts of 3 or 4.
Each one was investigated by hand. An engineer found the function where it fired, identified the user, queried their data and, when possible, fixed their situation.
What I built
I set up an AI agent in an internal n8n-style automation tool. The Slack integration, where the alerts landed, triggered it.
The agent started from the data of the request that raised the alert. I connected it to:
- New Relic and Grafana
- the code repository
- internal user-information endpoints
Knowing why an alert fired
I gave the agent a knowledge base of the provider’s known errors. With it, the agent could diagnose why each alert happened, not just collect data about it.
Letting it apply the fix
Over time, together with the team, we decided to let the agent apply the fix itself: void the user’s available invoice-numbering range and generate a new one.
Running that fix more than needed has no effect, so the agent could not over-act. Engineers moved to only validating its work.
Where the model decides, and where it doesn’t
A language model is probabilistic, so I kept its judgment to the part that needed it. Investigating an alert varied a lot, even when the cause was one of a few known errors. Gathering that evidence is where the agent earned its place.
The diagnosis was tied to explicit business rules: for each known error, the data and evidence that identify it, and how it is fixed. The agent had to match what it found against those rules instead of reasoning freely.
The action left no room to improvise: one fixed, repeat-safe fix, validated by an engineer.
What I’d do next: move that rule matching out of the agent’s instructions and into code, so the same evidence always gives the same diagnosis. The model would still gather the evidence; the rules would make the call.
Result
Response time per alert went from about 30 minutes to about 5. The response time was logged for each alert.
The hard part wasn’t the model. It was connecting it to real systems and getting it to the point where the team trusted it to act.