devops-ai-agent 1.0.0__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. devops_ai_agent-1.1.0/.env.example +412 -0
  2. {devops_ai_agent-1.0.0/devops_ai_agent.egg-info → devops_ai_agent-1.1.0}/PKG-INFO +296 -91
  3. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/README.md +283 -84
  4. devops_ai_agent-1.1.0/SECURITY_GUARANTEES.md +682 -0
  5. devops_ai_agent-1.1.0/agent/classifier.py +234 -0
  6. devops_ai_agent-1.1.0/agent/core.py +1947 -0
  7. devops_ai_agent-1.1.0/agent/grounding.py +204 -0
  8. devops_ai_agent-1.1.0/agent/prompts.py +281 -0
  9. devops_ai_agent-1.1.0/api/api_auth.py +151 -0
  10. devops_ai_agent-1.1.0/api/ip_allowlist.py +59 -0
  11. devops_ai_agent-1.1.0/api/rate_limit.py +83 -0
  12. devops_ai_agent-1.1.0/api/server.py +907 -0
  13. devops_ai_agent-1.1.0/api/webhook_auth.py +128 -0
  14. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/argocd.py +3 -0
  15. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/aws.py +3 -0
  16. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/azure.py +3 -0
  17. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/azure_devops.py +3 -0
  18. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/bamboo.py +3 -0
  19. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/database_policy.py +47 -0
  20. devops_ai_agent-1.1.0/collectors/docker.py +69 -0
  21. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/gcp.py +3 -0
  22. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/github.py +11 -5
  23. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/gitlab.py +3 -0
  24. devops_ai_agent-1.1.0/collectors/helm.py +91 -0
  25. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/jenkins.py +3 -0
  26. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/k8s.py +6 -0
  27. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/security_scanner.py +163 -27
  28. devops_ai_agent-1.1.0/collectors/server.py +64 -0
  29. devops_ai_agent-1.1.0/collectors/threat_detector.py +320 -0
  30. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/devops_agent/cli.py +43 -2
  31. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0/devops_ai_agent.egg-info}/PKG-INFO +296 -91
  32. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/devops_ai_agent.egg-info/SOURCES.txt +47 -1
  33. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/devops_ai_agent.egg-info/requires.txt +8 -0
  34. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/devops_ai_agent.egg-info/top_level.txt +3 -0
  35. devops_ai_agent-1.1.0/devops_mcp/__init__.py +3 -0
  36. devops_ai_agent-1.1.0/devops_mcp/auth.py +124 -0
  37. devops_ai_agent-1.1.0/devops_mcp/registry.py +232 -0
  38. devops_ai_agent-1.1.0/devops_mcp/server.py +124 -0
  39. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/pyproject.toml +15 -8
  40. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/requirements.txt +13 -0
  41. devops_ai_agent-1.1.0/services/__init__.py +1 -0
  42. devops_ai_agent-1.1.0/services/alert_dedupe.py +95 -0
  43. devops_ai_agent-1.1.0/services/approval_store.py +286 -0
  44. devops_ai_agent-1.1.0/services/background_lock.py +58 -0
  45. devops_ai_agent-1.1.0/services/credential_crypto.py +86 -0
  46. devops_ai_agent-1.1.0/services/escalation.py +288 -0
  47. devops_ai_agent-1.1.0/services/incident_queue.py +337 -0
  48. devops_ai_agent-1.1.0/services/incident_store.py +235 -0
  49. devops_ai_agent-1.1.0/services/metrics.py +139 -0
  50. devops_ai_agent-1.1.0/services/org_config.py +165 -0
  51. devops_ai_agent-1.1.0/services/org_context.py +114 -0
  52. devops_ai_agent-1.1.0/services/org_docs.py +104 -0
  53. devops_ai_agent-1.1.0/services/pii_scrubber.py +74 -0
  54. devops_ai_agent-1.1.0/storage/__init__.py +5 -0
  55. devops_ai_agent-1.1.0/storage/azure_storage.py +76 -0
  56. devops_ai_agent-1.1.0/storage/base.py +101 -0
  57. devops_ai_agent-1.1.0/storage/factory.py +53 -0
  58. devops_ai_agent-1.1.0/storage/gcs_storage.py +62 -0
  59. devops_ai_agent-1.1.0/storage/memory_storage.py +53 -0
  60. devops_ai_agent-1.1.0/storage/s3_storage.py +115 -0
  61. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/argocd_tools.py +3 -0
  62. devops_ai_agent-1.1.0/tools/cicd_tools.py +824 -0
  63. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/cloud_tools.py +3 -0
  64. devops_ai_agent-1.1.0/tools/code_review.py +1255 -0
  65. devops_ai_agent-1.1.0/tools/data_state.py +351 -0
  66. devops_ai_agent-1.1.0/tools/disk_cleanup.py +242 -0
  67. devops_ai_agent-1.1.0/tools/disk_policy.py +156 -0
  68. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/email_notifier.py +48 -9
  69. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/executor.py +67 -11
  70. devops_ai_agent-1.1.0/tools/fix_suggestions.py +95 -0
  71. devops_ai_agent-1.1.0/tools/fix_verifier.py +664 -0
  72. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/github_tools.py +31 -1
  73. devops_ai_agent-1.1.0/tools/helm_tools.py +155 -0
  74. devops_ai_agent-1.1.0/tools/iac_tools.py +125 -0
  75. devops_ai_agent-1.1.0/tools/jira_tools.py +89 -0
  76. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/k8s_tools.py +44 -22
  77. devops_ai_agent-1.1.0/tools/nginx_tools.py +410 -0
  78. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/notify.py +93 -8
  79. devops_ai_agent-1.1.0/tools/observability.py +718 -0
  80. devops_ai_agent-1.1.0/tools/pagerduty_tools.py +93 -0
  81. devops_ai_agent-1.1.0/tools/safety.py +100 -0
  82. devops_ai_agent-1.1.0/tools/security_updates.py +50 -0
  83. devops_ai_agent-1.1.0/tools/ssh_utils.py +45 -0
  84. devops_ai_agent-1.1.0/tools/zoho_tools.py +70 -0
  85. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/usage-readme.md +288 -50
  86. devops_ai_agent-1.0.0/.env.example +0 -111
  87. devops_ai_agent-1.0.0/SECURITY_GUARANTEES.md +0 -749
  88. devops_ai_agent-1.0.0/agent/classifier.py +0 -135
  89. devops_ai_agent-1.0.0/agent/core.py +0 -658
  90. devops_ai_agent-1.0.0/agent/prompts.py +0 -150
  91. devops_ai_agent-1.0.0/api/server.py +0 -222
  92. devops_ai_agent-1.0.0/collectors/docker.py +0 -7
  93. devops_ai_agent-1.0.0/collectors/server.py +0 -40
  94. devops_ai_agent-1.0.0/tools/cicd_tools.py +0 -301
  95. devops_ai_agent-1.0.0/tools/fix_verifier.py +0 -349
  96. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/LICENSE +0 -0
  97. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/MANIFEST.in +0 -0
  98. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/agent/__init__.py +0 -0
  99. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/api/__init__.py +0 -0
  100. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/__init__.py +0 -0
  101. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/cloud_registry.py +0 -0
  102. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/collectors/server_enhanced.py +0 -0
  103. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/devops_agent/__init__.py +0 -0
  104. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/devops_ai_agent.egg-info/dependency_links.txt +0 -0
  105. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/devops_ai_agent.egg-info/entry_points.txt +0 -0
  106. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/k8s/deployment.yaml +0 -0
  107. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/k8s/rbac.yaml +0 -0
  108. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/k8s/service-configmap.yaml +0 -0
  109. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/setup.cfg +0 -0
  110. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/__init__.py +0 -0
  111. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/documentation_generator.py +0 -0
  112. {devops_ai_agent-1.0.0 → devops_ai_agent-1.1.0}/tools/safe_executor_enhanced.py +0 -0
