Skip to main content

๐Ÿฅ AutoHeal AI

Autonomous Self-Healing Software Engine โ€” Install once, self-heal forever.

AutoHeal AI is a language-agnostic CLI tool that wraps any command, detects errors in real-time, and automatically diagnoses and fixes them using AI.

Python 3.11+ License: MIT


โœจ Features

  • ๐Ÿ” Real-time Error Detection โ€” Monitors stdout/stderr for errors across 8+ languages
  • ๐Ÿง  AI-Powered Diagnosis โ€” Uses LLM (GPT-4o, Claude, Gemini, Ollama) for root cause analysis
  • ๐Ÿ”ง Auto-Fix โ€” Restarts crashed processes, installs missing dependencies
  • ๐Ÿ’ก Smart Suggestions โ€” Generates code patches with diff preview (user-approved)
  • ๐Ÿ“š Learning Memory โ€” Remembers past errors and solutions for instant future fixes
  • ๐Ÿ”’ Safety-First โ€” Never auto-applies code changes; secrets redacted before LLM calls
  • ๐ŸŒ Language Agnostic โ€” Works with Python, Node.js, Go, Rust, Java, Ruby, PHP, and more

๐Ÿš€ Quick Start

Install

pip install autoheal-ai

Setup

# Initialize in your project
cd your-project/
autoheal init

# Set your LLM API key
autoheal config set llm.api_key sk-proj-your-key-here

# (Optional) Use a different provider
autoheal config set llm.provider anthropic  # or google, ollama

Run

# Monitor any command
autoheal run "python app.py"
autoheal run "npm start"
autoheal run "go run main.go"
autoheal run "cargo run"

๐Ÿ“– How It Works

You run:  autoheal run "python app.py"

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Sentinel    โ”‚โ”€โ”€โ”€โ”€>โ”‚   CECE   โ”‚โ”€โ”€โ”€โ”€>โ”‚ Diagnostics  โ”‚
โ”‚  (Detect)    โ”‚     โ”‚ (Context)โ”‚     โ”‚ (Root Cause) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                            โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Memory     โ”‚<โ”€โ”€โ”€โ”€โ”‚ Harness  โ”‚<โ”€โ”€โ”€โ”€โ”‚  Resolution  โ”‚
โ”‚   (Learn)    โ”‚     โ”‚ (Safety) โ”‚     โ”‚    (Fix)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Sentinel watches your process output for errors
  2. CECE builds full context (source code, environment, dependencies)
  3. Diagnostics determines root cause via pattern matching + AI
  4. Resolution generates the appropriate fix
  5. Harness checks safety gates before applying
  6. Memory stores the resolution for future instant fixes

๐Ÿ›  CLI Commands

Command Description
autoheal init [path] Initialize AutoHeal in a project
autoheal run <command> Run and monitor a command
autoheal status Show error statistics
autoheal history [-n 20] Show fix history
autoheal config list Show all configuration
autoheal config set <key> <val> Set a config value
autoheal config get <key> Get a config value
autoheal diagnose <error> Manually diagnose an error
autoheal version Show version

โš™๏ธ Configuration

AutoHeal stores configuration in .autoheal/config.toml:

[llm]
provider = "openai"           # openai, anthropic, google, ollama
model = ""                    # Auto-selects best model per provider
api_key = "sk-proj-..."       # Your API key
temperature = 0.2

[resolution]
confidence_threshold = 0.75   # Min confidence for auto-fix
code_patch_threshold = 0.90   # Min confidence to suggest code patch
create_backup = true          # Git backup before patches

[general]
mode = "auto"                 # auto, suggest, manual
verbose = false

๐Ÿค– Supported LLM Providers

Provider Model Setup
OpenAI (default) GPT-4o autoheal config set llm.api_key sk-...
Anthropic Claude 3.5 Sonnet autoheal config set llm.provider anthropic
Google Gemini 2.0 Flash autoheal config set llm.provider google
Ollama (local) Llama 3.1 autoheal config set llm.provider ollama

๐Ÿ“ License

MIT License โ€” see LICENSE for details.

Download files

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

Source Distribution

autoheal_ai-0.1.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

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

autoheal_ai-0.1.0-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file autoheal_ai-0.1.0.tar.gz.

File metadata

  • Download URL: autoheal_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/25.5.0

File hashes

Hashes for autoheal_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd30fb67c291b20a0e8eab883ba8c206c263a874739cf12f3ba3ca443b86a375
MD5 db72c6678ee53390530794fd920599df
BLAKE2b-256 bc4f51372012500dd71cd5f6a19c219531fd43e86fc49dadb55d2be07834411f

See more details on using hashes here.

File details

Details for the file autoheal_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: autoheal_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/25.5.0

File hashes

Hashes for autoheal_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89c32bcf49e4b915966f7fc3900fc2a1c09a6d2a938c2c2af574ae4883f5f791
MD5 8d2ef830352b6c0f92071c961b34b7ff
BLAKE2b-256 1dcc5e1b7504ce426d40f650976ba39bd8a49b13a62df8eed3c7729049702636

See more details on using hashes here.

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