How naveenkumarbs/rootpilot works
RootPilot is an observability and incident-investigation service. Its visible API workflow queries Prometheus for metrics or OpenSearch for service logs; the memory endpoint evaluates a metric against a threshold and returns an anomaly result. A separate RCA agent can ask an LLM to investigate using registered tools, including log search, and produce a report. The supplied excerpts do not show an API route invoking that agent, and remediation is not implemented in the sampled code. Arrows below reflect shown calls or documented HTTP behavior.
Main entry points: rca_agent.py RCA Agent · main.py FastAPI Routes · settings.py Runtime Settings · gemini_provider.py Gemini Provider
Components 17
HTTP API
- FastAPI Routes
app/main.py - Runtime Settings
app/config/settings.py
Anomaly Detection
- Memory Detector
app/detection/anomaly_detector.py
RCA Agent
- RCA Agent
app/agents/rca_agent.py - RCA Tool Definitions
app/tools/definitions.py - Tool Registry
app/tools/registry.py - Log Search Tool
app/tools/opensearch_tools.py
LLM Layer
- Provider Factory
app/llm/factory.py - Gemini Provider
app/llm/gemini_provider.py - Provider Interface
app/llm/base.py - LLM Data Models
app/llm/models.py
Telemetry Access
- Prometheus Client
app/telemetry/prometheus_client.py - OpenSearch Client
app/telemetry/opensearch_client.py
Other components
- API Caller
- Prometheus
- OpenSearch
- Gemini API
Connections 22
- API Caller → FastAPI Routes: calls HTTP
app/main.py - FastAPI Routes → Runtime Settings: reads settings
app/main.py - FastAPI Routes → Prometheus Client: queries metrics
app/main.py - FastAPI Routes → OpenSearch Client: searches logs
app/main.py - FastAPI Routes → Memory Detector: checks memory
app/main.py - Prometheus Client → Runtime Settings: reads URL
app/telemetry/prometheus_client.py - Prometheus Client → Prometheus: queries
app/telemetry/prometheus_client.py - OpenSearch Client → Runtime Settings: reads URL
app/telemetry/opensearch_client.py - OpenSearch Client → OpenSearch: searches logs
app/telemetry/opensearch_client.py - RCA Agent → Runtime Settings: reads limits
app/agents/rca_agent.py - RCA Agent → Provider Factory: creates provider
app/agents/rca_agent.py - RCA Agent → RCA Tool Definitions: offers tools
app/agents/rca_agent.py - RCA Agent → Tool Registry: executes calls
app/agents/rca_agent.py - Tool Registry → Log Search Tool: dispatches to
app/tools/registry.py - Log Search Tool → OpenSearch Client: searches logs
app/tools/opensearch_tools.py - Provider Factory → Runtime Settings: selects provider
app/llm/factory.py - Provider Factory → Gemini Provider: creates Gemini
app/llm/factory.py - Gemini Provider → Provider Interface: implements
app/llm/gemini_provider.py - Gemini Provider → LLM Data Models: uses messages
app/llm/gemini_provider.py - RCA Tool Definitions → LLM Data Models: defines tool type
app/tools/definitions.py - RCA Agent → LLM Data Models: builds messages
app/agents/rca_agent.py - Gemini Provider → Gemini API: generates content
app/llm/gemini_provider.py