OpenSRE (GitHub Repo)
OpenSRE is a self-hosted agent that automatically investigates failed CI/CD pipelines, separates infrastructure issues from code bugs, and pushes fixes for review.
Deep dive
- Architecture: Self-hosted agent; supports private deployment to ensure data privacy.
- Capability: Automatically correlates failed CI logs with observability data (Grafana, Datadog, Sentry).
- ** Remediation**: Suggests and pushes code fixes directly to the failing PR branch.
- Differentiation: Explicitly distinguishes between infrastructure/CI flakiness and actual logic regressions.
- Interface: CLI (REPL), Headless (for CI jobs), and embedded Python API (for automation integration).
- Security: Designed for auditable prompts and structured log handling.
Decoder
- REPL (Read-Eval-Print Loop): An interactive shell that processes input, evaluates it, and prints the result, common for CLI tools.
- Tool-calling loop: An AI agent behavior where it can invoke predefined external functions/tools to gather information or perform actions.
- CI/CD Reliability: The practice of maintaining a high success rate and predictable behavior in automated delivery pipelines.
Original article
OpenSRE: The open-source agent for CI/CD reliability
Your CI tells you it broke, but not why or how to fix it. OpenSRE is a CLI agent that reads the failed run, traces the cause and pushes a fix for you to review. Self-hosted, with your own models.
🚧 Public Alpha: Core workflows are usable for early exploration, though not yet fully stable. The project is in active development, and APIs and integrations may evolve.
Before you begin
Make sure you have:
- A terminal open in a code project
- A Git repository (recommended for the full workflow demonstration)
Step 1: Install and start opensre
macOS or Linux:
curl -fsSL https://install.opensre.com | bash -s -- -gh
Windows (PowerShell):
& ([scriptblock]::Create((irm https://install.opensre.com/install.ps1))) -gh
Then start OpenSRE:
opensre
The installer fetches the latest build from main without requiring sudo. If opensre is not found, follow the PATH instructions printed by the installer or open a new terminal.
Why OpenSRE?
AI writes more of the code every month. Someone still has to fix the build.
When CI goes red, it tells you that something failed, not why or how to fix it. Under deadline pressure, teams hit re-run and move on, flaky checks pile up, main stays red, and the real investigation waits for whichever senior engineer has time. OpenSRE is an open-source CI/CD reliability agent that does that investigation for you, built to run on your own infrastructure with your own models:
- Recover from red builds faster: it investigates the moment a run fails, reading logs, testing hypotheses and pushing a fix for you to review
- Fix the cause, not just the rerun: it separates CI-caused failures from code-caused ones, so you fix the right thing
- Know what CI is costing you: failure rate, developer hours lost to unreliable CI, and how long
mainstays red - Senior-level context for everyone: every engineer gets the same depth of analysis
Quick Start
Run opensre to sign in and get started. The first launch activates the hosted model.
opensre
Webapp contributors can run opensre setup --dev to authenticate through http://localhost:3000.
Interactive shell — with no subcommand, opensre validates your account and starts a REPL (TTY required). You can exit and stay signed out, but the shell only opens for an active account. Describe incidents in plain language, watch the agent work, and use slash commands for session control (/help, /status, /cost, /sessions, /resume, /compact, /new, /exit) and integrations (/integrations list, /integrations verify). Ctrl+C cancels an in-flight turn without losing session state.
Headless CLI — run one agent turn non-interactively from a terminal, script, or CI job:
opensre ask "why is checkout-api slow?"
From Python — drive the agent in-process from your own code:
from surfaces.embedded import start_embedded_session
session = start_embedded_session()
result = session.chat("why is checkout-api slow?")
if result.action_result.accounting_status == "completed" and not result.cancelled:
print(result.primary_response_text)
Deployment
An OpenSRE Cloud managed gateway, an AWS EC2 path, and a general self-hosted option:
- OpenSRE Cloud managed gateway: an organization admin provisions it in the web app; signed-in shell users can check, start, or stop it without handling infrastructure credentials locally.
- Gateway (AMI + systemd):
make build-gateway-imagethenmake deploy-gateway— Telegram gateway only, no Docker; the gateway is installed into a server image that new servers start from. - Self-hosted container (Railway / ECS / Vercel): deploy the repo
Dockerfile, selectMODE, and setLLM_PROVIDERplus its API key.
How OpenSRE Works
When a CI run fails, an alert arrives, or you ask a question, OpenSRE automatically:
- Fetches the relevant context: failing checks and CI logs, recent commits and deploys, and correlated logs, metrics and traces
- Masks sensitive identifiers (optional) before external LLM calls
- Reasons across your connected systems to test hypotheses in a tool-calling loop, separating CI-caused failures from code-caused ones
- Answers with an evidence-linked response in the conversation
- Fixes the cause and pushes it to the PR branch for you to review, or suggests next steps and, optionally, executes remediation actions
- Posts a summary directly to Slack, PagerDuty, or Telegram — no context switching needed
Integrations
OpenSRE connects to 60+ tools and services across the modern cloud stack, from LLM providers and observability platforms to infrastructure, databases, and incident management.
Security
OpenSRE is designed with production environments in mind: structured and auditable LLM prompts, local transcript handling by default, and no silent bulk export of raw logs.
Telemetry
First-party product analytics and Sentry (errors) are opt-out. Quick disable:
export OPENSRE_NO_TELEMETRY=1
License
Apache 2.0
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi