Vendor-agnostic, deterministic-first SDK for guarded incident recovery and response.
Project description
Lumis SDK
Deterministic-first, evidence-grounded incident recovery for data, ML, and software pipelines.
CI · Apache-2.0 · Architecture · Configuration · Cookbooks · Roadmap
Lumis SDK is an open-source Python implementation companion to the agentic recovery and incident response reference architecture proposed in the accompanying research. It provides reusable contracts and local reference adapters for diagnosing failures in data, machine-learning, and software-delivery pipelines while keeping models optional and consequential actions under explicit control.
Lumis SDK starts with Diagnosis-as-Code: bounded incident evidence becomes a structured, reviewable diagnosis, Markdown or JSON report, and operational-memory record. Its direction is Healing-as-Code: a guarded lifecycle for detect, triage, diagnose, plan, approve, remediate, verify, and learn.
Pre-alpha: Lumis SDK does not perform unrestricted or default production remediation. Current execution-related models are recommendation and verification contracts, not an authority granted to an LLM.
Research and implementation boundary
| Artefact | Role | Repository boundary |
|---|---|---|
| Reference architecture | Agentic recovery and incident response lifecycle. | Technology-flexible design described by the paper. |
| Lumis SDK | Apache-2.0 framework and local implementation companion. | Domain contracts, application services, ports, safe reference adapters, CLI, testkit, and cookbooks. |
Design principles
- Deterministic first. Known signatures and project rules run before optional model reasoning.
- Evidence grounded. Facts, evidence, hypotheses, confidence, contradictions, and missing evidence remain distinguishable.
- Model optional. The core works offline; provider integrations implement a narrow gateway port.
- Local first. SQLite and Markdown are inspectable defaults, not mandatory hosted services.
- Guarded recovery. Plans are allowlisted recommendations; approval and verification are explicit boundaries.
- Confirmed memory. Model output is never silently promoted into confirmed operational truth.
- Vendor agnostic. Domain and application packages import no observability, orchestration, cloud, or agent SDK.
Architecture
flowchart LR
subgraph USERS[Project entry points]
CLI[Lumis SDK CLI]
PY[Python application]
end
subgraph CORE[Lumis SDK framework]
CFG[Strict project and rule configuration]
APP[Application services]
DOMAIN[Domain contracts]
PORTS[Optional provider ports]
end
subgraph LOCAL[Local reference adapters]
DET[Deterministic diagnosis]
MEM[SQLite incident memory]
EVIDENCE[Bounded local JSON evidence]
REPORT[Markdown and JSON reports]
REDACT[Evidence redaction]
end
CLI --> CFG
CLI --> DET
CLI --> EVIDENCE
CLI --> MEM
CLI --> REPORT
PY --> APP
APP --> DOMAIN
APP --> PORTS
APP --> DET
CFG --> DET
EVIDENCE --> PORTS
REDACT --> PORTS
Canonical package boundaries:
src/lumis_sdk/
├── domain/ # strict vendor-neutral models
├── application/ # use-case orchestration
├── ports/ # replaceable provider interfaces
├── adapters/ # deterministic, SQLite, evidence, report, and local adapters
├── config/ # versioned strict configuration
├── cli/ # command composition
├── security/ # redaction and evidence-safety utilities
└── testkit/ # deterministic test doubles
The proof-of-concept flat modules have been removed. New code imports the explicit domain, application, port, adapter, configuration, and security packages shown above.
Read the architecture overview, SDK reference, and configuration reference.
The structured-rules API guide covers compound incident
fields, evidence, fixture testing, and migration from all_contains.
The evidence and JSON reports guide documents the
provider contract, bounded collection behavior, report schema, and reusable testkit.
Current capabilities
| Capability | Current behavior |
|---|---|
| Incident input | Local log normalization and typed vendor-neutral incident contracts. |
| Evidence collection | Async provider port, bounded collection service, safe failures, redaction, and a local JSON reference adapter. |
| Deterministic diagnosis | Legacy ordered text rules plus structured all/any/not rules with typed comparisons, required evidence, ranking, and candidate explanations. |
| Versioned configuration | Strict lumis.dev/v1alpha1 project and rule-set documents; unknown fields fail validation. |
| Reports | Deterministic Markdown or versioned JSON with facts, evidence, hypotheses, truth state, confidence, review requirement, and safety boundary. |
| Local memory | SQLite records, human resolutions, visible truth state, and transparent lexical search. |
| Model boundary | Explicit policy, budgets, schema-validated output, fake CI gateway, and deterministic fallback. |
| Guarded lifecycle | Context, policy, approval, verification, and audit ports with no core action executor. |
| CLI | Initialization, diagnosis, doctor, rule validation, reports, resolution, and memory search. |
| Cookbooks | Synthetic data, ML regression, and software-delivery investigations with optional Agno/OpenRouter paths. |
Quick start
Lumis SDK supports Python 3.11+ and uses uv.
git clone https://github.com/soloshun/lumis-sdk.git
cd lumis-sdk
uv sync --all-groups
uv run lumis --help
Install Lumis SDK
Lumis SDK is published to PyPI as lumis-sdk. Add it to a project managed by uv:
uv add "lumis-sdk>=0.0.1,<0.1.0"
Or install it into an existing environment with pip:
pip install lumis-sdk
For a specific reproducible release, pin the version:
uv add "lumis-sdk==0.0.3"
pip install "lumis-sdk==0.0.3"
The repository's GitHub Actions workflow publishes reviewed releases through PyPI Trusted Publishing.
Run the local deterministic example:
uv run lumis doctor \
--config cookbook/simple-log-diagnosis/lumis/lumis.yml
uv run lumis diagnose \
--config cookbook/simple-log-diagnosis/lumis/lumis.yml
The command reads a synthetic local log, writes a Markdown report, saves an unconfirmed incident episode to local SQLite, and prints its incident ID. It makes no network or model call.
uv run lumis report <incident-id> \
--config cookbook/simple-log-diagnosis/lumis/lumis.yml
uv run lumis resolve <incident-id> \
--resolution "Human-confirmed cause, action, and outcome." \
--config cookbook/simple-log-diagnosis/lumis/lumis.yml
uv run lumis memory search "KeyError Close" \
--config cookbook/simple-log-diagnosis/lumis/lumis.yml
Versioned project configuration
apiVersion: lumis.dev/v1alpha1
kind: Project
metadata:
name: customer-pipeline
spec:
environment: local
memory:
provider: sqlite
path: .lumis/incidents.db
reports:
provider: markdown
outputDir: .lumis/reports
incidentSources:
- provider: local-log
path: logs/latest-failure.log
evidenceProviders:
- provider: local-json
path: evidence/schema-diff.json
kinds: [schema-diff]
maxItems: 20
maxTotalCharacters: 50000
rules:
files: [rules.yml]
model:
enabled: false
Configuration is strict: misspelled or unknown fields fail with a validation error. Relative paths resolve from the project document. Files larger than the configured safety limit are rejected. Checked schemas for the project, rule set, structured diagnosis rule, and JSON diagnosis report support editors and tooling.
Lumis SDK intentionally accepts only the versioned project and rule-set structures during this pre-release revamp. Read the configuration reference for every field and its meaning.
CLI
lumis init
lumis doctor
lumis diagnose
lumis report
lumis resolve
lumis memory search
lumis rules validate
lumis rules test
doctor and validation commands do not make network calls or write incident state. Model assistance remains disabled unless application code supplies both an enabled policy and a gateway adapter.
Python API
import asyncio
from pathlib import Path
from lumis_sdk.application import DiagnosisService
from lumis_sdk.config import load_config
from lumis_sdk.domain import IncidentInput
config = load_config(Path("lumis.yml"))
service = DiagnosisService(rules=config.rules)
incident = IncidentInput(
source_tool="local-log",
pipeline_name=config.project,
raw_payload={"log": "ERROR KeyError: Close"},
)
diagnosis = asyncio.run(service.diagnose(incident))
Cookbooks
- Simple local diagnosis
- Data pipeline investigation
- ML regression monitoring
- Software-delivery CI investigation
- Structured rule evaluation
- Evidence collection and JSON reporting
- Recording a human resolution
Start with a cookbook for a runnable demonstration, then use the architecture and core references above to examine the framework contracts behind it. All examples are synthetic, executable research demonstrations: they show how a consuming application can use Lumis SDK without claiming to be production control planes or autonomous remediation systems. Agent frameworks and model providers remain cookbook-only optional dependencies.
Safety
Lumis SDK treats logs, tickets, runbooks, source files, and model output as untrusted input.
- No direct shell, cloud-admin, Kubernetes-admin, or database actuation in core.
- No live model key or billable request in CI.
- No telemetry export by default.
- Bounded configuration and log reads.
- Conservative redaction before optional model use.
- Model output remains an unconfirmed hypothesis until a human or verifier confirms it.
- Execution capability requires a future RFC, allowlisted typed actions, policy, approval, audit, limits, and verification.
Read the threat model and security policy.
Development
uv sync --all-groups
uv run ruff format --check .
uv run ruff check .
uv run mypy src
uv run python scripts/generate_config_schema.py --check
uv run pytest
uv build
See CONTRIBUTING.md, GOVERNANCE.md, SUPPORT.md, CHANGELOG.md, and ROADMAP.md.
Releases
Lumis SDK releases are manually dispatched through GitHub Actions and published with PyPI Trusted Publishing.
Research and standards context
Lumis SDK is informed by OpenTelemetry, OpenLineage, Prometheus, Site Reliability Engineering, ReAct, and LLM-based incident RCA research. These are design influences, not mandatory dependencies or claims of conformance.
Maintainer and license
Lumis SDK is currently maintained by Solomon Eshun and licensed under Apache License 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lumis_sdk-0.0.3.tar.gz.
File metadata
- Download URL: lumis_sdk-0.0.3.tar.gz
- Upload date:
- Size: 232.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
916578ff54352acbdbdb4fbd13108b4577d8271ebd7ea158e8e66b5810f5ed62
|
|
| MD5 |
95c45e605a5627118588e6e7728a43bf
|
|
| BLAKE2b-256 |
17dfef09ecd84ca4cf165ecba81242eb0504fe36feb0ae937b82d7df7493650d
|
Provenance
The following attestation bundles were made for lumis_sdk-0.0.3.tar.gz:
Publisher:
release.yml on soloshun/lumis-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumis_sdk-0.0.3.tar.gz -
Subject digest:
916578ff54352acbdbdb4fbd13108b4577d8271ebd7ea158e8e66b5810f5ed62 - Sigstore transparency entry: 2184876438
- Sigstore integration time:
-
Permalink:
soloshun/lumis-sdk@45963d936420470b9c9a2fb2d12918999f191d64 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/soloshun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@45963d936420470b9c9a2fb2d12918999f191d64 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file lumis_sdk-0.0.3-py3-none-any.whl.
File metadata
- Download URL: lumis_sdk-0.0.3-py3-none-any.whl
- Upload date:
- Size: 49.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
736501b3ab6c43206e3b08821f6882f1e2b67d8a4e18d7e741a9680be8c78152
|
|
| MD5 |
6c1caa9b810ac28aed6a9753dcdb2f38
|
|
| BLAKE2b-256 |
daefb1839529f2a056da45e7262cb97b226979f546db9db23c8fad3e3dcdaac0
|
Provenance
The following attestation bundles were made for lumis_sdk-0.0.3-py3-none-any.whl:
Publisher:
release.yml on soloshun/lumis-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lumis_sdk-0.0.3-py3-none-any.whl -
Subject digest:
736501b3ab6c43206e3b08821f6882f1e2b67d8a4e18d7e741a9680be8c78152 - Sigstore transparency entry: 2184876683
- Sigstore integration time:
-
Permalink:
soloshun/lumis-sdk@45963d936420470b9c9a2fb2d12918999f191d64 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/soloshun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@45963d936420470b9c9a2fb2d12918999f191d64 -
Trigger Event:
workflow_dispatch
-
Statement type: