Agent 开发框架

k8s4claw|Kubernetes AI Agent 运行与自愈 Operator

k8s4claw

一个把 AI Agent 以 Claw 自定义资源部署到 Kubernetes 上,并通过意图注解与规则化 reconciler 实现受控自愈的 Go Operator。

获取与使用

需要部署

按官方资料自行安装或部署

使用难度待核验
国内可用性待核验

2026-11-09 更新 · 本站尚未实测

项目介绍

Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测

k8s4claw 是一个用 Go 编写的 Kubernetes Operator,目标是把 AI Agent 运行在 Kubernetes 集群里,同时把大模型挡在集群写入路径之外。按 README 的表述,Agent 所使用的 ServiceAccount 无法直接 patch 工作负载对象;LLM 只能在 Claw 自定义资源上提交 ops-intent 注解,由 Go reconciler 校验意图的 JSON 结构是否落在 5 个动作的白名单内,并由它作为唯一组件去修改工作负载。

项目同时提供 claw4k8s 能力:ClawOpsController 监听 Pod 的 OOMKilled、CrashLoop、HighCPU、Evicted 等状态,按确定性规则自动执行低风险修复;新出现的问题则升级给 Companion Claw(LLM Agent)分析并给出方案,经 Slack 人工确认后再由同一个 reconciler 施加带签名的意图。README 说明自动执行路径会写入 Ed25519 审计回执,签名用于审计留痕而非授权,签名失败不会阻塞操作。

依据仓库元数据,该仓库为公开仓库,未归档,README 声明许可证为 Apache-2.0。

核心能力

点击能力名称查看输入、输出和原文依据。

  • 声明式生命周期:单个 Claw CRD 管理 StatefulSet、Service、ConfigMap、ServiceAccount、PDB、PVC、NetworkPolicy、Ingress、RBAC。
  • 意图注解 + 白名单:按 README 的架构设计,LLM 不直接改集群,只能在注解中提交意图,由 reconciler 按 5 个动作的白名单和 generation 幂等校验后执行。
  • 自动自愈:ClawOpsController 对常见故障按确定性规则自动处理(README 示例为 OOM 后提升内存);ClawOpsEscalation CRD 记录从 Pending 到 Executed 的工作流状态。
  • 审计回执:自动执行的动作用 Ed25519 生成审计回执,随 Kubernetes 审计日志一并使用。
  • 运行时注册:README 列出的 spec.runtime 取值包括 openclaw、hermesclaw、hermesrs、k8sops、custom;末尾带 claw 的名称是内部运行时类型枚举,README 称其为对上游项目的封装而非分叉。
  • IPC Bus:Pod 内消息总线,提供 WAL 至少一次投递、BoltDB 死信队列、环形缓冲背压,以及 WebSocket/TCP/UDS/SSE 协议桥接。
  • 自动更新与归档:按 cron 轮询 OCI 仓库、语义化版本约束过滤、健康校验发布与连续失败后的熔断回滚;支持 CSI VolumeSnapshot 与 S3 兼容归档边车。
  • 通信通道:ClawChannel CRD,内置 Slack、Discord、Webhook 边车。
  • 安全基线:Pod Security Standards 配置、默认拒绝的 NetworkPolicy、每实例独立 ServiceAccount 且关闭 token 自动挂载。
  • 自配置:ClawSelfConfig CRD 允许 Agent 在 allowedActions 白名单范围内修改自身技能、配置、工作区文件和环境变量,并有限速。
  • 可观测性与 SDK:Prometheus 指标、K8s Events、状态子资源;另提供 Go SDK。

实际应用场景

适用场景

适合已有 Kubernetes 集群、需要把 AI Agent 作为常驻服务运行并希望限制其集群权限的平台或 SRE 团队,例如:为多个 Agent 统一管理存储、密钥、通道与探针;让 Agent 在规则允许范围内处理自身的 OOM、崩溃循环等常见故障;对 Agent 发起的运维动作保留可审计记录。

如果只是想在本地试用对话模型,或没有 Kubernetes 运维经验,本项目的部署成本较高,可优先考虑更轻量的方案。README 中的对比表为项目自述定位,未包含第三方评测。

安装与接入

README 给出的前置条件为:Kubernetes 集群 v1.28+(本地可用 kind 或 minikube)、已配置 kubectl、从源码构建需要 Go 1.23+。

推荐方式是 Helm。README 说明使用 OCI 图表需要预先安装 cert-manager(因示例启用了 webhook.certManager)。原文命令如下:

