Skip to content

Watch Mode

balakrishnagatla edited this page Nov 29, 2026 · 1 revision

Watch Mode

Watch mode runs without anyone asking: scan, ask an LLM for a short triage summary, publish.

pip install -e ".[aws,ai]"
infralens daily --model anthropic/claude-sonnet-5-5 --out report.md
infralens daily --model openai/gpt-4o-mini --github-repo you/ops-reports   # needs GITHUB_TOKEN
infralens daily --model ollama/llama3.1 --slack                             # needs SLACK_WEBHOOK_URL
  • --model is any LiteLLM model string. Leave it out for a report with no AI summary.
  • The report is always published, even if the LLM call fails.
  • Secrets are masked before anything reaches the LLM.
  • Slack and GitHub publishing only accept https endpoints.

Scheduling

Option How
AWS Lambda + EventBridge Scheduler Built into the Deploying module (deploy_agent = true). State persists in S3.
GitHub Actions daily-scan.yml: OIDC role, no stored AWS keys
cron 0 7 * * 1-5 infralens daily --slack

Environment variables: INFRALENS_MODEL, INFRALENS_GITHUB_REPO, GITHUB_TOKEN, SLACK_WEBHOOK_URL, INFRALENS_POLICY.

See a sample report.

Clone this wiki locally