How vivek1106-04/borgpilot works
BorgPilot ingests Google Borg traces into AsterixDB, then supports an LLM-driven SRE investigation and offline predictive analytics. The primary user workflow is to ask an incident question; the agent consults the MCP gateway’s tools to inspect datasets, query telemetry, and return an evidence-backed root-cause summary. Separate batch workflows score machine failure risk and recommend instance rightsizing, persisting results in AsterixDB for later investigation. Some implementation details, especially MCP wiring and rightsizing persistence, are supported by README documentation rather than fully sampled source.
Main entry points: loop.py Investigation loop · asterix_io.py AsterixDB SQL I/O · load_to_asterix.py Provision and load · fetch_borg.py Fetch Borg shards
Components 12
Trace ingestion
- Fetch Borg shards
ingestion/fetch_borg.py - Provision and load
ingestion/load_to_asterix.py
SRE investigation
- Investigation loop
agent/loop.py - SRE prompts
agent/prompts.py
Failure prediction
- Machine features
sre/features.py - Failure-risk scoring
sre/predict.py
Capacity rightsizing
- Rightsizing analysis
sre/rightsize.py
Analytics store
- AsterixDB
- AsterixDB SQL I/O
sre/asterix_io.py
Other components
- SRE operator
- AsterixDB MCP gateway
- Anthropic model
Connections 14
- SRE operator → Investigation loop: asks question
README.md - Investigation loop → SRE prompts: uses prompts
agent/loop.py - Investigation loop → Anthropic model: requests responses
agent/loop.py - Investigation loop → AsterixDB MCP gateway: calls tools
agent/loop.py - AsterixDB MCP gateway → AsterixDB: queries SQL++
- Fetch Borg shards → Provision and load: supplies shards
ingestion/load_to_asterix.py - Fetch Borg shards → AsterixDB: downloads from
ingestion/fetch_borg.py - Provision and load → AsterixDB: provisions and loads
ingestion/load_to_asterix.py - Failure-risk scoring → AsterixDB SQL I/O: fetches and persists
sre/predict.py - Failure-risk scoring → Machine features: builds features
sre/predict.py - AsterixDB SQL I/O → Provision and load: uses SQL++ helper
sre/asterix_io.py - AsterixDB SQL I/O → AsterixDB: reads and writes
sre/asterix_io.py - Rightsizing analysis → AsterixDB SQL I/O: fetches and persists
sre/rightsize.py - Rightsizing analysis → AsterixDB: stores recommendations
README.md