helm install k8s4claw oci://ghcr.io/prismer-ai/charts/k8s4claw --version 0.2.1 \
  --namespace k8s4claw-system --create-namespace \
  --set webhook.certManager.enabled=true  # requires cert-manager pre-installed

也可克隆仓库后用本地 chart 安装,或使用 Make:make install 安装 CRD,make run 本地运行 Operator,make deploy 部署。

随后按原文创建 LLM 密钥 Secret(kubectl create secret generic llm-api-keys,含 ANTHROPIC_API_KEY、OPENAI_API_KEY),再编写 Claw 资源并 kubectl apply -f my-agent.yaml,用 kubectl get claw my-agent -w 观察启动。Slack 通道通过 ClawChannel 资源定义并引用。README 示例中的模型写为 claude-sonnet-4,属于示例值,实际可用模型与各运行时的支持范围待核验。

本次采集未获取到 MCP 配置与服务端配置文件(GitHub HTTP 404),README 中也未说明本项目提供 MCP 服务,因此不提供 MCP 接入参数。

使用条件与限制

是否需要部署
需自行准备运行环境,具体要求见正文
是否需要注册
账号和认证要求见正文;未明确说明的项目仍待核验
是否需要 API Key
待核验
费用与额度
费用边界见正文,项目许可不代表模型或托管服务免费
所需权限
待核验
许可证与服务条款
待核验

权限费用与限制

  • 权限:Agent 的 ServiceAccount 按设计不具备 patch 工作负载对象的权限;自愈动作由 Operator 的 reconciler 执行。安装 Operator 本身需要较高集群权限(CRD、RBAC、Webhook 等),具体清单以仓库 chart 为准。
  • 密钥与模型服务:需要自备模型提供方的 API Key,费用由模型服务商按其定价收取;README 未给出任何价格信息。
  • 外部依赖:使用 OCI 图表依赖 ghcr.io 镜像仓库,归档功能依赖 S3 兼容存储(README 列出 S3、MinIO、GCS、R2),通道依赖 Slack/Discord 等外部 API,自动更新依赖可访问的 OCI Registry。国内网络可达性待核验。
  • 限制:k8sops 运行时要求必须配置 NetworkPolicy;Webhook 会校验凭据、PVC 不可变性、运行时类型锁定;Ed25519 签名失败不影响执行,仅影响审计留痕。README 提到的 90 秒端到端自愈来自其演示说明,非本站实测。

国内使用情况

网友核验 用户经验分享

与站长实测独立,不代表官方认证或本站已实测。

我要核验
0 位参与者0 份有效分项记录

最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。

分项统计、有效期与样本量
核验项目有效人数成功 / 部分 / 失败 / 无法判断成功率最近核验 / 有效期
官方网站访问00 / 0 / 0 / 0样本不足暂无 / 7 天
GitHub 仓库访问00 / 0 / 0 / 0样本不足暂无 / 7 天
安装与运行00 / 0 / 0 / 0样本不足暂无 / 30 天
官方服务国内连接 / MCP 连接00 / 0 / 0 / 0样本不足暂无 / 30 天
国内网络情况00 / 0 / 0 / 0样本不足暂无 / 7 天
国内模型兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
自定义 API00 / 0 / 0 / 0样本不足暂无 / 30 天
海外服务依赖
00 / 0 / 0 / 0样本不足暂无 / 30 天
海外账号要求
00 / 0 / 0 / 0样本不足暂无 / 30 天
中文界面
00 / 0 / 0 / 0样本不足暂无 / 30 天
客户端兼容性00 / 0 / 0 / 0样本不足暂无 / 30 天
账号及费用信息
00 / 0 / 0 / 0样本不足暂无 / 30 天

成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。

最近有效核验

暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。

查看全部有效核验 →

国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。

官方网站访问
尚未实测 待核验
GitHub 仓库访问
尚未实测 待核验
官方服务国内连接
尚未实测 待核验
国内网络情况
尚未实测 待核验
国内模型兼容性
尚未实测 待核验
自定义 API
尚未实测 待核验
海外服务依赖
尚未实测 待核验
海外账号要求
尚未实测 待核验
中文界面
尚未实测 待核验
国内最后核验时间
尚未实测

许可与国内使用

仓库代码在 LICENSE 文件中声明为 Apache License 2.0。该许可只覆盖本仓库代码;README 提到的上游运行时(如 Hermes Agent、hermes-agent-rs)、第三方模型服务、容器镜像仓库与外部通道服务各有自己的许可与条款,需分别核验。开源许可不等于模型调用或云资源免费。

