Skip to content

Latest commit

 

History

History
90 lines (64 loc) · 2.89 KB

File metadata and controls

90 lines (64 loc) · 2.89 KB

Getting started

This page gives you the mental model and a working first run in about five minutes. For deeper dives, follow the links to the dedicated guides.

What it is

The DevOps AI Toolkit reads operational text — container logs, Kubernetes manifests, Terraform files, command output, raw error strings — and returns ranked root causes, read-only diagnostic commands, suggested fixes, references, and prevention advice.

Three things make it different:

  1. Read-only. It never runs a command or changes infrastructure. Every diagnostic command it suggests is non-mutating, and fixes are described as guidance — never auto-applied. See Security.
  2. Offline-first and deterministic. A packaged knowledge base of YAML signatures powers the analysis with no API key required. The same input always yields the same result. See the Knowledge base.
  3. One engine, three interfaces. A single AnalysisEngine powers the CLI, the Python SDK, and the REST API. There is no duplicated business logic. See Architecture.

Install

pip install devops-ai-toolkit          # core: CLI + SDK, fully offline
pip install 'devops-ai-toolkit[api]'   # add the FastAPI REST server

Full options (including uv for development) are in Installation.

Your first analysis

CLI

# Analyze a file
devops-ai analyze nova.log

# Explain a known error by name
devops-ai explain CrashLoopBackOff

# Pipe in command output
kubectl get pods | devops-ai analyze -

Python SDK

from devops_ai_toolkit import AnalysisEngine

engine = AnalysisEngine()
result = engine.analyze_file("nova.log")

print(result.summary)
for cause in result.root_causes:
    print(f"[{cause.confidence_percent}%] {cause.title}")

REST API

devops-ai serve --port 8000
curl -s localhost:8000/analyze/log \
  -H 'content-type: application/json' \
  -d '{"content": "Back-off restarting failed container"}' | jq .summary

Optional: AI enrichment

Everything above works offline. To add an LLM-written narrative on top of the deterministic findings, configure a provider and pass --enrich (CLI) or enrich=True (SDK/API):

export DEVOPS_AI_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-...
devops-ai analyze nova.log --enrich

See AI providers and Configuration.

Where to go next

Need a hosted assistant instead of self-hosting? Try the AI incident-response assistant.