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.
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:
- 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.
- 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.
- One engine, three interfaces. A single
AnalysisEnginepowers the CLI, the Python SDK, and the REST API. There is no duplicated business logic. See Architecture.
pip install devops-ai-toolkit # core: CLI + SDK, fully offline
pip install 'devops-ai-toolkit[api]' # add the FastAPI REST serverFull options (including uv for development) are in Installation.
# 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 -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}")devops-ai serve --port 8000
curl -s localhost:8000/analyze/log \
-H 'content-type: application/json' \
-d '{"content": "Back-off restarting failed container"}' | jq .summaryEverything 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 --enrichSee AI providers and Configuration.
- Quickstart — a guided first run across all three interfaces
- CLI guide / SDK guide / REST API guide
- Output format — understand every field you get back
- Use cases — apply it to real incidents
Need a hosted assistant instead of self-hosting? Try the AI incident-response assistant.