🎓 Alerts Agent on the DeepStructure Platform

Andrew Gaul
on May 8, 2025
Technical content rating: 🎓 basic coding literacy assumed
DeepStructure developed an application to address our internal IT oncall needs using our TypeScript-native AI platform. In this post I will show how we combined MCP, Agents, and Slack (MÁS stack) to solve a real-world problem. While this is a specific demonstration, the DeepStructure platform allows external developers to mix-and-match MCP servers, different models, and a variety of frontends to create their own agent workflows.
#alerts use case
We set up Grafana to monitor our internal infrastructure and configured its Slack integration to deliver alerts to our #alerts channel. Unexpected events can happen at any time but the person with the most relevant expertise may not be available, e.g., not on-call. To address this many companies create a static runbook with instructions on what humans should do. Instead we built an AI agent that combines a static runbook with the dynamic state of the system. The AlertsBot automatically synthesizes recommendations, helping our engineers quickly understand what is happening and make more informed decisions on mitigations and escalations.
User experience
Here we see an alert sent by the Grafana Slack bot:

AlertsBot automatically responds that it will research the cause of the alert. It also suggests that human engineers can research in parallel via logs and metrics. Asynchronously, AlertsBot uses MCP to pull relevant logs from Grafana and state from Kubernetes. AlertsBot uses this information to correctly diagnose the root cause, an out of memory condition in the application. Out of memory errors can be time-consuming for engineers to debug but AlertsBot automatically correlates the memory usage with container history and log messages. AlertsBot also suggests potential short-term workarounds and long-term fixes.

Note that a Slack bot talked to a Slack bot here! Users can then interact with bot to ask for further information, e.g., which applications are running, other Kubernetes events, go deeper on out of memory issues.
LLM prompt
Much of the business logic for this bot is English text and not TypeScript code. We store our prompts in Notion that DeepStructure dynamically ingests. We found that we needed to define higher-level concepts in our platform and explain the relationships to Kubernetes, e.g., specific pod meanings.

We also found that we needed to explain how to use certain tools like LogQL, including specific syntax, to successfully use some MCP servers.

DeepStructure code
DeepStructure is a TypeScript-native platform that exposes features like MCP and Slack in a declarative way. AlertsBot configures two MCP servers and some internal DeepStructure-specific tools.
Using these MCP servers saved us a lot of time compared to writing internal tools using the vendor SDKs. Snapping in other MCP servers is as simple as providing the GitHub repository and authentication environment variables. Note that this application uses ChatGPT 4.1 — users can override this with Claude, Gemini, or Llama.
The prompt is dynamically fetched at the beginning of a new thread, enabling a faster edit-test loop instead of edit-build-test.Note that AlertsBot uses Slack as its human-interface layer — DeepStructure supports using email, a web interface, or raw HTTP calls as well.
Conclusion
In this blog post I demonstrated the AlertsBot, a reference application on the DeepStructure platform, that helps us diagnose production issues. Most of the functionality is provided by high-level English text, third-party MCP servers, and the DeepStructure platform. We TypeScript-coded only a few things like automatically fetching logs and metrics instead of going through an LLM to reduce the latency of the initial response. The platform allows you to mix-and-match different components to build Slack bots, web services, and any other AI-native application.
Don't miss these

Chris Jones
🎓 Shortcut to SOC 2: Use AWS Identity Center for Auth
AWS Identity Center gives you role-based access control and SSO with low effort, giving you a leg up on the road to SOC 2 compliance

Chris Jones
🎓 Thinking about MCP as "npm for LLMs"
We describe three parallels between MCP and npm: (1) sure, you _could_ build the tools yourself, but now you don't have to; (2) the integrations become the vendor's problem, not yours; (3) even though the ecosystem isn't uniformly high quality, there's still value for developers who follow best practices

Chris Jones
🎓🎓 Giving "Agentic" a More Precise Definition: Three Levels of Intelligent Execution
We describe "Agentic" systems as Level 1 (intelligent decision making), Level 2 (creative branch generation), and Level 3 (intelligent dynamic execution)