The provided code outlines a modular system for building an intelligent data engineering support agent that can both retrieve internal policy and runbook context (via RAG) and interact with live monitoring tools to fetch real-time pipeline status information. Below is a summary of the key components and their roles:
-
RAG Initialization (
agent/openai_agent.py):- The system initializes by loading all
.mdfiles from a specified directory into memory, creating a combined string that serves as context for policy retrieval. - A
RAGRetrieverinstance is created to index and retrieve relevant policies based on user queries.
- The system initializes by loading all
-
LLM Router (
agent/llm_router.py):- This component classifies the intent of incoming queries by checking against predefined keyword lists.
- It determines whether a query requires RAG (retrieval of policy context), MCP (interaction with live monitoring tools), or both.
-
Live Monitoring Tools (
tools.pipeline_status.py):- A mock function
get_pipeline_run_status()simulates fetching real-time pipeline status data, which would be replaced by actual API calls in a production environment. - The function returns structured information about the current state of specified pipelines
- A mock function
Read the full article at Towards AI - Medium
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.

![[AINews] The Unreasonable Effectiveness of Closing the Loop](/_next/image?url=https%3A%2F%2Fmedia.nemati.ai%2Fmedia%2Fblog%2Fimages%2Farticles%2F600e22851bc7453b.webp&w=3840&q=75)



