Skip to main content

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: local incident evidence becomes a structured, reviewable diagnosis, Markdown 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]
        REPORT[Markdown reports]
        REDACT[Evidence redaction]
    end

    CLI --> CFG
    CLI --> DET
    CLI --> MEM
    CLI --> REPORT
    PY --> APP
    APP --> DOMAIN
    APP --> PORTS
    APP --> DET
    CFG --> DET
    REDACT --> PORTS

Canonical package boundaries:

src/lumis_sdk/
├── domain/       # strict vendor-neutral models
├── application/  # use-case orchestration
├── ports/        # replaceable provider interfaces
├── adapters/     # deterministic, SQLite, Markdown, 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.

Current capabilities

Capability Current behavior
Incident input Local log normalization and typed vendor-neutral incident contracts.
Deterministic diagnosis Ordered rules with stable ID, version, priority, matched terms, and evidence references.
Versioned configuration Strict lumis.dev/v1alpha1 project and rule-set documents; unknown fields fail validation.
Reports Deterministic Markdown with facts, evidence, hypotheses, 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

The first Lumis SDK release will be published to PyPI as lumis-sdk. Once published, 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.1"
pip install "lumis-sdk==0.0.1"

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
  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 and rule set 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

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lumis_sdk-0.0.1.tar.gz (205.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lumis_sdk-0.0.1-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file lumis_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: lumis_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 205.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lumis_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ba0f39e330dfef7b61892d4dd1fe83e12e852c1d8c059a1a7383ab467f7d08c3
MD5 2b18f7e07e9597aa449a30e8ca7ce8f3
BLAKE2b-256 f8bbc9cd818388b16daa48b3d5ae0590682fe446c0da60a89b738cebbb1865c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for lumis_sdk-0.0.1.tar.gz:

Publisher: release.yml on soloshun/lumis-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lumis_sdk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: lumis_sdk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lumis_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6dcbd1fc645ac4e74e78357449270e63bc4ead8be394d0d016961b0f5eeb0407
MD5 bd90ef3da9d499bb930a21555eff5501
BLAKE2b-256 b81c8ba868ba9f188c8a06b96adcfa31e78927541246a68e34be033851b5c9c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for lumis_sdk-0.0.1-py3-none-any.whl:

Publisher: release.yml on soloshun/lumis-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page