OpenSRE: Open-Source AI Agent for CI/CD Reliability
What OpenSRE is
OpenSRE is an Apache-2.0, Python command-line agent from Tracer Cloud that investigates failed CI runs and production incidents, then proposes or pushes a fix. The GitHub description is short: "The open-source agent for CI/CD reliability." The README spells out the problem it is aimed at: "Your CI tells you it broke, but not why or how to fix it." OpenSRE reads the failed run, traces the cause and, in the README's words, "pushes a fix for you to review", running "self-hosted, with your own models".
The pitch rests on a common pattern in teams that ship a lot of code. When a pipeline goes red, someone hits re-run, flaky checks pile up, the default branch stays broken and the real investigation waits for whichever senior engineer has time. OpenSRE tries to do that investigation automatically. The README lists four outcomes: recover from red builds faster, separate CI-caused failures from code-caused ones so the right thing gets fixed, measure what unreliable CI costs (failure rate, developer hours lost, how long main stays red), and give every engineer the same depth of analysis.
The project did not start as a CI tool, and that history is still visible. The PyPI metadata in the wheel describes an "Open-source SRE agent for automated incident investigation and root cause analysis", and the FAQ calls OpenSRE "an open-source framework for AI SRE agents that answer questions about production systems". The README keeps that scope under a "Not just CI/CD" heading: the same agent can be pointed at EKS, EC2, CloudWatch, Kubernetes, Grafana (Loki, Mimir/PromQL, Tempo), Alertmanager, Datadog, Slack and GitHub, and asked about an incident in plain language. So the product is best understood as a general SRE agent whose headline workflow is now CI/CD repair.
The audience is platform, DevOps and SRE engineers who own pipelines or on-call rotations, and team leads who want numbers on how much time flaky CI is costing. The project is labelled Public Alpha in the README and in the CLI banner: "core workflows are usable, and APIs and integrations may still change." This page is based on the README, fourteen documentation pages and SECURITY.md from the repository, the repository tree, the GitHub API metadata and release list, PyPI metadata, and a hands-on session with the official release wheel that did not use any LLM key or cloud account.
How OpenSRE works
The investigation loop
The README describes the same sequence whether the trigger is a failed CI run, an incoming alert or a question typed into the shell:
- Fetch the relevant context: failing checks and CI logs, recent commits and deploys, and correlated logs, metrics and traces.
- Mask sensitive identifiers (optional) before external LLM calls.
- Reason across connected systems in a tool-calling loop, testing hypotheses and separating CI-caused failures from code-caused ones.
- Answer with an evidence-linked response.
- Fix the cause and push it to the PR branch for review, or suggest next steps and optionally run remediation actions.
- Post a summary to Slack, PagerDuty or Telegram.
Under the hood this is a ReAct-style agent. The architecture document describes core.agent.Agent as "the think → call tools → observe loop", run under a context budget, with tools dispatched through a runtime registry. During the hands-on test the agent's operations log recorded a loop with max_iterations of 64 and an initial catalogue of 16 tools, including read_file, search_files, list_files, apply_patch, shell_run, cli_exec, tool_search, scan_local_git_workspace, analyze_local_repositories and analyze_github_ci_reliability. The presence of tool_search suggests further tools are surfaced on demand rather than all sent to the model up front.
Code layout
The repository is a single Python project split into seven first-party packages in four tiers, with dependency rules enforced in CI through make check-imports and an .importlinter file:
| Tier | Packages | Role |
|---|---|---|
| 1 | surfaces, gateway | Entry points: the stateless opensre <command> CLI, the interactive shell, and a messaging gateway for Telegram, Slack, Discord and Buzz plus a FastAPI web surface for health and alert intake |
| 2 | tools, integrations | Vendor-neutral agent tools, and one folder per vendor with config, verification, API clients and vendor-owned tools |
| 3 | core, infrastructure | The agent runtime, LLM clients and session handling; guardrails, masking, sandbox, analytics, auth, scheduler and a shared turn runner |
| 4 | config | Constants, prompts and UI theme, importing nothing first-party |
One detail matters operationally: the interactive shell and every gateway transport run turns through the same TurnRunner, which the architecture document says exists "so the two entry paths cannot drift". A question asked in Slack and one asked in the terminal go through the same harness, guardrails and masking.
Where it runs and which model it uses
There are three ways to supply a model. Signing in to an OpenSRE account "activates the hosted model, so you need no LLM key". On a machine that is not signed in, LLM_PROVIDER plus the provider's key selects a bring-your-own model; the environment-variable reference gives anthropic as the default provider, and the README lists Anthropic, OpenAI, OpenAI Codex, Ollama, Google Gemini, OpenRouter, TrustedRouter, NVIDIA NIM and Bedrock. For local models, opensre onboard local_llm is described in its own help text as "Zero-config local LLM setup via Ollama. No API key required", and the default OLLAMA_MODEL is llama3.2.
Deployment options, per the README and docs, are the local CLI, an OpenSRE Cloud managed gateway that an organisation admin provisions in the web app, an EC2 image path for a Telegram-only gateway, and a self-hosted container on Railway, ECS or Vercel built from the repository Dockerfile in web, gateway or scheduler mode.
Key features
- CI reliability report. A 30-day analysis of one repository's GitHub Actions history: failure rate, CI-caused versus code-caused failures, developer hours lost and red time on the default branch. Read-only, runs on your machine.
- Fix failing checks on a PR. Reads the failing checks and logs of one PR or branch, applies a fix with a coding agent, pushes to the PR branch and waits for the new checks. The docs say it refuses pull requests opened from forks and never pushes directly to a protected branch such as
main. - Bounded repair loop. Watches one pull request, triggering every 30 seconds while active, with at most three failed repair attempts and a ten-minute budget from scheduling, then stops on its own.
- Scheduled reliability agent. Repeats the report for the last 7 days every weekday at 08:00 local time and drops it in the shell inbox (
/loops messages);/loops service installkeeps it running via launchd or systemd after the terminal closes. - Health scan. One read-only scan across every repository a token can see, listing which PRs and branches are failing and on which checks.
- Incident investigation. The README claims 60+ integrations across observability (Grafana, Datadog, Honeycomb, Sentry, CloudWatch, Splunk, New Relic and others), infrastructure (Kubernetes, AWS, Azure, Argo CD, Helm), databases, data platforms, dev tools and incident management.
- Headless mode.
opensre askruns one agent turn from a script or CI job, with JSON output, resumable sessions, documented exit codes and per-invocation tool approvals. - Guardrails. Regex and keyword rules applied to every LLM request that can redact, block or audit matches, with an audit log at
~/.opensre/guardrail_audit.jsonl. - Reversible masking. Hides pods, hosts and account IDs from external models and restores them in the answer; off by default (
OPENSRE_MASK_ENABLED=false). - Python API.
surfaces.embedded.start_embedded_sessiondrives the agent in-process from your own code. - Messaging and scheduling. Slack, Discord, Telegram and other delivery targets, plus cron-driven digests and recurring prompt loops.
Getting started
The README's install path for macOS and Linux is a script piped to bash, followed by starting the CLI:
curl -fsSL https://install.opensre.com | bash -s -- -gh
opensre
The quickstart and install pages in docs/ use a different flag, -dc, for the same step (see the discrepancies list below):
curl -fsSL https://install.opensre.com | bash -s -- -dc
The README says the installer "fetches the latest build from main without requiring sudo", and the quickstart notes that prebuilt Linux binaries need glibc 2.35 or newer (Ubuntu 22.04 or comparable). Each GitHub release also publishes a pinned form of the command, bash -s -- --release --version <version>, plus a pure-Python wheel and sdist; that wheel is what the hands-on below installed.
The first launch asks you to sign in or create an account, then offers a short menu (keep CI healthy automatically, analyse a repository's CI performance, or skip). The CI features need GitHub access:
opensre integrations setup github
The CI/CD overview suggests these first prompts in the shell, with your own repository substituted:
analyze Tracer-Cloud/opensre CI/CD performance for the last 30 days
how much developer time does flaky CI cost us
how many PRs and branches currently have failing CI across all my orgs?
fix failing checks on Tracer-Cloud/opensre#4597
From a script or a CI job, the read-only tasks run headless as they are:
opensre --json ask "how many PRs currently have failing CI in Tracer-Cloud?"
Tasks that push commits need an explicit, per-run tool approval because "a headless run has nobody to approve":
opensre ask --allowed-tool fix_github_pr_ci "fix failing checks on Tracer-Cloud/opensre#4597"
Guardrails are configured separately; the guardrails README's quick start is three commands:
opensre guardrails init
opensre guardrails test "my key is AKIAIOSFODNN7EXAMPLE"
opensre guardrails rules
For a container, the Docker guide builds the image from a clone and runs web mode with an env file holding the LLM keys:
docker build -t opensre:latest .
docker run --rm -p 8000:8000 --env-file .env opensre:latest
The guide notes that the image "does not pin an OpenSRE build: on start it installs the current main-channel build", so rebuilding the image does not change the application version.
Hands-on, 26 November 2026
Environment. A Linux x86_64 VM with 2 vCPUs and 7 GB of RAM, Python 3.13.18, and pip reaching PyPI through a proxy. The artefact was the official release asset opensre-0.1.2026.11.26-py3-none-any.whl from the v0.1.2026.11.26 GitHub release, installed into a fresh virtualenv. All commands ran with HOME pointed at an empty scratch directory and OPENSRE_NO_TELEMETRY=1 set. Not tested: signing in, the hosted model or any LLM call (no API key was entered), GitHub or any other integration, CI analysis, PR fixing, repair loops, the gateway, the Docker image, the install.sh script and the prebuilt binaries, the interactive shell in a real TTY, macOS and Windows, and network traffic (not audited).
1. The wheel and its install footprint
- Integrity. The wheel is 7,478,210 bytes and its SHA-256 (
893be79b…c7291d6) matched the digest GitHub lists for the release asset. - Contents. 3,926 archive entries, about 24.1 MB uncompressed. It installs eight top-level Python packages:
config,core,gateway,infrastructure,integrations,surfaces,testsandtools. Thetestspackage alone accounts for 1,426 entries. The console script isopensre = surfaces.entrypoint:main, andRequires-Pythonis>=3.12. - Dependencies. 43 runtime requirements (plus 30 more in a
devextra), includinglitellm,anthropic,openai,mcp,boto3,kubernetes,fastapi,discord.py,slack-sdk,pymongo,redis,clickhouse-connect,google-api-python-client,sentry-sdkand the OpenTelemetry SDK. pip resolved 136 distributions in total (including OpenSRE itself), for example litellm 1.109.5, anthropic 2.14.0, openai 3.60.0, boto3 1.44.12 and kubernetes 36.0.3.pip checkreported no broken requirements. - Time and size.
pip installof the local wheel took 30.9 seconds wall-clock on this VM, and the finished virtualenv occupied 570 MB on disk.
2. Version, help and diagnostics without credentials
| Command | Exit | Observed |
|---|---|---|
opensre --version | 0 | opensre, version 0.1.2026.11.26, in 0.13 s; other commands took about 1 to 3 s to start |
opensre version | 0 | Version, Python 3.13.18, OS linux (x86_64) |
opensre --help | 0 | 31 commands in three groups: getting started (setup, onboard, ask, doctor, health), everyday (login, model, config, integrations, gateway, cron, update) and more, including triage ("opt-in pilot"), guardrails, runbooks, knowledge, remote-sync and uninstall |
opensre with no TTY | 0 | Printed the Public Alpha banner, a landing page with "Skills (12)" and "CI/CD fixes (0)", and a quick-start command list instead of the shell |
opensre doctor | 0 | Python OK; .env not found; provider=anthropic, auth missing; integrations file not found; a warning that "network requests is unavailable in this environment"; version check failed with "GitHub API returned HTTP 403"; summary "4 warnings" |
opensre health | 0 | 60 integration checks, "0 passed | 60 missing | 0 failed", guardrails "not configured" |
opensre config | 0 | Provider : anthropic, ANTHROPIC_API_KEY: (none), with pointers to opensre login and opensre onboard |
opensre integrations list | 0 | "No integrations. Run: opensre integrations setup <service>…" |
opensre account status | 0 | "Not signed in" |
opensre credits | 1 | "Error: No OpenSRE account is signed in." |
One side observation from health: the first run reported "1 failed" and exited 1, because the sandbox happened to export AWS credentials and OpenSRE picked them up from the environment as an aws integration ("local env"), then failed its STS check through the proxy. With those variables unset, AWS showed as missing and the exit code was 0. In other words, OpenSRE will treat ambient cloud credentials as a configured integration, which is worth knowing on a shared CI runner. integrations setup accepts 49 service names, against the 60 services health checks.
3. Headless behaviour with no model configured
| Command | Exit | Observed |
|---|---|---|
opensre ask "why is checkout-api slow?" | 1 | "No API key is set for anthropic. Run opensre login anthropic to add one, or opensre onboard to rerun setup. To use the OpenSRE-hosted model instead, sign in with opensre account login." About 1 s |
Same with --json before ask | 1 | One JSON object with status: "error", empty response, session_id: null, empty questions and denied_tools, and error.message carrying the text above (suggestion was null) |
ask --allowed-tool not_a_real_tool | 2 | "Invalid value for --allowed-tool: unknown registered tool name(s): not_a_real_tool" |
ask --allowed-tool with each of fix_github_pr_ci, schedule_ci_reliability_loop, schedule_ci_repair_loop, apply_patch, shell_run, github_cli, read_file | 1 | All accepted as registered tool names; each run then stopped at the missing API key |
--allowed-tool together with --dangerously-bypass-approvals | error | "--allowed-tool cannot be combined with --dangerously-bypass-approvals", as the docs say |
ask -i with a 300-byte random binary file | 2 | "Context file … must be UTF-8 text" |
LLM_PROVIDER=ollama, no Ollama server running | 1 | "Ollama API failed: Connection error." The operations log shows the loop started with model llama3.2 and 16 tools before failing on its first iteration |
The no-key behaviour matches the headless CLI guide, which says ask "exits with status 1 before the agent runs and prints the command that fixes the setup". The exit-code split (1 for setup, 2 for bad arguments) is consistent with the documented table, which makes it practical to wire into CI without parsing text.
4. Guardrails
opensre guardrails init wrote a starter ~/.opensre/guardrails.yml with five rules: aws_access_key (redact), aws_secret_key (redact), credit_card (block), private_key (block) and generic_api_token (redact, for api_key=-style assignments). Running init a second time left the file alone, as documented. Dry runs with guardrails test:
my key is AKIAIOSFODNN7EXAMPLEprinted[REDACT] aws_access_keyand the outputmy key is [REDACTED:aws_access_key], exactly as in the README.- A 16-digit test card number printed
[BLOCK] credit_cardand "BLOCKED by: credit_card". - A
ghp_-style GitHub token printed "No matches found." The starter file has no GitHub token rule; the guardrails README lists one under "Common patterns" that you add yourself.
After init, opensre health reported "Guardrails: 5 rules active". Before it, guardrails test simply said no config was found; the docs state that without the file "all content passes through unchanged".
5. What it wrote to disk
After these runs the scratch ~/.opensre directory held anonymous_id, guardrails.yml, operations_log.jsonl, prompt_log.jsonl, a sessions/ folder and memory/MEMORY.md. The anonymous_id file was created even with OPENSRE_NO_TELEMETRY=1 set; whether anything is transmitted was not checked. prompt_log.jsonl had one line per ask attempt, recording the prompt text and the error response, even though no model was ever called. The environment-variable reference documents this as a local prompt log on by default, with OPENSRE_PROMPT_LOG_DISABLED=1 to turn it off and token-shape redaction on by default. On a shared machine, that log is the first thing to review.
Finally, from surfaces.embedded import start_embedded_session imported cleanly from the installed wheel, although the README says the Python API needs a source checkout. No session was started.
Use cases
- Quantifying flaky CI. A team lead who suspects CI is eating engineering time can run the 30-day report for one repository and get failure rate, hours lost and red time on
mainbefore deciding where to invest. Pipelines run with Jenkins are listed as an integration, but the CI analytics docs reviewed here are written around GitHub Actions. - Unblocking a red pull request. A developer asks it to fix failing checks on their PR; the agent reads logs, edits, pushes to the PR branch and waits for the rerun, within the repair loop's three-attempt, ten-minute limits.
- Fleet-wide CI triage. The read-only health scan lists every failing PR and branch across the organisations a token can see, with the failing checks, in one request.
- Incident first response. With Grafana, Prometheus-style metrics via Mimir/PromQL, Loki logs and Kubernetes connected, an alert or a typed question becomes a tool-calling investigation that correlates deploys with metrics and logs, then posts a summary to Slack.
- Scripted checks in pipelines.
opensre --json askwith its exit codes can run inside a CI job, for example to summarise why a deploy step failed, with mutating tools only enabled per run through--allowed-tool. - Embedding in internal tools. The Python API lets a team wrap the agent in its own service or chat bot, with the README pointing at a
primary_response_textresult and anaccounting_statuscheck for failed model calls.
How OpenSRE compares
The README does not name competitors, so the table below picks adjacent open-source tools a team might reach for instead: a Kubernetes-native agent framework, a general terminal coding agent pointed at a failing build, and a tool for reproducing GitHub Actions locally. Facts about the alternatives come from their READMEs; check each project before relying on a detail.
| OpenSRE | kagent | Codex CLI | act | |
|---|---|---|---|---|
| What it is | CLI agent for CI/CD repair and incident investigation | Framework for running AI agents as Kubernetes resources | General coding agent that runs locally | Runs GitHub Actions workflows locally in Docker |
| CI-specific features | 30-day reliability report, PR fix, repair loop, org-wide scan | None CI-specific in its README; agents defined in YAML with MCP tools (Kubernetes, Helm, Argo, Prometheus, Grafana and others) | None CI-specific in its README; can be asked to fix a build like any coding task | Reproduces workflows locally for fast feedback; no diagnosis |
| Uses an LLM | Yes: hosted model after sign-in, or your own provider, including Ollama | Yes: OpenAI, Azure OpenAI, Anthropic, Vertex AI, Ollama and others | Yes: ChatGPT plan sign-in or an API key | No |
| Where it runs | Laptop CLI, managed gateway, or self-hosted container | Inside a Kubernetes cluster | Local machine, IDE or desktop app | Local machine with Docker |
| Pushes changes | Yes, to the PR branch, behind approvals | Depends on the agent and tools you define | Not described in its README | No |
| Licence | Apache-2.0 | Apache-2.0 | Apache-2.0 | See the act repository |
In practice these overlap less than the table suggests. act answers "does this workflow pass on my machine" and pairs well with OpenSRE's "why did it fail on CI". kagent suits teams that want agents governed by Kubernetes RBAC and GitOps; OpenSRE suits teams that want a ready-made CI and incident workflow without running agents in-cluster. A general coding agent such as Codex CLI, Gemini CLI or OpenCode can fix a failing test when pointed at it, but does not fetch CI history, compute reliability metrics or run a bounded repair loop on its own. For containerised pipeline logic, Dagger is about making builds reproducible rather than diagnosing them. On the GitHub side, OpenSRE's Actions tools use GitHub MCP toolsets, the same protocol the GitHub MCP Server exposes.
Limits, trade-offs and things to know before adopting
- Alpha status and daily releases. The README says APIs and integrations "may evolve". Releases are cut daily (v0.1.2026.11.18 through v0.1.2026.11.26 were published on consecutive days), and the installer and Docker image follow
mainby default. Pin a release with the per-release install command or the wheel if you need repeatable behaviour. - Account-first onboarding. The documented path starts with signing in to an OpenSRE account, and the interactive shell "only opens for an active account". The quickstart also says the hosted model waits for a connected GitHub account. Fully self-hosted use relies on
LLM_PROVIDERplus a key, or Ollama, which works for headless and container modes; plan for that if you cannot use the hosted service. - Data leaves your network when you use an external model. CI logs, alert files attached with
-iand integration output go to the configured LLM provider. The headless guide says to review attachments for secrets. Masking is off by default, and guardrails do nothing until you createguardrails.yml; the starter rules do not cover GitHub tokens. - Telemetry and local logs. Product analytics and Sentry error reporting are opt-out (
OPENSRE_NO_TELEMETRY=1). Separately, a local prompt log is on by default. SECURITY.md also says that by creating an account or installing OpenSRE "you agree that we may occasionally contact you" about the product. - Write access is real. Fixing a PR needs Contents and Pull requests write access. The guardrails around that (fork PRs refused, no direct pushes to protected branches, approvals required, three attempts and ten minutes per loop) are documented, but
--dangerously-bypass-approvalsexists and the docs restrict it to trusted environments. - Heavy Python footprint. 136 installed distributions and 570 MB in a virtualenv here. The wheel also installs generic top-level package names such as
config,core,toolsandtests, which can clash with other code in the same environment. Install it in its own virtualenv, or use the standalone installer. - Ambient credentials are used. As the hands-on showed, AWS credentials in the environment are picked up automatically as an integration. On CI runners with broad cloud roles, scope what the process can see.
- No accuracy benchmark. The benchmark README states plainly that it reports duration, token usage and estimated cost on three synthetic scenarios, and does not report accuracy, false positives or false negatives. There are no published figures for how often fixes are correct.
- Platform notes. Prebuilt Linux binaries need glibc 2.35+, and Windows is supported through PowerShell, with WSL also mentioned. The release binaries are large (the linux-x64 tarball is about 159 MB), while the pure-Python wheel needs Python 3.12 or newer.
Source discrepancies found
- Installer flag. The README installs with
bash -s -- -gh; the quickstart, install, local-setup, Docker and FAQ pages use-dc; release notes use--release --version <version>. None of the reviewed pages explains what-ghor-dcdoes. - Demo menu letters. The FAQ and the local-setup page say to skip the demo with E; the quickstart and install pages show a menu where skipping is (C).
- Positioning. The README leads with CI/CD reliability; the FAQ and the package metadata still describe an SRE agent for production incidents and root cause analysis.
- Integration count. The README claims "60+ tools";
opensre healthchecked 60 services andintegrations setupaccepted 49 names in this build. - Benchmark section. The benchmark README says
make benchmarkupdates a## Benchmarksection between markers inREADME.md; the current README has no such section. - Python API. The README says the embedded API needs a source checkout, but the
surfaces.embeddedmodule imported from the release wheel. - PyPI. A package named
opensreexists on PyPI with project URLs pointing at this repository, but its only version is 2026.4.5. The README does not offerpip install; current builds come from the installer or GitHub release assets.
Project activity
Checked 26 November 2026: latest release v0.1.2026.11.26 (26 November 2026), 15,677 stars, licence Apache-2.0.
The Tracer-Cloud/opensre repository had 15,677 stars, 2,039 forks, 66 watchers and 39 open issues at the time of writing. GitHub reports Python as the main language and Apache-2.0 as the licence. The repository was created on 13 January 2026, develops on main, is not archived or a fork, and was last pushed on 26 November 2026. The release list shows one release a day: v0.1.2026.11.26 was published at 00:55 UTC on 26 November, and its changelog adds an apply_patch edit tool, file reading and searching without the shell, and batched tool calls with prompt caching. Each release ships a wheel, an sdist and prebuilt archives for macOS (arm64, x64), Linux (arm64, x64) and Windows (x64) with SHA-256 files. A rolling main-build pre-release also exists. The tree holds about 1,450 files under tests/, 177 Markdown and MDX documentation pages under docs/, an AGENTS.md repo map and a CLAUDE.md. Documentation is at opensre.com/docs and the homepage is opensre.com. Community support runs through Discord and GitHub Discussions, and security reports go to [email protected] rather than public issues, per SECURITY.md.
Enjoying this project?
Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.
Repository:https://github.com/Tracer-Cloud/opensre
GitHub - Tracer-Cloud/opensre: OpenSRE: Open-Source AI Agent for CI/CD Reliability
OpenSRE is an Apache-2.0 Python CLI agent that reads failed CI runs and incidents, traces the cause and pushes fixes for review. Architecture, CI repair loops, ...
github - tracer-cloud/opensre
Related Projects
FastAPI: Python Web Framework for Building APIs
Python API framework using type hints for validation, dependency injection and OpenAPI docs.
vLLM: High-Throughput LLM Inference and Serving Engine
Python engine for fast LLM inference and OpenAI-compatible serving, built around PagedAttention.
Uptime Kuma: Self-Hosted Uptime Monitoring Tool
Self-hosted uptime monitor with 90+ notification services, status pages and a WebSocket-driven web dashboard.
Maintain OpenSRE: Open-Source AI Agent for CI/CD Reliability? Add the badge to your README
Show that the project is featured on TechLogHub and send readers to this write-up.
[](https://techloghub.com/open-source/opensre?utm_source=techloghub_badge&utm_medium=referral&utm_campaign=readme)