仓库未说明托管服务、商业模块或服务部署地域;域名与镜像仓库地址不代表服务部署地。国内网络环境下的镜像拉取、OCI 图表获取、模型 API 调用与 Slack/Discord 连通性均待核验,本项目是否针对国内环境做过适配亦无资料说明。

项目资料与来源

官方网站 ↗

GitHub 仓库 ↗

官方文档 ↗

字段依据与待核验事项

access:来源确认 · helm install k8s4claw oci://ghcr.io/prismer-ai/charts/k8s4claw --version 0.2.1

project_type:来源确认 · A Kubernetes operator for AI agents that keeps the LLM out of the cluster's write path.

原始 README(折叠技术参考)
# k8s4claw

[![CI](https://github.com/Prismer-AI/k8s4claw/actions/workflows/ci.yml/badge.svg)](https://github.com/Prismer-AI/k8s4claw/actions/workflows/ci.yml)
[![CodeQL](https://github.com/Prismer-AI/k8s4claw/actions/workflows/codeql.yml/badge.svg)](https://github.com/Prismer-AI/k8s4claw/actions/workflows/codeql.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/Prismer-AI/k8s4claw)](https://goreportcard.com/report/github.com/Prismer-AI/k8s4claw)
[![Release](https://img.shields.io/github/v/release/Prismer-AI/k8s4claw?sort=semver)](https://github.com/Prismer-AI/k8s4claw/releases)
[![Go Reference](https://pkg.go.dev/badge/github.com/Prismer-AI/k8s4claw.svg)](https://pkg.go.dev/github.com/Prismer-AI/k8s4claw)
[![License](https://img.shields.io/github/license/Prismer-AI/k8s4claw)](LICENSE)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Prismer-AI/k8s4claw?quickstart=1)

**A Kubernetes operator for AI agents that keeps the LLM out of the cluster's write path.** One CRD, any runtime (OpenClaw, NanoClaw, ZeroClaw, PicoClaw, IronClaw, HermesClaw, HermesRS, K8sOps), self-healing from day one.

## The core idea

k8s4claw keeps the LLM out of the cluster's write path. **The agent's ServiceAccount cannot patch workload objects.** The LLM can only submit an `ops-intent` annotation on a Claw CR; a Go reconciler validates the intent's JSON shape against a 5-action allowlist (plus generation guard) and is the only component that mutates workloads. The reconciler also writes an Ed25519 audit receipt when the action runs through the auto-execute path — the signature is for the audit trail, not for authorization, and is non-blocking if signing fails.

|                                  | LLMops tools with `kubectl` RBAC | **k8s4claw**                        |
| -------------------------------- | -------------------------------- | ----------------------------------- |
| Who mutates StatefulSets         | the LLM                          | the reconciler, never the LLM       |
| Blast radius if prompt-injected  | everything the SA can touch      | bounded by the intent allowlist     |
| Audit                            | kubectl audit logs               | Ed25519-signed receipts + K8s audit |

This is the main architectural distinction. Everything else (runtime registry, IPC bus, auto-update, archival) is infrastructure for running AI agents on K8s.

See [threat model](docs/security/threat-model.md) · [comparison](docs/marketing/comparison.md) · [claw4k8s design](docs/plans/2026-04-19-claw4k8s-design.md)

<p align="center">
  <img src="docs/marketing/media/demo.gif" alt="claw4k8s self-healing demo" width="800"/>
  <br/>
  <em>Real OOM → ClawOpsController detects → rule matched → intent applied by reconciler → Ed25519 audit receipt. 90 seconds, end to end.</em>
</p>

## Why k8s4claw?

Running AI agents in production means solving the same problems over and over: secret management, persistent storage, graceful updates, inter-service communication, and observability. k8s4claw wraps all of this into a single `Claw` CRD so you can focus on what your agent does, not how it runs.

On top of that, **claw4k8s** lets agents self-heal without ever granting the LLM direct cluster-mutation rights. Deterministic rules auto-fix common issues (OOM → bump memory); novel issues escalate to a Companion Claw that proposes a fix, routes to human approval via Slack, and only then is the signed intent applied — still through the same reconciler, still bounded by the same allowlist.

## How is this different?

| Capability                         | k8sgpt          | kubectl-ai      | Holmes (Robusta) | k8s4claw + claw4k8s       |
| ---------------------------------- | --------------- | --------------- | ---------------- | ------------------------- |
| **LLM has `kubectl` / patch RBAC** | —               | human approves  | **yes**          | **no (by design)**        |
| Diagnoses cluster issues           | ✓               | ✓               | ✓                | ✓                         |
| Fixes without human approval       | —               | —               | —                | ✓ (rule-based)            |
| Fixes with human approval          | —               | ✓               | ✓                | ✓ (LLM escalation)        |
| **Agents manage their own infra**  | —               | —               | —                | **✓**                     |
| Cryptographic audit trail          | —               | —               | —                | ✓ (Ed25519)               |
| Graceful LLM fallback              | —               | —               | partial          | ✓ (notification)          |
| Primary target                     | diagnostic CLI  | kubectl wrapper | SRE incidents    | AI agent self-management  |

**The wedge:** claw4k8s is the first K8s operator where AI agents manage their **own** infrastructure, with the LLM kept out of the write path by RBAC rather than by a review step. Dogfooding as the product. See [full comparison](docs/marketing/comparison.md) and [threat model](docs/security/threat-model.md).

## Architecture

```mermaid
graph TB
    subgraph "Kubernetes Cluster"
        OP[k8s4claw Operator]

        subgraph "Claw Pod"
            INIT["claw-init<br/>(config merge)"]
            RT["Runtime Container<br/>(OpenClaw / NanoClaw / ...)"]
            IPC["IPC Bus Sidecar<br/>(WAL + DLQ + backpressure)"]
            CH["Channel Sidecar<br/>(Slack / Webhook / ...)"]
            ARC["Archive Sidecar<br/>(S3 upload)"]
        end

        STS[StatefulSet]
        SVC[Service]
        CM[ConfigMap]
        SA[ServiceAccount]
        PDB[PodDisruptionBudget]
        PVC[(PVCs<br/>session / output / workspace)]
        SEC[/Secrets/]

        OP -->|manages| STS
        OP -->|manages| SVC
        OP -->|manages| CM
        OP -->|manages| SA
        OP -->|manages| PDB
        STS -->|creates| PVC

        STS -.->|runs| INIT
        STS -.->|runs| RT
        STS -.->|runs| IPC
        STS -.->|runs| CH
        STS -.->|runs| ARC

        CH <-->|"UDS<br/>bus.sock"| IPC
        IPC <-->|"WS / TCP / UDS / SSE"| RT
        RT -->|reads| CM
        RT -->|reads| SEC
        ARC -->|mounts| PVC
    end

    REG[(OCI Registry)]
    OBJ[(S3 / MinIO)]
    EXT["External Service<br/>(Slack API, etc.)"]

    OP -.->|"polls tags<br/>(auto-update)"| REG
    ARC -->|uploads| OBJ
    CH <-->|API calls| EXT
```

### IPC Bus Detail

The **IPC Bus** is a native sidecar that routes JSON messages between channel sidecars and the AI runtime:

```text
Channel Sidecar ──UDS──► IPC Bus ──Bridge──► Runtime Container
                        │  WAL  │
                        │  DLQ  │
                        │ Ring  │
                        │Buffer │
                        └───────┘
```

- **WAL** — append-only write-ahead log for at-least-once delivery
- **DLQ** — BoltDB dead letter queue for messages exceeding retry limits
- **Backpressure** — ring buffer with high/low watermark flow control
- **Bridge protocols** — WebSocket (OpenClaw), TCP (PicoClaw), UDS (NanoClaw), SSE (ZeroClaw)

## Supported Runtimes

The **Runtime** column shows the exact value to put in `spec.runtime` on a `Claw` CR. Names ending in `claw` are k8s4claw's internal runtime type enum — they are **wrappers around upstream projects**, not forks.

| `spec.runtime` | Language           | Upstream / Use Case                                                                                        | Gateway | Probe |
| -------------- | ------------------ | ---------------------------------------------------------------------------------------------------------- | ------- | ----- |
| `openclaw`     | Go                 | WebSocket AI gateway + Anthropic SDK (first-party, verified end-to-end)                                    | 18900   | HTTP  |
| `hermesclaw`   | Python             | NousResearch upstream Hermes Agent — build instructions in [runtimes/hermesclaw/](runtimes/hermesclaw/README.md) | 8642    | HTTP  |
| `hermesrs`     | Rust               | Runs [hermes-agent-rs](https://github.com/willamhou/hermes-agent-rs) — Rust Hermes (verified end-to-end)   | 8080    | HTTP  |
| `k8sops`       | Go                 | Companion Claw runtime used by [claw4k8s](docs/plans/2026-04-19-claw4k8s-design.md) for self-healing       | 18910   | HTTP  |
| `custom`       | Any                | Bring your own runtime image                                                                               | —       | —     |

## Quick Start

### Prerequisites

- Kubernetes cluster (v1.28+, or [kind](https://kind.sigs.k8s.io/) / [minikube](https://minikube.sigs.k8s.io/) for local dev)
- kubectl configured
- Go 1.23+ (for building from source)

### 1. Install CRDs and run the operator

**Option A: Helm (recommended, v0.2.1+):**

```bash
helm install k8s4claw oci://ghcr.io/prismer-ai/charts/k8s4claw --version 0.2.1 \
  --namespace k8s4claw-system --create-namespace \
  --set webhook.certManager.enabled=true  # requires cert-manager pre-installed
```

Or from source:

```bash
git clone https://github.com/Prismer-AI/k8s4claw.git
cd k8s4claw
helm install k8s4claw charts/k8s4claw --namespace k8s4claw-system --create-namespace
```

**Option B: From source with Make:**

```bash
git clone https://github.com/Prismer-AI/k8s4claw.git
cd k8s4claw

# Install CRDs into the cluster
make install

# Run operator locally (or deploy with `make deploy`)
make run
```

### 2. Create a Secret for your LLM API keys

```bash
kubectl create secret generic llm-api-keys \
  --from-literal=ANTHROPIC_API_KEY=sk-ant-xxx \
  --from-literal=OPENAI_API_KEY=sk-xxx
```

### 3. Deploy your first AI agent

```yaml
# my-agent.yaml
apiVersion: claw.prismer.ai/v1alpha1
kind: Claw
metadata:
  name: my-agent
spec:
  runtime: openclaw
  config:
    model: "claude-sonnet-4"
  credentials:
    secretRef:
      name: llm-api-keys
  persistence:
    session:
      enabled: true
      size: 2Gi
      mountPath: /data/session
    workspace:
      enabled: true
      size: 10Gi
      mountPath: /workspace
```

```bash
kubectl apply -f my-agent.yaml

# Watch it come up
kubectl get claw my-agent -w
```

### 4. Connect a Slack channel (optional)

```yaml
apiVersion: claw.prismer.ai/v1alpha1
kind: ClawChannel
metadata:
  name: slack-team
spec:
  type: slack
  mode: bidirectional
  credentials:
    secretRef:
      name: slack-bot-token
  config:
    appId: "A0123456789"
```

Then reference it in your Claw:

```yaml
spec:
  channels:
    - name: slack-team
      mode: bidirectional
```

## Features

### claw4k8s — Autonomous Self-Healing (v0.2.0+)

The unique wedge: AI agents manage their **own** Kubernetes infrastructure. See [architecture diagrams](docs/marketing/architecture.md).

- **ClawOpsController** — watches Pod status (OOMKilled, CrashLoop, HighCPU, Evicted) and auto-executes low-risk fixes from a deterministic rule engine
- **Intent annotation pattern** — agents never patch StatefulSets directly; a single reconciler consumes intents through a 5-action allowlist with generation-based idempotency. Zero controller contention.
- **Companion Claw (LLM agent)** — handles novel issues. Analyzes, proposes, routes to human approval via Slack (ClawChannel integration).
- **Ed25519 audit receipts** — auto-executed actions get a signed receipt for the audit trail when signing succeeds (signing is non-blocking); pure-Go signer with optional `signet` CLI fallback.
- **Graceful LLM fallback** — 3 retries with exponential backoff, then degrades to human notification — never paralyzes.
- **ClawOpsEscalation CRD** — dual-purpose audit + workflow state machine (Pending → Analyzing → Proposed → AwaitingApproval → Approved → Executed).

### Declarative Lifecycle Management

- `Claw` CRD manages StatefulSet, Service, ConfigMap, ServiceAccount, PDB, PVCs, NetworkPolicy, Ingress, RBAC in a single declarative resource
- Per-runtime resource defaults, liveness/readiness probes, graceful shutdown tuning
- Webhook validation: credential requirements, PVC immutability, runtime type lock, NetworkPolicy mandatory for `k8sops` runtime
- Finalizer-based cleanup with `Retain` / `Delete` / `Archive` reclaim policies

### Auto-Update with Circuit Breaker

- OCI registry polling on cron schedule
- Semver constraint filtering (`^1.x`, `~2.0.0`)
- Health-verified rollouts with configurable timeout
- Automatic rollback + circuit breaker after N consecutive failures

### Persistence & Archival

- Session, output, and workspace PVCs via StatefulSet `volumeClaimTemplates`
- CSI VolumeSnapshot on cron schedule with retention pruning
- S3-compatible archival sidecar (S3, MinIO, GCS, R2) with lifecycle policies

### Communication Channels

- **ClawChannel CRD** — declarative channel definitions with reference counting
- Built-in sidecars: **Slack**, **Discord**, **Webhook** (more coming)
- Custom sidecar support for any protocol
- Bidirectional / inbound / outbound modes

### IPC Bus — Reliable In-Pod Messaging

- **WAL** — at-least-once delivery via BoltDB write-ahead log
- **DLQ** — dead letter queue for messages exceeding retry limits
- **Backpressure** — ring buffer with high/low watermark flow control
- **Protocol bridges** — WebSocket (OpenClaw), TCP (PicoClaw), UDS (NanoClaw), SSE (ZeroClaw)

### Security & Compliance

- Pod Security Standards: `runAsNonRoot`, `readOnlyRootFilesystem`, `seccompProfile=RuntimeDefault`, `drop=[ALL]` capabilities
- NetworkPolicy defaults: default-deny + selective allow
- Per-instance ServiceAccount with `automountServiceAccountToken=false`
- ExternalSecrets integration for secrets rotation
- Ed25519 cryptographic audit for all ops actions

### Self-Configuration

- **ClawSelfConfig CRD** — agents can modify their own skills, config, workspace files, and env vars
- Scoped allowlist via `spec.selfConfigure.allowedActions` (skills, config, workspaceFiles, envVars)
- Rate limits on self-mutation

### Observability

- Prometheus metrics per Claw instance (reconcile latency, phase transitions, remediation actions, LLM latency)
- K8s Events on all phase transitions
- Status subresource with detailed conditions (RuntimeReady, AutoUpdateStatus, ChannelStatus)
- PrometheusRule + ServiceMonitor templates in the Helm chart

### Go SDK

```go
import "github.com/Prismer-AI/k8s4claw/sdk"

client, err := sdk.NewClient()
if err != nil {
    log.Fatal(err)
}

claw, err := client.Create(ctx, &sdk.ClawSpec{
    Runtime: sdk.OpenClaw,
    Config: &sdk.RuntimeConfig{
        Environment: map[string]string{"MODEL": "claude-sonnet-4"},
    },
})
```

## Development

```bash
make build          # Build operator binary
make build-ipcbus   # Build IPC Bus binary
make test           # Run tests (requires setup-envtest)
make lint           # Lint
make vet            # Run go vet
make fmt            # Run gofmt + goimports
make manifests      # Generate CRD YAML
make generate       # Generate deepcopy
make docker-build   # Build container image
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for the full development guide.

## Design Documents

- [Operator Core Design](docs/plans/2026-03-04-k8s4claw-design.md)
- [IPC Bus + Resilience Design](docs/plans/2026-03-05-phase4-ipcbus-resilience-design.md)
- [Auto-Update Controller Design](docs/plans/2026-03-07-auto-update-design.md)
- **[claw4k8s Autonomous Ops Design](docs/plans/2026-04-19-claw4k8s-design.md)** — self-healing + LLM escalation + Ed25519 audit
- [claw4k8s Implementation Plan](docs/plans/2026-04-19-claw4k8s-impl.md) — task-by-task breakdown
- [claw4k8s Architecture Diagrams](docs/marketing/architecture.md) — Mermaid flowcharts of the full auto-remediation loop
- [vs k8sgpt / kubectl-ai / Holmes](docs/marketing/comparison.md) — positioning comparison

## License

Apache-2.0
历史前置条件说明(补充参考)

Kubernetes 集群 v1.28+(或 kind/minikube),已配置 kubectl;从源码构建需 Go 1.23+;Helm 安装 OCI 图表需预先安装 cert-manager;需自备 Anthropic/OpenAI 等模型 API Key;需可访问 ghcr.io 镜像仓库;归档功能需 S3 兼容存储;Slack/Discord 通道需相应凭据;费用、国内网络可达性与具体云服务定价待核验。

项目来源与清单版权许可

https://github.com/Prismer-AI/k8s4claw

整理来源:https://github.com/slavakurilyak/awesome-ai-agents

清单版权与许可:

MIT License

Copyright (c) 2024 Slava Kurilyak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.