<div align="center">
<p align="center">
<img src="docs/logo/opensre-logo-white.svg" alt="OpenSRE" width="360" />
</p>
<h1>OpenSRE: The open-source agent for CI/CD reliability</h1>
<p>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.</p>
<p align="center">
<a href="https://github.com/Tracer-Cloud/opensre/actions/workflows/ci.yml?branch=main"><img src="https://img.shields.io/github/actions/workflow/status/Tracer-Cloud/opensre/ci.yml?branch=main&style=for-the-badge" alt="CI status"></a>
<a href="https://github.com/Tracer-Cloud/opensre/releases"><img src="https://img.shields.io/badge/status-public%20alpha-orange?style=for-the-badge" alt="Project status: public alpha"></a>
<a href="https://github.com/Tracer-Cloud/opensre/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge" alt="Apache 2.0 License"></a>
<a href="https://discord.gg/7NTpevXf7w"><img src="https://img.shields.io/badge/Discord-Join%20Us-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a>
<a href="https://greptile.com"><img src="https://img.shields.io/badge/Sponsored%20by-Greptile-27E99F?style=for-the-badge&labelColor=3D3B4F&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMzY3IiBoZWlnaHQ9IjQyMCIgdmlld0JveD0iMCAwIDM2NyA0MjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI%2BCjxwYXRoIGQ9Ik0yNDAuMjY5IDQ5LjgxNTRMMTY2LjgwNCAxMTUuOTYzTDExNS45NjYgMTU5LjQ0TDE4MS4zMzUgMjIwLjU4NUwyNDkuNzg0IDE2Mi4wNDhMMTk2Ljc4IDExMi40N0wyNTMuMDY4IDYxLjc4ODFMMzYyLjYwNSAxNjQuMjQ2TDE3OC43MzkgMzIxLjQ4OUwzLjE0NTAyIDE1Ny4yNDJMMTg3LjAxMSAwTDI0MC4yNjkgNDkuODE1NFoiIGZpbGw9IiNGRkZGRkYiLz4KPHJlY3Qgd2lkdGg9IjIzNi40NTMiIGhlaWdodD0iODMuNDU2NiIgdHJhbnNmb3JtPSJtYXRyaXgoMC43NTQ3MSAtMC42NTYwNTkgMCAxIDE4OC4wMTcgMzM2LjU0NCkiIGZpbGw9IiNGRkZGRkYiLz4KPHJlY3Qgd2lkdGg9IjIzNi40NTMiIGhlaWdodD0iODMuNDU2NiIgdHJhbnNmb3JtPSJtYXRyaXgoMC43MzEzNTQgMC42ODE5OTggMCAxIDAgMTc0Ljk2MikiIGZpbGw9IiNGRkZGRkYiLz4KPC9zdmc%2BCg%3D%3D" alt="Sponsored by Greptile"></a>
</p>
<p align="center">
<a href="https://trendshift.io/repositories/25889" target="_blank">
<img
src="https://trendshift.io/api/badge/repositories/25889"
alt="Tracer-Cloud%2Fopensre | Trendshift"
style="height: 30px; width: auto;"
height="30"
/>
</a>
</p>
<p align="center">
<a href="README.md">English</a> | <a href="README.zh-CN.md">简体中文</a>
</p>
<p align="center">
<strong>
<a href="https://www.opensre.com/docs/getting-started/quickstart">Quickstart</a> ·
<a href="https://www.opensre.com/docs">Docs</a> ·
<a href="https://opensre.com/docs/guides/faq">FAQ</a> ·
<a href="https://trust.tracer.cloud/">Security</a>
</strong>
</p>
</div>
---
> 🚧 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:
```bash
curl -fsSL https://install.opensre.com | bash -s -- -gh
```
Windows (PowerShell):
```powershell
& ([scriptblock]::Create((irm https://install.opensre.com/install.ps1))) -gh
```
Then start OpenSRE:
```bash
opensre
```

