PoC of an Autonomous Kubernetes monitoring and remediation agent powered by LLMs (Claude, GPT, Gemini, Ollama).
Detects K8s incidents → diagnoses root cause → acts (with your approval) → notifies you via Telegram.
Claw8s uses a hybrid intelligence model that combines deterministic Skills with an open-ended agentic Soul and historical memory.
graph TD
Watcher[K8s Watcher + Stale Scanner] -->|Incident| Queue[Asyncio Queue]
Queue -->|Process| Manager[Main Loop]
Manager -->|Incident| Skills[Skill Runner - YAML]
Skills -->|Inconclusive| Soul[The Soul - Agentic Loop]
Soul -->|Historical Context| Audit[(Audit Log - SQLite)]
Soul -->|Remediation| Tools[Kubectl Tools]
Tools -->|Verification Loop| Manager
Manager -->|Alert/Approval| Telegram[Telegram Bot]
Telegram -->|Smart Reconfirm| Tools
- Smart Reconfirm: Every approval request includes a Reconfirm button that triggers a live Kubernetes health probe to verify if manual intervention has already fixed the issue.
- Wait for Rollout: Mandatory verification policy—incidents are only marked "Resolved" after new pods are confirmed
ReadyandAvailable. - Grouped Debouncing: Prevents alert flooding by grouping pod incidents at the Deployment level.
- Proactive Scanning: Sweeps for Scheduler-level failures every 30s.
Claw8s provides a powerful mobile interface for cluster management:
/status&/refresh: Get a namespace-aware breakdown of cluster health with live timestamps./history: View the last 10 incidents and their resolution paths./fix <instruction>: Commander Overdrive. Issue natural language instructions directly to the agent.- Example:
/fix scale web-app to 3 replicas - Example:
/fix change liveness probe to /healthz
- Example:
- Interactive Approvals: Review reasoning and confidence scores before approving destructive actions.
- Tier 1: Skills (Deterministic YAML)
Claw8s first matches incidents against Skills inskills/. Skills are YAML-defined runbooks that execute fixed investigation steps. They are fast, cheap, and predictable. - Tier 2: The Soul (Reasoning Loop)
If no skill matches or is inconclusive, the Agentic Loop takes over. Guided by the Soul (prompts/soul.md), it uses open-ended tool calling and Historical Memory to resolve novel incidents.
uv pip install -e .Edit .env with your ANTHROPIC_API_KEY and TELEGRAM_BOT_TOKEN.
python main.py --config config.yamlClaw8s will start the watcher, the Telegram bot, and the Dashboard on http://localhost:9090.
Claw8s is designed to adapt to your specific cluster and operational needs.
- LLM Configuration Guide: Detailed instructions for Anthropic, OpenAI, Gemini, and Ollama.
- Skills Authoring Guide: Learn how to write your own deterministic YAML runbooks.
- System Architecture: A deep dive into the "Soul vs. Skill" hierarchy and event flow.
agent.py: The reasoning loop and historical context layer.audit.py: Resilient SQLite audit log with WAL mode and high-concurrency timeouts.watcher.py: Event watcher with controller-aware grouping and proactive scanning.dashboard/: Integrated FastAPI dashboard and real-time analytics.skills/: YAML-defined runbooks for common incident types.tools/: Hardened K8s toolset with safety timeouts.
