From 7d8f5b33254b18c1629702e4988cdbefa69cf705 Mon Sep 17 00:00:00 2001 From: Moritz Graf Date: Sun, 8 Feb 2026 11:24:34 +0100 Subject: [PATCH] Agents file for openclaw updated --- k8s/openclaw/AGENTS.md | 78 ++++++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/k8s/openclaw/AGENTS.md b/k8s/openclaw/AGENTS.md index 16f3ef3..eaf2def 100644 --- a/k8s/openclaw/AGENTS.md +++ b/k8s/openclaw/AGENTS.md @@ -1,22 +1,64 @@ -# k8s/openclaw/AGENTS.md +# OpenClaw Agent Guide -> [!NOTE] -> This directory contains the deployment configuration for **OpenClaw**, an open-source AI agent platform. +This document provides a comprehensive technical reference for AI agents to manage the **OpenClaw** deployment in this repository. -## Overview -* **Namespace**: `openclaw` -* **Workload**: `openclaw` (Deployment) -* **Dependencies**: - * **LLM**: Connects to `ollama` in `llm` namespace. - * **Secrets**: Requires `GEMINI_API_KEY`. +## 🏗️ Architecture & Configuration Lifecycle -## Deployment -1. **Apply Namespace**: `kubectl apply -f namespace.yaml` -2. **Secrets**: - * Edit `openclaw.secret.yaml` to set `api-key`. - * Ensure `openclaw.secret.yaml` is encrypted with `git-crypt`. -3. **Apply Workload**: `kubectl apply -f openclaw.secret.yaml` +### 1. Source of Truth +The configuration for OpenClaw is centralized in the `openclaw-bootstrap-config` **ConfigMap** within [openclaw.secret.yaml](file:///Users/moritz/src/infrapuzzle/k8s/openclaw/openclaw.secret.yaml). +- **Active File**: `openclaw.json` -## Configuration -* **LLM Provider**: `ollama` -* **Ollama URL**: `http://ollama.llm.svc.cluster.local:11434` +### 2. Bootstrap Process +OpenClaw uses an `initContainer` to bootstrap the configuration: +1. The `openclaw-bootstrap-config` volume is mounted at `/mnt/config`. +2. The `initContainer` copies `/mnt/config/openclaw.json` to the persistent data volume at `/mnt/data/openclaw.json`. +3. The main `openclaw` container identifies the persistent volume at `/home/node/.openclaw`. + +### 3. Applying Changes +To update the configuration: +1. Modify the `openclaw.json` block in [openclaw.secret.yaml](file:///Users/moritz/src/infrapuzzle/k8s/openclaw/openclaw.secret.yaml). +2. Apply the manifest: `kubectl apply -f openclaw/openclaw.secret.yaml` +3. **Rotate Deployment**: You MUST restart the pod to trigger the `initContainer` bootstrap: + `kubectl rollout restart deployment openclaw -n openclaw` + +--- + +## 🔧 Configuration Reference (`openclaw.json`) + +### `gateway` +Controls the main server behavior and security. +- `trustedProxies`: List of IPs to trust for `X-Forwarded-For` headers (e.g., `["127.0.0.1"]`). +- `controlUi.dangerouslyDisableDeviceAuth`: Set to `true` to allow login via token/password without device identity verification (useful for initial setup). +- `port`: Default `18789`. Controlled via `OPENCLAW_GATEWAY_PORT` env var in the manifest. + +### `agents.defaults` +Global defaults for all agents launched by the gateway. +- `model.primary`: The default LLM (e.g., `google/gemini-flash-latest`). +- `model.fallbacks`: List of model IDs to use if the primary fail. +- `contextTokens`: Maximum context window (e.g., `200000`). + +### `models.providers` +Definition of external LLM sources. +- **`ollama`**: + - `baseUrl`: `http://127.0.0.1:11434` (proxied via sidecar). + - `apiKey`: Required for discovery (e.g., `ollama-local`). + - `models`: Array of model objects with `id`, `contextWindow`, etc. +- **`google`**: Built-in provider. Uses `GEMINI_API_KEY` environment variable. + +### `channels` +Messaging platform integrations. +- **`telegram`**: + - `enabled`: `true` | `false`. + - `dmPolicy`: `pairing` (default) | `allowlist` (skip approval). + - `allowFrom`: Array of numeric user IDs (e.g., `["306373425"]`) allowed to DM the bot. + +### `plugins` (Extensions) +Platform extensions (e.g., WhatsApp, Telegram). +- `entries..enabled`: Enable/disable specific extension logic. +- `entries..config`: Plugin-specific settings object. + +### `skills` +Modular tool capabilities. +- `allowBundled`: Allowlist of built-in skills. +- `load.extraDirs`: Additional paths to scan for `SKILL.md` files. +- `entries..env`: Environment variables injected into the skill run.