Windows details: [Windows](docs/install/windows-local.mdx).
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.
For supported platforms and troubleshooting, see [Install locally](https://www.opensre.com/docs/install/install-local).
---
## Table of Contents
- [Before you begin](#before-you-begin)
- [Install and start opensre](#step-1-install-and-start-opensre)
- [Why OpenSRE?](#why-opensre)
- [Quick Start](#quick-start)
- [Deployment](#deployment)
- [How OpenSRE Works](#how-opensre-works)
- [Integrations](#integrations)
- [Security](#security)
- [Telemetry](#telemetry)
- [License](#license)
- [Citations](#citations)
---
## 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 `main` stays red
- **Senior-level context for everyone:** every engineer gets the same depth of analysis
SWE-bench<sup>1</sup> showed that agents improve fastest with realistic tasks and clear feedback. Pipeline failures are slower, noisier and harder to reproduce than local code tasks, so we hold OpenSRE to the same standard by:
- running real-world end-to-end tests across cloud-backed scenarios [(tests/e2e)](tests/e2e)
- keeping semantic test-catalog naming so e2e vs unit and local vs cloud boundaries stay obvious [(tests/README.md)](tests/README.md)
Start with the **[CI/CD overview](docs/cicd/overview.mdx)**: analyze a repository's CI reliability, fix failing checks on a PR, or set up an agent that keeps CI green.
<sup>1</sup> https://arxiv.org/abs/2310.06770
---
## Quick Start
Contributors: start at [`main.py`](main.py) for the process entrypoint map.
Run `opensre` to sign in and get started. The first launch activates the hosted model.
```bash
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. See **[interactive shell commands](https://www.opensre.com/docs/getting-started/interactive-shell-commands)** for the full reference.
**Headless CLI** — run one agent turn non-interactively from a terminal, script, or CI job:
```bash
opensre ask "why is checkout-api slow?"
```
See **[Headless CLI](https://www.opensre.com/docs/guides/headless-cli)** for stdin prompts, JSON output, and tool approvals.
**From Python** — drive the agent in-process from your own code (source checkout required):
```python
from bootstrap.embedded import start_embedded_session
session = start_embedded_session()
result = session.chat("why is checkout-api slow?")
if result.answered:
print(result.primary_response_text)
```
See **[Python API](https://www.opensre.com/docs/guides/python-api)** for sessions, conversations, and custom output sinks.
**For your team's daily loop:** embed OpenSRE in the Python services and automations your teammates already use.
Start with the in-repo [Python API guide](docs/guides/python-api.mdx), then use it every day to make incident response repeatable.
Other useful commands:
```bash
opensre integrations setup
opensre update
opensre uninstall # remove opensre and all local data
```
---
## 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-image` then `make 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`, select `MODE`, and set `LLM_PROVIDER` plus its API key. Use `DATABASE_URL` only when the gateway needs shared Postgres-backed state, such as Slack Events API replicas.
**[Full deployment steps and prerequisites → DEPLOYMENT.md](DEPLOYMENT.md)**
---
## How OpenSRE Works
<img
src="https://github.com/user-attachments/assets/936ab1f2-9bda-438d-9897-e8e9cd98e335"
width="1064"
height="568"
alt="opensre-how-it-works-github"
/>
When a CI run fails, an alert arrives, or you ask a question, OpenSRE automatically:
1. **Fetches** the relevant context: failing checks and CI logs, recent commits and deploys, and correlated logs, metrics and traces
2. **Masks** sensitive identifiers (optional) before external LLM calls
3. **Reasons** across your connected systems to test hypotheses in a tool-calling loop, separating CI-caused failures from code-caused ones
4. **Answers** with an evidence-linked response in the conversation
5. **Fixes** the cause and pushes it to the PR branch for you to review, or suggests next steps and, optionally, executes remediation actions
6. **Posts** a summary directly to Slack, PagerDuty, or Telegram — no context switching needed
For the current code-level agent architecture after removing the old graph and chain
framework layers, see [AGENTS.md](AGENTS.md).
---
## 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.
| Category | Integrations | Roadmap |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **AI / LLM Providers** | Anthropic · OpenAI · OpenAI Codex · Ollama · Google Gemini · OpenRouter · TrustedRouter · NVIDIA NIM · Bedrock | |
| **Observability** | <img src="docs/assets/icons/grafana.webp" width="16"> Grafana (Loki · Mimir · Tempo · annotations) · <img src="docs/assets/icons/datadog.svg" width="16"> Datadog · Honeycomb · Coralogix · <img src="docs/assets/icons/groundcover.webp" width="16"> groundcover · <img src="docs/assets/icons/cloudwatch.png" width="16"> CloudWatch · <img src="docs/assets/icons/sentry.png" width="16"> Sentry · Elasticsearch · Better Stack · Splunk · Victoria Logs · SignOz · OpenObserve · OpenSearch · Azure Monitor · New Relic | |
| **Infrastructure** | <img src="docs/assets/icons/kubernetes.png" width="16"> Kubernetes · <img src="docs/assets/icons/aws.png" width="16"> AWS (S3 · Lambda · EKS · EC2 · CloudTrail · Bedrock) · <img src="docs/assets/icons/azure.png" width="16"> Azure · ArgoCD · Helm | |
| **Database** | MongoDB · ClickHouse · PostgreSQL · MySQL · MariaDB · MongoDB Atlas · Azure SQL · Snowflake · Redis · RDS · Supabase | |
| **Data Platform** | Apache Airflow · Apache Kafka · Prefect · RabbitMQ · Dagster · Temporal | |
| **Dev Tools** | <img src="docs/assets/icons/github.webp" width="16"> GitHub · GitHub MCP · Bitbucket · GitLab · Jenkins | |
| **Incident Management** | <img src="docs/assets/icons/pagerduty.png" width="16"> PagerDuty · Jira · Alertmanager · incident.io · ServiceNow · Trello (client helpers only) | [Linear](https://github.com/Tracer-Cloud/opensre/issues/124) |
| **Communication** | <img src="docs/assets/icons/slack.png" width="16"> Slack · Google Docs · Discord · Telegram · <img src="docs/assets/icons/rocketchat.png" width="16"> Rocket.Chat · WhatsApp · Buzz | [Notion](https://github.com/Tracer-Cloud/opensre/issues/286) · [Teams](https://github.com/Tracer-Cloud/opensre/issues/138) · [Confluence](https://github.com/Tracer-Cloud/opensre/issues/313) |
| **Agent Deployment** | <img src="docs/assets/icons/vercel.png" width="16"> Vercel · <img src="docs/assets/icons/aws.png" width="16"> EC2 · <img src="docs/assets/icons/aws.png" width="16"> ECS · Railway | |
| **Protocols** | <img src="docs/assets/icons/mcp.svg" width="16"> MCP | |
OpenSRE is community-built. Looking for a safe first contribution? Browse [`good first issue`](https://github.com/Tracer-Cloud/opensre/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tickets or see the [Good First Issues guide](docs/good-first-issues/README.md). See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the full workflow.
**Local environment:** **[SETUP.md](SETUP.md)** (all platforms, Windows, MCP).
**Developing in this repo:** **[docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)** (install from source, CI parity checks, dev container, deployment detail, telemetry reference).
<p>
<a href="https://discord.gg/7NTpevXf7w">
<img src="https://img.shields.io/badge/Join%20our%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord" />
</a>
</p>
<p align="center">
<a href="https://www.star-history.com/?type=date&repos=Tracer-Cloud%2Fopensre">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Tracer-Cloud/opensre&type=date&theme=dark&legend=top-left&sealed_token=LHlhQArnQVcZZDuHHjU19dJHIIzQx9WzB2xacqhOnA8REEAfcVO94FgGmjAMsR8iiPA3ELR-RmF_t2rtnLLj6ieZt6S4PGbFZ5Ev1HgIrg8KJNkJDYQob_BcV8MtWc2wQnahPyKX6B9PgqvoQxI7E6B6SkW7gXQEq1xLLGDZ2JHvv5b3kr7SYnUpq98y" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Tracer-Cloud/opensre&type=date&legend=top-left&sealed_token=LHlhQArnQVcZZDuHHjU19dJHIIzQx9WzB2xacqhOnA8REEAfcVO94FgGmjAMsR8iiPA3ELR-RmF_t2rtnLLj6ieZt6S4PGbFZ5Ev1HgIrg8KJNkJDYQob_BcV8MtWc2wQnahPyKX6B9PgqvoQxI7E6B6SkW7gXQEq1xLLGDZ2JHvv5b3kr7SYnUpq98y" />
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Tracer-Cloud/opensre&type=date&legend=top-left&sealed_token=LHlhQArnQVcZZDuHHjU19dJHIIzQx9WzB2xacqhOnA8REEAfcVO94FgGmjAMsR8iiPA3ELR-RmF_t2rtnLLj6ieZt6S4PGbFZ5Ev1HgIrg8KJNkJDYQob_BcV8MtWc2wQnahPyKX6B9PgqvoQxI7E6B6SkW7gXQEq1xLLGDZ2JHvv5b3kr7SYnUpq98y" />
</picture>
</a>
</p>
Thanks goes to these amazing people:
<!-- readme: contributors -start -->
<a href="https://github.com/Tracer-Cloud/opensre/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Tracer-Cloud/opensre&max=200" alt="Contributors" />
</a>
<!-- readme: contributors -end -->
---
## 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. See **[SECURITY.md](SECURITY.md)** for responsible disclosure.
---
## Telemetry
First-party product analytics and Sentry (errors) are **opt-out**. Quick disable:
```bash
export OPENSRE_NO_TELEMETRY=1
```
**[Full matrix, DSN override, and local event logging → docs/DEVELOPMENT.md](docs/DEVELOPMENT.md#telemetry-and-privacy)**
---
## License
Apache 2.0 — see [LICENSE](LICENSE).
## Citations
<sup>1</sup> https://arxiv.org/abs/2310.06770