Skip to main content

Self-healing supervision agent for Linux hosts and Kubernetes.

Project description

 ___ _ __   ___ _ __ ___
/ __| '_ \ / _ \ '__/ _ \
\__ \ |_) |  __/ | | (_) |
|___/ .__/ \___|_|  \___/
    |_|

Self-healing supervision agent for Linux hosts and Kubernetes.

Spero watches the things you run — processes, services, disks, workloads — notices when they break, and heals them under policy-governed autonomy. It sits between a single-host tool like Monit and a full Prometheus + Alertmanager + Ansible stack: lightweight, agent-based, cluster-aware, with an AI layer for prediction, root-cause, and policy-gated remediation.

Shipped under Altikva.

Status: pre-alpha, but the spine is complete. Spero supervises and heals Linux hosts (local + asyncssh) and Kubernetes (kubectl) through one engine, with an AI layer for prediction, root-cause, natural-language queries, and agentic (policy-gated) remediation. 91 tests, ruff + mypy clean.

Concepts

Spero is built on four seams so it spans hosts today and Kubernetes next without re-architecting:

Seam Question Examples
Provider where things run local, SSH host, Kubernetes
Probe how you know it is healthy process, systemd, port, disk, pod-ready
Remediation what to do about it restart, respawn, rotate, rollout, scale
Policy the declared intent YAML: target → probe → remediations + autonomy

Remediations carry an autonomy level — suggest, gated, or auto — so low-risk healing happens on its own while high-risk actions wait for a human.

Install

pip install spero            # or: uv pip install spero
pip install "spero[ai]"      # add the Claude-backed AI layer
pip install "spero[k8s]"     # add the Kubernetes provider deps

Quickstart

spero status                       # show targets from policies/example.yaml
spero run                          # run one supervision cycle
spero watch                        # supervise continuously (each target on its interval)
spero watch --ai-approve           # agentic: the model decides gated remediations
spero heal nginx                   # probe one target, walk its remediations interactively
spero ask "what flapped today?"    # natural-language query over the event history
spero serve                        # run the control-plane API on :8800

Data egress and privacy

With ANTHROPIC_API_KEY set, spero ask, spero diagnose, and --ai-approve send text to Anthropic's API: the question, target names, remediation params, and recorded event details (which can include command output). Event details are also stored in the local sqlite database. With no key, spero uses the NullLLM fallback and nothing leaves the host. To scrub likely secrets/PII from event text before it is sent to the model, set SPERO_REDACT_EVENTS=1 (best-effort; see src/spero/ai/redact.py). The control-plane endpoints that expose object YAML and pod logs are token-guarded; see deploy/k8s/README.md.

From source

git clone https://github.com/altikva/spero && cd spero
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest                             # run the suite

License

Spero is released under the ALTIKVA Dual License v1.0 (MIT and CC BY-NC-SA 4.0), SPDX MIT AND CC-BY-NC-SA-4.0. See LICENSE.

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

spero-0.4.0.tar.gz (319.6 kB view details)

Uploaded Source

Built Distribution

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

spero-0.4.0-py3-none-any.whl (91.2 kB view details)

Uploaded Python 3

File details

Details for the file spero-0.4.0.tar.gz.

File metadata

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

File hashes

Hashes for spero-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8cd216311a44242bec7e90d0902b72d4f62eaaa865d9f0a3532cbfc466868831
MD5 90b71b1f4bf07bdd61e97b1d934c6ddd
BLAKE2b-256 95b00eaf8cb9db9d6e8506c1136cbd6e084cff8acabd306ebaad5495b54d800f

See more details on using hashes here.

Provenance

The following attestation bundles were made for spero-0.4.0.tar.gz:

Publisher: release.yml on altikva/spero

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

File details

Details for the file spero-0.4.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for spero-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f091a29bc610204610e013eca46fba187bbef62b41010676c96748bc5f985b78
MD5 301c102a15dac91b3880dd424d2cf88b
BLAKE2b-256 0c8f4d3d187e8c0cf991573cde024d8941211cfce3b264a15ac81f7ddee84372

See more details on using hashes here.

Provenance

The following attestation bundles were made for spero-0.4.0-py3-none-any.whl:

Publisher: release.yml on altikva/spero

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