Fetches incident reports from WebRCA and generates summaries using an LLM service. Supports both single-incident CLI mode and a background worker mode that continuously processes updated incidents.
-
Install pyenv (follow all steps in the installation guide)
-
Set up the virtual environment:
pipenv install --dev
-
Add LLM access info to
.env:LLM_API_KEY=<your key> LLM_BASE_URL="https://your-llm-service:443/v1" LLM_MODEL_NAME="your-model"
Generate a summary for a specific incident:
ocm login --use-auth-code
pipenv shell
WEBRCA_TOKEN=$(ocm token) python summarizer.py generate --id ITN-2025-00094Processes all incidents that need updated summaries:
pipenv run python summarizer.py workerThe worker generates summaries for incidents where:
ai_summary_updated_atis older than the incident'schanged_attime- New follow-ups have been added since the last summary
- New events (non-system) have occurred since the last summary
| Variable | Description | Default |
|---|---|---|
LLM_API_KEY |
API key for the LLM service | (required) |
LLM_BASE_URL |
Base URL for the LLM API | (required) |
LLM_MODEL_NAME |
Model name to use | (required) |
LOG_LEVEL |
Logging level | INFO |
MAX_WORKERS |
Thread pool size for worker mode | 1 |
WEBRCA_V1_API_BASE_URL |
WebRCA API base URL | https://api.openshift.com/api/web-rca/v1 |
WEBRCA_TOKEN |
OCM bearer token (CLI mode) | (required for CLI) |
SSO_OFFLINE_TOKEN |
Red Hat SSO offline token (worker mode) | (alternative to client credentials) |
SSO_CLIENT_ID |
SSO client ID (production worker mode) | (recommended for production) |
SSO_CLIENT_SECRET |
SSO client secret (production) | (recommended for production) |
A Dockerfile is included for container deployment. An OpenShift deployment template is in
deploy/template.yaml.
No license file is included in this repository.