# Razorpay Oncall Agent: From 30-Minute Investigations to 90-Second AI Analysis

DevFeed: [Razorpay Oncall Agent: From 30-Minute Investigations to 90-Second AI Analysis](<https://devfeed.tech/articles/razorpay-oncall-agent-from-30-minute-investigations-to-90-second-ai-analysis-24041.md>)

Original publisher: [Read original article](<https://engineering.razorpay.com/razorpay-oncall-agent-from-30-minute-investigations-to-90-second-ai-analysis-5be7bcc461a4?source=rss----6407ad2e59af---4>)

Author: Anuj Gupta

Published: 2026-04-29T06:56:11Z

Content type: article

Language: en

Sources: [Razorpay Engineering - Medium](<https://devfeed.tech/sources/razorpay-engineering-medium.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Langgraph](<https://devfeed.tech/topics/langgraph.md>), [incident](<https://devfeed.tech/topics/incident.md>), [SRE](<https://devfeed.tech/topics/sre.md>), [observability](<https://devfeed.tech/topics/observability.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Retrieval-Augmented Generation](<https://devfeed.tech/topics/retrieval-augmented-generation.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [incident](<https://devfeed.tech/tags/incident.md>), [langgraph](<https://devfeed.tech/tags/langgraph.md>), [logs](<https://devfeed.tech/tags/logs.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [observability](<https://devfeed.tech/tags/observability.md>), [retrieval-augmented-generation](<https://devfeed.tech/tags/retrieval-augmented-generation.md>), [sre](<https://devfeed.tech/tags/sre.md>)

## AI overview

Razorpay describes building a multi-agent AI system to automate production incident investigations. The Oncall Agent uses LangGraph, an LLM, alerting tools, and two retrieval-augmented generation systems containing architecture, dependency, and diagnostic runbook context.

## Source excerpt

Our on-call engineers were spending 30 minutes investigating every production alert. Here's what happened when we automated it. At 3 AM, alerts don't care about your sleep schedule. When our payment infrastructure threw an error last month, our on-call engineer spent 32 minutes jumping between six different monitoring systems before understanding what was broken. One tool for metrics. Another for logs. Third tool for pod health. And multiple more for infrastructure, deployment history and database health. By the time they identified the root cause (a bad deployment), payment failures had already impacted customers for nearly 40 minutes. This wasn't their fault. They followed our runbook perfectly. The problem was that no single system could tell them "here's what's wrong and why." They had to manually connect dots across disconnected observability tools. That's when we asked ourselves: what if AI could do this investigation for us? The Metric Nobody Optimizes For The SRE world talks endlessly about Mean Time to Detect (how fast you catch problems) and Mean Time to Resolve (how fast you fix them). But there's a critical phase hiding between them: Mean Time to Investigate. MTTI is the gap from "we know it's broken" to "we know what to fix." At Razorpay, this phase was consuming 20-40 minutes per incident. With 15-20 incidents weekly, that's 6-8 hours of engineering time spent doing repetitive investigative work. Worse, the quality was inconsistent. Senior engineers knew exactly which systems to check for payment alerts. Junior engineers sometimes checked irrelevant dashboards or missed critical correlations. The investigation depended entirely on who was on-call that night. What We Built (And Why It Works) Razorpay Oncall Agent is a multi-agent AI system that automates incident investigation. The architecture is built on LangGraph, a framework for creating stateful workflows with conditional logic, and uses LLM as the reasoning engine. Here's how the components work t