Metadata-Version: 2.4
Name: sre-core
Version: 0.1.0
Summary: Reusable core for hosted, multi-tenant SRE agents built on OpenSRE
Author: CEF AI
License-Expression: Apache-2.0
Project-URL: Repository, https://github.com/CEF-AI/sre-agent
Project-URL: Issues, https://github.com/CEF-AI/sre-agent/issues
Keywords: sre,observability,incident-response,agent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: fastapi
Requires-Dist: uvicorn[standard]
Requires-Dist: pyyaml

# sre-core

Reusable core for hosted, multi-tenant SRE agents built on [OpenSRE](https://github.com/Tracer-Cloud/opensre).

You bring a config, some markdown and some YAML. It brings the API, the UI, the investigation
queue, auth, memory, scheduling and knowledge loading. A deployment's `app.py` is typically a
dozen lines.

## Install

Two steps, and the order matters:

```bash
pip install https://github.com/Tracer-Cloud/opensre/releases/download/v0.1.2026.8.5/opensre-0.1.2026.8.5-py3-none-any.whl
pip install sre-core
```

**Why OpenSRE is installed separately.** `sre-core` cannot declare it as a dependency: PyPI rejects
direct URL requirements, and OpenSRE's own PyPI listing holds a single release from April while the
project ships to GitHub releases daily. Depending on the published name would pin you months behind.

The version `sre-core` is verified against is `sre_core.bootstrap.REQUIRED_OPENSRE`, and the exact
wheel URL is `sre_core.bootstrap.OPENSRE_WHEEL` — import them rather than copying the string. If
OpenSRE is missing, startup fails with that command rather than an obscure `ImportError`.

## Minimal deployment

```python
# app.py
import os
from pathlib import Path

from sre_core.app import create_app
from sre_core.config import from_env

HERE = Path(__file__).parent

app = create_app(
    from_env("SRE").replace(
        knowledge_dir=Path(os.environ.get("SRE_KNOWLEDGE_DIR", HERE / "knowledge")),
        schedules_dir=Path(os.environ.get("SRE_SCHEDULES_DIR", HERE / "schedules")),
    )
)
```

```bash
uvicorn app:app --port 8080
```

Alongside it:

```
knowledge/            markdown the agent reads
  index.yaml          every key is a scope; `default` is loaded on every run
  architecture.md
  my-service.md
schedules/            YAML checks it runs unprompted
  platform.yaml
```

Starting templates ship inside the package at `sre_core/templates/`, laid out to mirror the above.

## What it is not

It knows nothing about any particular platform — no service names, no namespaces, no vendors.
`tests/test_core_is_generic.py` enforces that by parsing the source, because a core that quietly
learns one deployment's vocabulary stops being reusable for the next.

It is also **not a fork of OpenSRE**. It imports only symbols in an OpenSRE module's `__all__`, and
`tests/test_opensre_public_api.py` fails the build when an upgrade renames one — which matters,
because OpenSRE ships a release every day.

## Documentation

Configuration, environment variables and integration setup: `DEPLOYMENT.md` in the repository.
Guidance on writing knowledge and schedules well — what belongs in a scope, and why cadence is a
capacity decision rather than a preference — lives with the teams using it.

## Licence

Apache-2.0.

Maintainers: `core/CLAUDE.md` covers how a release is cut, who installs this from where,
and the conditions under which core moves to its own repository.
