How robusta-dev/holmesgpt works
Main Components
• Interface/CLI & Web UI: Users can interact via a CLI (holmes.py, server.py, config settings) or a web-based interface (as deployed via helm charts and Docker images).
• Core Engine: Located under “holmes/core”, this module includes the investigation logic, conversation handling, integration with LLM models, fetching and formatting of observability data, and performance timing. This is the brain of the application.
• Utility Modules: In “holmes/common” and “holmes/utils”, supporting functions like environment variable handling, caching, certificate utilities, and file operations are provided.
• Configuration: The project uses configuration files (“config.example.yaml”, and user config files in ~/.holmes/config.yaml) to decide which plugins, toolsets, and runbooks to load. This also supports extensibility and customization.
• Deployment & Build: Supporting infrastructure files such as Dockerfile, Helm charts (in the helm directory) and Makefile illustrate how the application can be containerized and deployed – often in a Kubernetes cluster.
Relationships and Interactions
• User requests (or alert events) are received through the CLI or web interface.
• The core engine interprets the request and initiates an “agentic loop” that:
• Calls upon various plugins to retrieve data (logs, metrics, traces) from integrated datasources.
• Formats and processes the responses (e.g., via “holmes/core/llm.py” and “holmes/core/tools.py”).
• The plugins interact with external systems (Kubernetes, Grafana, Helm, etc.) and return the necessary observability information.
• The processed result is then either displayed to the user (CLI response or via an integrated dashboard) or pushed back into a third-party system (like posting an analysis on Slack).
Architectural Patterns and Design Principles
• Modular/Plugin-Based Architecture: Separation of concerns is evident by putting the investigation logic in the core and delegating integrations to plugins.
• Extensibility and Configurability: The approach (via config files and toolsets under “examples/” and “helm”) supports customization for different environments and additional data source integration.
• Clean Separation of Core Logic & I/O: Core modules focus on business logic while plugins handle the interfacing to external web services, CLI input, and even deployment containers.
• Testing and Quality Assurance: A comprehensive “tests” directory (covering unit tests for LLM, investigation structured output, plugin functionality, etc.) shows an emphasis on robust testing.
Relevant Technologies, Frameworks, or Libraries
• Python: The main language, as seen in the “holmes” package.
• Docker & Kubernetes: Dockerfile and helm charts indicate containerized deployment and orchestration on Kubernetes clusters.
• CI/CD: GitHub Actions workflows (in “.github/workflows”) are used to build, test, and deploy the project.
• Observability Tools: Built-in support for integrations with platforms like Prometheus, Grafana (Loki and Tempo), PagerDuty, OpsGenie, etc.
• LLM Integration: There’s integration with AI models (provided optionally via API keys) which could reference external LLM services.
Elements
• Use clear labels for each of the following components:
• User Interface (CLI and/or Web UI)
• Core Engine (Investigation and Agentic Loop)
• Plugin Modules for Data Sources (and further break down by categories like destinations, toolsets, prompts, etc.)
• Utility/Configuration Manager
• External Dependencies/Services (Kubernetes, Grafana, Prometheus, Slack, and other integrations)
• Deployment Components (Docker, Helm, CI/CD pipelines)
• From user alerts and commands into the core.
• From the core engine to the various plugins.
• From plugins to external services and the return flow of data.
• Drill down into the core to illustrate how it interacts with the plugin system.
• Optionally, include deployment and configuration management components to capture the entire lifecycle from development to production.