@@ -0,0 +1,412 @@
1
+ # ============================================================
2
+ # DevOps AI Agent — Environment Configuration
3
+ # Copy to .env and fill in your values
4
+ # ============================================================
5
+
6
+ # --- REQUIRED ---
7
+ ANTHROPIC_API_KEY=sk-ant-...
8
+ SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
9
+ SLACK_APPROVAL_CHANNEL=#devops-approvals
10
+ # Required when SLACK interactive approvals are enabled (validates /slack/action requests)
11
+ SLACK_SIGNING_SECRET=
12
+ # Slack user IDs allowed to click "Approve" (comma-separated, e.g. U012AB3CD,U045EF6GH).
13
+ # When set, anyone else gets an ephemeral "not an approver" reply and nothing runs.
14
+ # Can also be set per org with PUT /orgs/{org}/config. Unset = any channel member can approve.
15
+ SLACK_APPROVER_IDS=
16
+
17
+ # --- BEHAVIOR & SAFETY ---
18
+ # IMPORTANT: Read SECURITY_POLICY.md before changing these settings
19
+
20
+ # Set to "true" only after you trust the agent's decisions
21
+ # RECOMMENDED: Keep false - agent will send notifications for approval
22
+ AUTO_APPLY=false
23
+
24
+ # Max AI reasoning steps per incident (prevents runaway loops)
25
+ MAX_AGENT_STEPS=10
26
+
27
+ # Emergency stop - set to true to disable all agent operations
28
+ AGENT_EMERGENCY_STOP=false
29
+
30
+ # Require human Slack approval for these action types
31
+ REQUIRE_APPROVAL_FOR=rollback,scale_down,delete,exec
32
+
33
+ # DevSecOps Settings
34
+ ENABLE_SECURITY_SCANNING=true
35
+ ENABLE_COMPLIANCE_CHECKS=true
36
+ COMPLIANCE_FRAMEWORKS=CIS,SOC2
37
+
38
+ # Database collection (OPTIONAL — disabled by default for security / sensitive data)
39
+ # When false: no RDS, Cloud SQL, Azure SQL, DynamoDB, Cosmos DB, Redis/Memorystore diagnostics
40
+ # Agent can still fix connection pool timeouts, app restarts, and network issues without DB access
41
+ ENABLE_DATABASE_COLLECTION=false
42
+
43
+ # --- KUBERNETES ---
44
+ # Comma-separated namespaces the agent can act on
45
+ ALLOWED_NAMESPACES=default,staging
46
+ # SSH target for remote server incidents (centralized agent)
47
+ # Format: hostname-or-ip — SSH_REMOTE_USER is prepended automatically
48
+ SSH_REMOTE_USER=ubuntu
49
+ # Path to known_hosts file (recommended for production)
50
+ # SSH_KNOWN_HOSTS=/home/agent/.ssh/known_hosts
51
+ # Set to false only for dev/lab (disables host key verification)
52
+ SSH_STRICT_HOST_KEY_CHECKING=true
53
+ # Seconds to wait for the SSH TCP connect before giving up
54
+ SSH_CONNECT_TIMEOUT=10
55
+ # Mount ~/.ssh keys into agent container for passwordless access
56
+ # Leave empty to use in-cluster config
57
+ KUBECONFIG=
58
+
59
+ # Helm CLI (for helm release incidents)
60
+ HELM_BIN=helm
61
+
62
+ # Terraform read-only diagnostics (for terraform/iac incidents)
63
+ TERRAFORM_BIN=terraform
64
+ # Default workspace when webhook does not include workspace_path
65
+ # TERRAFORM_WORKSPACE_DIR=/opt/terraform/live/prod
66
+
67
+ # --- CI/CD PLATFORMS ---
68
+
69
+ # GitHub (existing)
70
+ GITHUB_TOKEN=ghp_...
71
+ GITHUB_ORG=your-org
72
+ # Override for GitHub Enterprise Server, e.g. https://github.example.com/api/v3
73
+ GITHUB_API_URL=https://api.github.com
74
+
75
+ # GitLab
76
+ GITLAB_TOKEN=glpat-...
77
+ GITLAB_URL=https://gitlab.com
78
+ # For self-hosted GitLab, set: GITLAB_URL=https://gitlab.yourcompany.com
79
+
80
+ # Jenkins
81
+ JENKINS_URL=https://jenkins.yourcompany.com
82
+ JENKINS_USERNAME=admin
83
+ JENKINS_API_TOKEN=...
84
+ JENKINS_SCM_PROVIDER=github
85
+ JENKINS_SCM_REPO=your-org/app
86
+
87
+ # Bamboo
88
+ BAMBOO_URL=https://bamboo.yourcompany.com
89
+ BAMBOO_USERNAME=admin
90
+ BAMBOO_PASSWORD=...
91
+ # Plan variable used by bamboo_increment_version / patch_bamboo_plan (default: version)
92
+ BAMBOO_VERSION_VARIABLE=version
93
+ # Git repo that holds bamboo-specs (PRs go here; Bamboo has no PR API)
94
+ # For AWS+Bitbucket stacks use bitbucket + workspace/repo_slug
95
+ BAMBOO_SCM_PROVIDER=bitbucket
96
+ BAMBOO_SPECS_REPO=your-workspace/bamboo-specs
97
+
98
+ # Azure DevOps
99
+ AZURE_DEVOPS_ORG=your-org
100
+ AZURE_DEVOPS_PAT=...
101
+ AZURE_DEVOPS_PROJECT=your-project
102
+
103
+ # Bitbucket Cloud (code review + SCM)
104
+ BITBUCKET_USERNAME=
105
+ BITBUCKET_APP_PASSWORD=
106
+ # Or workspace access token:
107
+ BITBUCKET_TOKEN=
108
+ BITBUCKET_API_URL=https://api.bitbucket.org/2.0
109
+
110
+ # Code review (GitHub / GitLab / Bitbucket / Azure DevOps / local git)
111
+ # Post reviews only when true (or AUTO_APPLY=true) and post_code_review dry_run=false
112
+ CODE_REVIEW_AUTO_POST=false
113
+ # Allow GitHub APPROVE event (default: force COMMENT)
114
+ CODE_REVIEW_ALLOW_APPROVE=false
115
+ CODE_REVIEW_MAX_DIFF_CHARS=80000
116
+ CODE_REVIEW_MAX_FILES=40
117
+ # Default workspace for platform=git reviews
118
+ CODE_REVIEW_WORKSPACE=
119
+
120
+ # Wildcard / DNS-01 certbot (used by renew_certificates)
121
+ CERTBOT_DNS_PLUGIN=
122
+ CERTBOT_DNS_CREDENTIALS=
123
+ CERTBOT_WILDCARD_DOMAINS=
124
+
125
+ # --- SAFE DISK / LOG CLEANUP ---
126
+ # Only journal shrink + aged rotated logs under /var/log. Production/app data is never deleted.
127
+ CLEANUP_LOG_MIN_AGE_DAYS=14
128
+ CLEANUP_JOURNAL_MAX_AGE_DAYS=7
129
+ CLEANUP_JOURNAL_MAX_SIZE=500M
130
+ # Extra protected path prefixes (comma-separated). These are never deleted.
131
+ CLEANUP_PROTECTED_PATHS=/var/www,/srv/prod,/data
132
+ # Cron schedule for install_log_cleanup_cron (default 03:00 daily)
133
+ LOG_CLEANUP_CRON=0 3 * * *
134
+
135
+ # --- ARGOCD ---
136
+ ARGOCD_SERVER_URL=https://argocd.yourcompany.com
137
+ ARGOCD_AUTH_TOKEN=...
138
+ # Get token with: argocd account generate-token
139
+ # Set to true ONLY for self-signed ArgoCD certs — disables TLS verification
140
+ ARGOCD_INSECURE_SKIP_VERIFY=false
141
+
142
+ # --- CLOUD PROVIDERS ---
143
+
144
+ # AWS
145
+ AWS_REGION=us-east-1
146
+ # AWS credentials via environment (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
147
+ # or use IAM roles for production
148
+
149
+ # GCP
150
+ GCP_PROJECT_ID=your-project-id
151
+ # GCP credentials via GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
152
+ # or use service account attached to compute instance
153
+
154
+ # Azure
155
+ AZURE_SUBSCRIPTION_ID=...
156
+ AZURE_TENANT_ID=...
157
+ AZURE_CLIENT_ID=...
158
+ AZURE_CLIENT_SECRET=...
159
+ # or use managed identity in production
160
+
161
+ # --- NOTIFICATIONS ---
162
+
163
+ # Optional: bot token for Slack API calls (channel lookups etc.). Nothing requires it
164
+ # today — notifications post via SLACK_WEBHOOK_URL only. OrgConfig persists it as an
165
+ # org credential when set, so leave empty unless a feature needs Slack API access.
166
+ SLACK_BOT_TOKEN=
167
+
168
+ # Email Alerts (CRITICAL for dangerous operation notifications)
169
+ EMAIL_ENABLED=true
170
+ EMAIL_SMTP_HOST=smtp.gmail.com
171
+ EMAIL_SMTP_PORT=587
172
+ EMAIL_SMTP_USER=devops-agent@yourcompany.com
173
+ EMAIL_SMTP_PASSWORD=your-app-password
174
+ EMAIL_FROM=devops-agent@yourcompany.com
175
+ EMAIL_TO=sre-team@yourcompany.com,devops-lead@yourcompany.com
176
+ EMAIL_CC=security-team@yourcompany.com
177
+
178
+ # --- SERVER (for webhook endpoint) ---
179
+ # Read by the `devops-agent serve` CLI. A variable already set in the shell
180
+ # environment wins over this file, and each is overridden by the
181
+ # --host / --port / --workers flags.
182
+ # Bind address — loopback by default; use 0.0.0.0 for Docker/K8s ingress
183
+ HOST=127.0.0.1
184
+ PORT=8000
185
+ # Uvicorn worker processes (forced to 1 when --reload is used)
186
+ UVICORN_WORKERS=2
187
+ # Per-host background worker lock; empty defaults to <tempdir>/devops-agent-background.lock
188
+ BACKGROUND_WORKER_LOCK=
189
+ LOG_LEVEL=INFO
190
+ # Shared secret for webhooks:
191
+ # - GitHub / Alertmanager / manual: HMAC X-Hub-Signature-256 or X-Webhook-Signature
192
+ # - Alertmanager / Grafana: or `Authorization: Bearer <this value>` (they cannot sign bodies)
193
+ # - GitLab: same value as Project → Webhooks → Secret token (sent as X-Gitlab-Token)
194
+ WEBHOOK_SECRET=change-me-to-random-string
195
+ # Repeated Alertmanager/Grafana notifications for the same alert firing (same
196
+ # fingerprint + startsAt) within this many seconds reuse the first incident instead
197
+ # of creating a new one. 0 disables dedupe.
198
+ ALERT_DEDUPE_WINDOW_SEC=3600
199
+
200
+ # --- MANAGEMENT API AUTH (/orgs/*/config, /orgs/*/docs, /audit) ---
201
+ # Send as `Authorization: Bearer <token>`. Without a token configured these
202
+ # routes return 503 (fail closed). Webhooks and /health are not affected.
203
+ # Platform operator token, valid for every org (role=admin):
204
+ API_ADMIN_TOKEN=
205
+ # Per-org tokens (role hierarchy: admin > approver > viewer):
206
+ # org-a=token-a → admin for org-a (backward compatible)
207
+ # org-a:viewer=token-v → read-only (audit/docs/status)
208
+ # org-a:approver=token-p → approver+viewer
209
+ # org-a:admin=token-a → write config/docs
210
+ API_ORG_TOKENS=
211
+ # Local development only: leave the management API unauthenticated
212
+ API_AUTH_DISABLED=false
213
+ # Prometheus scraping of GET /metrics. When set, scrapers must send
214
+ # `Authorization: Bearer <token>`; unset leaves /metrics open (keep it internal).
215
+ METRICS_TOKEN=
216
+
217
+ # --- CREDENTIALS AT REST (#60) ---
218
+ # When true, org credentials are Fernet-encrypted before storage
219
+ ENCRYPT_CREDENTIALS=false
220
+ # url-safe base64 Fernet key (required when ENCRYPT_CREDENTIALS=true):
221
+ # python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
222
+ CREDENTIALS_MASTER_KEY=
223
+ # Or path to a file containing the key:
224
+ # CREDENTIALS_MASTER_KEY_FILE=/run/secrets/credentials_master_key
225
+
226
+ # --- RATE LIMITING (#64) ---
227
+ RATE_LIMIT_ENABLED=false
228
+ RATE_LIMIT_REQUESTS=60
229
+ RATE_LIMIT_WINDOW_SEC=60
230
+ # Path prefixes to limit (comma-separated)
231
+ RATE_LIMIT_PATHS=/webhook,/orgs
232
+
233
+ # --- IP ALLOWLIST ---
234
+ # Empty = allow all. Comma-separated IPs or CIDRs (e.g. 10.0.0.5,192.168.0.0/16)
235
+ # Applied in-app; prefer also filtering at your load balancer / edge.
236
+ ALLOWED_IPS=
237
+
238
+ # --- ORGANIZATION ---
239
+ # Default org for incident scoping, storage paths, and documentation
240
+ ORG_ID=your-org
241
+ # Comma-separated list of orgs for multi-tenant queue worker
242
+ ORG_IDS=
243
+
244
+ # --- CLOUD-AGNOSTIC STORAGE ---
245
+ # Provider: memory (dev), s3, minio, gcs, azure
246
+ STORAGE_PROVIDER=memory
247
+ STORAGE_BUCKET=devops-agent-data
248
+ # Legacy alias for STORAGE_BUCKET, kept for Azure-flavoured configs. Only used
249
+ # when STORAGE_BUCKET is unset; if neither is set the bucket is "devops-agent"
250
+ # STORAGE_CONTAINER=devops-agent
251
+
252
+ # AWS S3
253
+ # STORAGE_PROVIDER=s3
254
+ # STORAGE_BUCKET=your-bucket
255
+ # AWS_REGION=us-east-1
256
+
257
+ # MinIO (S3-compatible)
258
+ # STORAGE_PROVIDER=minio
259
+ # STORAGE_BUCKET=devops-agent
260
+ # STORAGE_ENDPOINT_URL=http://minio:9000
261
+ # STORAGE_ACCESS_KEY=minioadmin
262
+ # STORAGE_SECRET_KEY=minioadmin
263
+ #
264
+ # Legacy MINIO_* aliases — each is the fallback for the STORAGE_* name directly
265
+ # above it, used only when that one is unset. Prefer the STORAGE_* names.
266
+ # MINIO_ENDPOINT=http://minio:9000
267
+ # SECRET — MinIO access key
268
+ # MINIO_ACCESS_KEY=minioadmin
269
+ # SECRET — MinIO secret key
270
+ # MINIO_SECRET_KEY=minioadmin
271
+
272
+ # GCP Cloud Storage
273
+ # STORAGE_PROVIDER=gcs
274
+ # STORAGE_BUCKET=your-bucket
275
+ # GCP_PROJECT_ID=your-project-id
276
+
277
+ # Azure Blob Storage
278
+ # STORAGE_PROVIDER=azure
279
+ # STORAGE_BUCKET=devops-agent
280
+ # SECRET — full connection string; takes precedence over the two names below
281
+ # AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;...
282
+ #
283
+ # Without a connection string the backend authenticates with
284
+ # DefaultAzureCredential (managed identity / az login) against one of:
285
+ # AZURE_STORAGE_ACCOUNT_URL=https://youraccount.blob.core.windows.net
286
+ # ...or just the account name, expanded to the URL above
287
+ # AZURE_STORAGE_ACCOUNT=youraccount
288
+
289
+ # Audit/log retention in cloud storage (days, 0=disable cleanup)
290
+ AUDIT_RETENTION_DAYS=90
291
+
292
+ # Incident queue worker poll interval (seconds)
293
+ QUEUE_POLL_INTERVAL_SEC=5
294
+
295
+ # Claude API resilience
296
+ CLAUDE_API_RETRIES=3
297
+ CLAUDE_RETRY_DELAY_SEC=2
298
+ CLAUDE_MODEL=claude-sonnet-4-20250514
299
+
300
+ # Org documentation loaded into agent context
301
+ MAX_DOC_CONTEXT_CHARS=12000
302
+ MAX_DOCS_IN_CONTEXT=5
303
+
304
+ # --- ESCALATION & TICKETING ---
305
+ # Auto-create tickets / notify team when agent cannot resolve
306
+ ESCALATION_ENABLED=true
307
+ ESCALATION_TIMEOUT_MINUTES=10
308
+ # Channels: slack, email, jira, zoho, pagerduty (comma-separated)
309
+ ESCALATION_CHANNELS=slack,email
310
+ ESCALATION_ON_DB_ISSUES=true
311
+ ESCALATION_ON_UNRESOLVED=true
312
+ ESCALATION_ON_AI_FAILURE=true
313
+ # Always escalate incidents the threat detector marks as security incidents (#166).
314
+ # Critical findings (miners, reverse shells, brute force + successful login) page at critical priority.
315
+ ESCALATION_ON_SECURITY=true
316
+ # Failed logins from one source IP before the threat detector reports brute force.
317
+ THREAT_BRUTE_FORCE_THRESHOLD=10
318
+
319
+ # Jira (optional)
320
+ JIRA_ENABLED=false
321
+ JIRA_URL=https://yourorg.atlassian.net
322
+ JIRA_EMAIL=devops-agent@yourcompany.com
323
+ JIRA_API_TOKEN=
324
+ JIRA_PROJECT_KEY=OPS
325
+ JIRA_ISSUE_TYPE=Task
326
+ # Map agent severity onto your Jira priority scheme (must match its names)
327
+ JIRA_PRIORITY_CRITICAL=Highest
328
+ JIRA_PRIORITY_HIGH=High
329
+ JIRA_PRIORITY_MEDIUM=Medium
330
+ JIRA_PRIORITY_LOW=Low
331
+
332
+ # Zoho Desk (optional)
333
+ ZOHO_ENABLED=false
334
+ ZOHO_DESK_ORG_ID=
335
+ ZOHO_ACCESS_TOKEN=
336
+ ZOHO_DEPARTMENT_ID=
337
+ ZOHO_CONTACT_EMAIL=devops@yourcompany.com
338
+ ZOHO_DESK_URL=https://desk.zoho.com/api/v1
339
+
340
+ # PagerDuty (optional)
341
+ PAGERDUTY_ENABLED=false
342
+ # REST API key (Integrations -> API Access Keys)
343
+ PAGERDUTY_TOKEN=
344
+ # Service the incidents are opened against, e.g. PSERVICE1
345
+ PAGERDUTY_SERVICE_ID=
346
+ # Email of a valid PagerDuty user — required by the REST API "From" header
347
+ PAGERDUTY_FROM_EMAIL=devops-agent@yourcompany.com
348
+ # Override for EU service regions, e.g. https://api.eu.pagerduty.com
349
+ PAGERDUTY_URL=https://api.pagerduty.com
350
+ # PagerDuty urgency used when our priority is "critical" (high or low)
351
+ PAGERDUTY_URGENCY_CRITICAL=high
352
+ # PagerDuty urgency used when our priority is "high" (high or low)
353
+ PAGERDUTY_URGENCY_HIGH=high
354
+ # PagerDuty urgency used when our priority is "medium" (high or low)
355
+ PAGERDUTY_URGENCY_MEDIUM=low
356
+ # PagerDuty urgency used when our priority is "low" (high or low)
357
+ PAGERDUTY_URGENCY_LOW=low
358
+ PAGERDUTY_SCHEDULE_ID=
359
+
360
+ # --- OBSERVABILITY ---
361
+ PROMETHEUS_URL=http://prometheus.monitoring.svc:9090
362
+ PROMETHEUS_TOKEN=
363
+ GRAFANA_URL=https://grafana.yourcompany.com
364
+ GRAFANA_TOKEN=
365
+ GRAFANA_DATASOURCE_UID=prometheus
366
+ # Loki datasource UID in Grafana (Connections → Data sources → Loki → UID in the URL).
367
+ # When set, alerts from /webhook/grafana and /webhook/alertmanager get recent error logs
368
+ # attached, and the agent can call query_logs. GRAFANA_TOKEN needs Viewer access.
369
+ GRAFANA_LOKI_DATASOURCE_UID=
370
+ # Or query Loki directly instead of through Grafana
371
+ LOKI_URL=
372
+ LOKI_TOKEN=
373
+ DATADOG_API_KEY=
374
+ DATADOG_APP_KEY=
375
+ DATADOG_SITE=datadoghq.com
376
+ NEW_RELIC_API_KEY=
377
+ NEW_RELIC_ACCOUNT_ID=
378
+ TEMPO_URL=
379
+ JAEGER_URL=
380
+ STATUSPAGE_PAGE_ID=
381
+ STATUSPAGE_API_KEY=
382
+ # Comma-separated hosts the synthetic check (run_synthetic) may call even when
383
+ # they resolve to a private/loopback address, e.g. an internal staging health
384
+ # check. Everything else that resolves to a non-public address is refused.
385
+ SYNTHETIC_ALLOWED_HOSTS=
386
+
387
+ # --- DATA STORES (optional; off unless collection flags are true) ---
388
+ ENABLE_DATA_STORE_COLLECTION=false
389
+ DATABASE_URL=
390
+ REDIS_HOST=
391
+ REDIS_PORT=6379
392
+ KAFKA_BOOTSTRAP=
393
+ KAFKA_REST_URL=
394
+ ELASTICSEARCH_URL=
395
+ ELASTICSEARCH_API_KEY=
396
+
397
+ # --- MCP SERVER ---
398
+ # Bind address and port for `devops-agent mcp --transport sse|streamable-http`
399
+ # (the default stdio transport ignores both). Values below are the CLI defaults.
400
+ # Leave these commented unless you need them: the server only seeds them when
401
+ # unset, so setting either here silently overrides `--host` / `--port`.
402
+ # FASTMCP_HOST=127.0.0.1
403
+ # FASTMCP_PORT=8090
404
+ # Required for sse / streamable-http: clients send `Authorization: Bearer <token>`.
405
+ # Without it the server refuses to start (stdio is unaffected).
406
+ MCP_AUTH_TOKEN=
407
+ # Local testing only, and only on a loopback host: serve HTTP MCP without a token
408
+ MCP_AUTH_DISABLED=false
409
+ # Bind this MCP server to one org: calls for any other org_id are rejected
410
+ MCP_ORG_ID=
411
+ # Register configure_org_credentials over sse / streamable-http (always on for stdio)
412
+ MCP_ALLOW_CREDENTIAL_WRITE=false