Agent Runtime Control Plane โ Connect any LLM to OpenClaw with one command. Zero dependencies, 7 providers, multimodal support. ๅฐไปปๆๅคงๆจกๅ๏ผQwen / OpenAI / Gemini / Claude / Kimi / MiniMax / GLM๏ผไธ้ฎๆฅๅ ฅ OpenClaw โ ้ถ็ฌฌไธๆนไพ่ตใๆฏๆๅคๆจกๆใ10 ๅ้่ท้ใ
Current version:
v37.8.15/0.37.8.15(2026-04-17) โ seeCLAUDE.mdfor full changelog.
Text version / ๆๆฌ็ๆฌ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ็จๆทๅฑ (WhatsApp + Discord ๅ้้) โ
โ ๆๆฌ / ๅพ็ / ่ฏญ้ณๆถๆฏ | 6ไธชDiscord้ข้ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ ๆ ธๅฟๆฐๆฎ้่ทฏ๏ผๅฎๆถๅฏน่ฏ + ๅคๆจกๆ + SLO ็ๆง๏ผ โ
โ โ
โ WhatsApp โโ โ
โ Discord โโผโ Gateway (:18789) โโ Proxy (:5002) โโ Adapter (:5001) โโ LLM (7 Providers) โ
โ โ [launchd] [็ญ็ฅ่ฟๆปค+็ๆง] [่ฎค่ฏ+Fallback] [Qwen3-235B] โ
โ โ [ๅชไฝๅญๅจ] [ๅพ็base64ๆณจๅ
ฅ] [VLๆจกๅ่ทฏ็ฑ] [+6 more providers] โ
โ notify.sh โ [ๅ้้ๆจ้] [่ชๅฎไนๅทฅๅ
ทๆณจๅ
ฅ] [โGemini้็บง] โ
โ data_clean(ๆธ
ๆด) โ
โ search_kb(ๆททๅๆฃ็ดข) โ
โ [SLOๆๆ ้้] โ
โ ๅปถ่ฟp95/้่ฏฏๅ็ฑป โ
โ ๅทฅๅ
ทๆๅ็/้็บง็ โ
โ โ
โ search_kbๆต็จ๏ผ็จๆท้ฎ่ฎบๆ โ PA่ฐsearch_kb โ Proxyๆฆๆช โ
โ โ โ ่ฏญไนๆ็ดข(embedding cosine) + โกๅ
ณ้ฎ่ฏ่กฅๅ
โ
โ โ ๆฏๆsource่ฟๆปค(arxiv/hf/hn็ญ) + ๆถ้ด่ฟๆปค(recent_hours) โ
โ โ ็ปๆๆณจๅ
ฅๅฏน่ฏ โ followup LLM่ฐ็จ โ ่ช็ถ่ฏญ่จๅ็ญ โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โก ็ฅ่ฏๅบ + ๆฌๅฐ AI๏ผ้ถ API ่ฐ็จ๏ผ โ
โ โ
โ KB Notes + Sources โโโ kb_embed.py โโโ ๆฌๅฐ Embedding (384็ปด) โ
โ (sentence-transformers, ๆฏ4hๅข้) โ
โ โ โ
โ ~/.kb/text_index/ โโโ kb_rag.py (RAG) โ
โ โ
โ ๅชไฝๆไปถ โโโ mm_index.py โโโ Gemini Embedding 2 (768็ปด) โ
โ โ โ
โ ~/.kb/mm_index/ โโโ mm_search.py (่ฏญไนๆ็ดข) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โข ๅฎๆถไปปๅกๅฑ๏ผ39 ไธช system cron jobs๏ผ35 active๏ผ โ
โ โ
โ ่ฎบๆ็ๆง็ฉ้ต๏ผ5ๆบ๏ผ๏ผ โ
โ ArXiv(ๆฏ3h) + HF Papers(10:00) + S2(11:00) โ
โ + DBLP(12:00) + ACL(09:30) โโโ KB + WhatsApp + Discordๆจ้ โ
โ ๆฏ3h HN็ญๅธๆๅ โโโ KB + WhatsApp + Discordๆจ้ โ
โ ๆฏๅคฉร3 ่ดงไปฃWatcher โโโ LLMๅๆ + KB + WhatsApp + Discordๆจ้ โ
โ ๆฏๅคฉ OpenClaw Releases โโโ LLMๆ่ฆ + KB + WhatsApp + Discord โ
โ ๆฏๅฐๆถ Issues็ๆง โโโ KB + WhatsApp + Discordๆจ้ โ
โ ๆฏๅคฉ KBๆฏๆฅๆ่ฆ / ๆ้ดๆด็ / ๆบ่ฝๅป้ โ
โ ๆฏ4h KB ๅ้็ดขๅผ๏ผๆฌๅฐ embedding๏ผ โ
โ ๆฏ2h ๅคๅชไฝ็ดขๅผ๏ผGemini Embedding 2๏ผ โ
โ ๆฏๅคฉ ๅฏน่ฏ่ดจ้ๆฅๆฅ / Token็จ้ๆฅๆฅ โ
โ ๆฏๅจ KBๆทฑๅบฆๅ้กพ / ๅฅๅบทๅจๆฅ / AI่ถๅฟๆฅๅ โ
โ ๆฏๅคฉ Gateway state ๅคไปฝ๏ผๅคๆ SSD๏ผ โ
โ ๆฏ30m WhatsApp ไฟๆดป โ
โ ๆฏ4h Job Watchdog๏ผๅ
็ๆงๅ่ญฆ๏ผ โ
โ ๆฏ2m auto_deploy๏ผGitโ่ฟ่กๆถ่ชๅจๅๆญฅ๏ผ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โฃ ๆงๅถๅนณ้ข๏ผSLO + ้ๅผไธญๅฟๅ + ๆ
้ๅฟซ็
ง + 19้กนไฝๆฃ + CI๏ผ โ
โ โ
โ Claude Code โ claude/ๅๆฏ โ PR โ main โ auto_deploy โ Mac Mini โ
โ config.yaml: ็ปไธ้ๅผ้
็ฝฎ๏ผ70+ๅๆฐ๏ผ9ไธชๅๅบ๏ผ โ
โ SLO 5ๆๆ : ๅปถ่ฟp95<30s / ๅทฅๅ
ทๆๅ>95% / ้็บง<5% โ
โ ่ถ
ๆถ<3% / ่ชๅจๆขๅค>90% โ
โ auto_deploy: ๆไปถๅๆญฅ(81ไธช) + ๆผ็งปๆฃๆต + ๆ้restart โ
โ preflight: 19้กนๆฃๆฅ๏ผๅๆต+ๆณจๅ่กจ+่ฏญๆณ+้จ็ฝฒ+ๅฎๅ
จ+E2E+SLO๏ผ โ
โ ๆ
้ๅฟซ็
ง: ่ฟ็ปญ้่ฏฏโ่ชๅจ้้ๆฅๅฟ+็ถๆโ~/.kb/incidents/ โ
โ pre-commit: API key/ๆๆบๅทๆณๆผ+่ฏญๆณๆฃๆฅ โ
โ GitHub Actions CI: 9ๅฅๅๆต+ๆณจๅ่กจ+้
็ฝฎๆ ก้ช+ๅฎๅ
จๆซๆ+bandit โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โค Ontology Plane๏ผ่ฏญไนๆงๅถๅนณ้ข + ่ฟ่กๆถๆฒป็ + ็ฅ่ฏไฝ็ณป๏ผ โ
โ โ
โ ontology/ โ
โ engine.py โโ tool_ontology.yaml (81ๆกๅฃฐๆๅผ่งๅ) โ
โ โโ classify_tool_call(): ่ฏญไนๆจ็(ๅฑๆงโ้ฃ้ฉ+็ญ็ฅๆ ็ญพ) โ
โ governance_checker.py โโ governance_ontology.yaml v3.19 โ
โ โโ 52ไธๅๅผ + 236ๆฃๆฅ + 14ๅ
่งๅ + ้ช่ฏๆทฑๅบฆไธๅฑๆจกๅ โ
โ โโ MR-13/MR-14: error-chain-transparency + alert-path- โ
โ independence (V37.8.10/13 ่กๆกๆ่ฎญ) โ
โ โโ MRD-LAYER-001: ่ชๅจๅ็ฐๅๅฑ้ช่ฏ็ฒๅบ โ
โ diff.py: engine โ proxy_filters ไธ่ดๆงๆ ก้ช (81/81=100%) โ
โ Phase 3: (ๅฃฐๆๅผๅผๆๆฟไปฃ็กฌ็ผ็ , V37.8.14) โ
โ CONSTITUTION.md: ๅฎชๆณ6ๆก + ๆ้ซๆกๆฌพ๏ผ้กน็ฎ้็ฆป๏ผ โ
โ docs/cases/: 15 ็ฏ่กๆกๆกฃๆก (V37.3-V37.8.13) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โฅ ไธๆนๅ
ฑไบซ็ถๆ๏ผ~/.kb/status.json ๅฎๆถๅๆญฅ๏ผ โ
โ โ
โ ็จๆท(WhatsApp+Discord) โโ PA โโ status.json โโ Claude Code โ
โ ๅ้ฆ+ๅณ็ญ ๅๅ
ฅ ไผๅ
็บง/ๅ้ฆ ่ฏป/ๅ โ
โ ๅฅๅบท/SLO/็ฆ็น โโ Cron่ชๅจๆดๆฐ โ
โ โ
โ ๅฎชๆณ๏ผ็จๆทไธไธๆทฑๅบฆ + Claude Code่ฎพ่ฎก้จ็ฝฒ + OpenClawๆฐๆฎๅคๅฉ โ
โ ไธ่
ๅไธ = ๆ็ๅฝ็้ญ็ฏ็ณป็ป โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Component | Port | Files | Role |
|---|---|---|---|
| OpenClaw Gateway | 18789 | npm global | WhatsApp integration, media storage, tool execution, session management |
| Tool Proxy | 5002 | tool_proxy.py + proxy_filters.py |
Tool filtering (24โ12), custom tools (data_clean + search_kb hybrid search), image base64 injection, SSE conversion, truncation, token monitoring, SLO metrics collection, incident snapshots |
| Adapter | 5001 | adapter.py + providers.py |
7-provider forwarding, auth, multimodal routing (textโQwen3, imageโQwen2.5-VL), fallback degradation |
| Config Center | โ | config.yaml + config_loader.py |
Centralized thresholds (70+ params, 9 sections: SLO/proxy/tokens/alerts/routing/truncation/watchdog/incidents/jobs) |
| SLO Benchmark | โ | slo_benchmark.py |
SLO compliance โ 5 metrics, real production data reports (p95=459ms, 5/5 PASS) |
| Notifications | โ | notify.sh |
Dual-channel push: WhatsApp + Discord (6 topic channels: papers/freight/alerts/daily/tech/DM) |
| Local Embedding | โ | local_embed.py |
sentence-transformers (384-dim, 50+ languages), zero API calls |
| Remote LLM | โ | 7 providers | Qwen3-235B / GPT-4o / Gemini 2.5 / Claude Sonnet / Kimi K2.5 / MiniMax M2.7 / GLM-5 |
| Provider | Default Model | Context | Vision | Auth | Verified |
|---|---|---|---|---|---|
| Qwen (Remote GPU) | Qwen3-235B | 262K | Qwen2.5-VL-72B | Bearer | 5/5 (production) |
| OpenAI | GPT-4o | 128K | built-in | Bearer | available |
| Google Gemini | Gemini 2.5 Flash | 1M | built-in | Bearer | 2/5 (fallback) |
| Anthropic Claude | Claude Sonnet 4.6 | 200K | built-in | x-api-key | available |
| Kimi (Moonshot AI) | Kimi K2.5 (1T MoE) | 256K | built-in | Bearer | available |
| MiniMax | MiniMax M2.7 | 200K | built-in | Bearer | available |
| GLM (Zhipu AI) | GLM-5 (744B MoE) | 200K | GLM-5V-Turbo | Bearer | available |
All providers use OpenAI-compatible API format. Adding a new provider: see docs/compatibility_matrix.md.
# Switch provider at runtime
export PROVIDER=kimi && export MOONSHOT_API_KEY=... && bash restart.shThree steps. Zero third-party dependencies. Any LLM provider.
# Step 1: Clone
git clone https://github.com/bisdom-cell/openclaw-model-bridge.git
cd openclaw-model-bridge
# Step 2: Set any ONE API key โ quickstart auto-detects your provider
export OPENAI_API_KEY="sk-..." # OpenAI (GPT-4o)
export GEMINI_API_KEY="..." # Google Gemini
export ANTHROPIC_API_KEY="sk-ant-..." # Anthropic Claude
export MOONSHOT_API_KEY="..." # Kimi (Moonshot AI)
export MINIMAX_API_KEY="..." # MiniMax
export GLM_API_KEY="..." # GLM (Zhipu AI)
export REMOTE_API_KEY="..." # Custom Qwen endpoint
# Step 3: One command โ auto-detects provider, runs 4 phases
bash quickstart.shWhat happens:
Phase 1: Prerequisites โ Python, files, syntax, provider auto-detection
Phase 2: Start Services โ Adapter(:5001) + Proxy(:5002), ~3 seconds
Phase 3: Health Check โ 1093 unit tests + registry validation
Phase 4: Golden Test Trace โ Real request through full stack, saved to docs/golden_trace.json
Expected output:
โ
Provider: openai (via $OPENAI_API_KEY)
โ
all tests passed
โ
Golden test: "Four" in 521ms (37 prompt + 2 completion tokens)
Trace saved to docs/golden_trace.json
Step-by-step alternative / ๅๆญฅๆง่ก
bash quickstart.sh --check # Prerequisites only
bash restart.sh # Start services
bash quickstart.sh --demo # Demo request onlyAfter Quick Start: optional capabilities
# SLO Benchmark โ real production metrics report
python3 slo_benchmark.py # Markdown report (5/5 PASS, p95=459ms)
python3 slo_benchmark.py --json # JSON format for CI
python3 slo_benchmark.py --save # Save to docs/slo_benchmark_report.md
# Provider compatibility matrix
python3 providers.py # Markdown table (7 providers)
python3 providers.py --json # JSON format
# GameDay fault injection drill
bash gameday.sh --all # 5 scenarios: GPU timeout, circuit breaker, etc.
# KB RAG semantic search (requires pip install)
pip3 install -r requirements-rag.txt
python3 kb_embed.py && python3 kb_rag.py "AI papers"
# Multimodal memory search (requires pip install + Gemini key)
pip3 install -r requirements-mm.txt
python3 mm_index.py && python3 mm_search.py "cat photos"Core services (tool_proxy.py, adapter.py, proxy_filters.py) use only Python standard library โ http.server, json, urllib. No pip install, no virtual environment, no Docker. This is a deliberate architecture decision: every dependency you remove is one fewer reason someone can't run your system.
| File | Description |
|---|---|
tool_proxy.py |
HTTP layer โ request/response routing, custom tool execution (data_clean + search_kb), media injection, followup LLM calls, logging, health cascade |
proxy_filters.py |
Policy layer โ tool filtering, custom tool injection (data_clean + search_kb), image base64 injection (<media:image> โ image_url), param fixing, truncation, SSE conversion |
adapter.py |
API adapter โ 7-provider forwarding, auth, multimodal routing (textโQwen3, imageโQwen2.5-VL), fallback degradation |
providers.py |
V34 Provider Compatibility Layer โ BaseProvider abstraction, 7 concrete providers, ProviderRegistry, capability declaration, CLI matrix |
slo_benchmark.py |
V35 SLO Benchmark report generator โ reads proxy_stats.json โ Markdown/JSON report (latency p50/p95/p99, success rate, degradation) |
quickstart.sh |
V35 One-click Quick Start โ 4 phases (prerequisites โ services โ health โ golden test), provider auto-detection |
notify.sh |
V33 Unified notification โ WhatsApp + Discord dual-channel push, 6 topic channels |
| File | Description |
|---|---|
local_embed.py |
V29.3 Local embedding engine โ sentence-transformers (multilingual-MiniLM, 384-dim, 50+ languages), zero API calls |
kb_embed.py |
V29.3 KB text vector indexer โ notes+sources โ chunking (400 chars, 80 overlap) โ local embedding โ ~/.kb/text_index/ |
kb_rag.py |
V29.3 RAG semantic search โ --context (LLM injection), --json (scripting), --top N, --source (filter by origin), --recent N (time-based) |
mm_index.py |
V29.1 Multimodal memory indexer โ Gemini Embedding 2 for images/audio/video/PDF |
mm_search.py |
V29.1 Multimodal semantic search โ text query โ cosine similarity โ matched media |
kb_search.sh |
V29 KB full-text search โ keyword/tag/date/source filtering, --summary stats |
kb_inject.sh |
V29 Daily KB digest generator โ ~/.kb/daily_digest.md for LLM context |
kb_review.sh |
V29 Weekly KB deep review โ LLM cross-note analysis + WhatsApp push |
kb_write.sh |
KB write utility โ directory lock + atomic write |
kb_dedup.py |
V29.2 KB deduplication โ exact/fuzzy note dedup + source line dedup |
kb_trend.py |
V29.5 Weekly AI trend report โ this week vs last week keywords + LLM analysis + prediction backtest |
status_update.py |
V29.5 Three-party shared status โ atomic read/write of ~/.kb/status.json (Claude Code + PA + cron) |
data_clean.py |
V30.3 Data cleaning CLI โ 7 operations (dedup/trim/fix_dates/etc), 5 formats (CSV/TSV/JSON/JSONL/Excel), version chain + audit log |
kb_dream.sh |
V36.1 Agent Dream v2 โ MapReduce full KB exploration (14 sources + 300 notes, MapโcacheโReduce) |
kb_harvest_chat.py |
V37 Conversation distiller โ MapReduce chat extraction from proxy captures, zero data loss |
kb_evening_collect.py |
V37.6 Evening digest collector โ reuses kb_review_collect primitives via import |
kb_review_collect.py |
V37.5 Review data collector โ registry-driven source discovery + H2 drill-down + LLM call with fail-fast |
SOUL.md |
V30.4โV37.4.3 PA constitutional system prompt โ identity (Wei), three-party constitution, behavior directives, Rule 9 critical thinking, Rule 10 alert non-follow-up |
| File | Description |
|---|---|
config.yaml |
V32 Centralized thresholds โ 70+ params across 9 sections (SLO/proxy/tokens/alerts/routing/truncation/watchdog/incidents/jobs) |
config_loader.py |
V32 Config loader โ from config_loader import MAX_REQUEST_BYTES for backward compatibility |
slo_checker.py |
V32 SLO compliance checker โ evaluates 5 SLO metrics from proxy_stats, outputs alerts for violations |
incident_snapshot.py |
V32 Fault snapshot โ auto-collects proxy/adapter/gateway logs + stats + service status โ ~/.kb/incidents/ |
conv_quality.py |
Daily conversation quality report โ response time, success rate, tool distribution, token usage |
token_report.py |
Daily token usage report โ consumption, hourly distribution, context pressure, multi-day trends |
job_watchdog.sh |
Meta-monitor โ checks all job status + log scanning โ WhatsApp alerts on timeout/failure |
wa_keepalive.sh |
WhatsApp session keepalive โ Gateway HTTP probe every 30 min |
| File | Description |
|---|---|
restart.sh |
One-command restart all services (with PATH fix for cron) |
auto_deploy.sh |
Auto-deployment โ git pull + file sync (81 files) + drift detection + smart restart + post-deploy preflight |
preflight_check.sh |
Pre-flight check โ 19 automated checks (tests, registry, syntax, deploy consistency, env vars, connectivity, security scan, data flow, crontab, E2E journey test, SLO compliance) |
health_check.sh |
Weekly health report + JSON output |
openclaw_backup.sh |
V29.1 Daily Gateway state backup to external SSD (7-day retention) |
upgrade_openclaw.sh |
Gateway upgrade SOP (must run via SSH, never via WhatsApp) |
gameday.sh |
V33 GameDay fault injection โ 5 scenarios (GPU timeout, circuit breaker, snapshot, SLO, watchdog) |
smoke_test.sh |
End-to-end smoke test (unit tests + registry + doc drift + connectivity) |
All jobs registered in jobs_registry.yaml. Validate: python3 check_registry.py
| File | Schedule | Description |
|---|---|---|
jobs/arxiv_monitor/run_arxiv.sh |
Every 3h | ArXiv AI paper monitoring + KB + WhatsApp + Discord |
jobs/hf_papers/run_hf_papers.sh |
Daily 10:00 | V30.5 HuggingFace Daily Papers + KB + dual-channel push |
jobs/semantic_scholar/run_semantic_scholar.sh |
Daily 11:00 | V30.5 Semantic Scholar papers (citation-ranked) + KB + dual-channel |
jobs/dblp/run_dblp.sh |
Daily 12:00 | V30.5 DBLP CS papers (multi-keyword, free API) + KB + dual-channel |
jobs/acl_anthology/run_acl_anthology.sh |
Daily 09:30 | V30.5 ACL Anthology NLP top-venue papers + KB + dual-channel |
jobs/finance_news/run_finance_news.sh |
Daily 07:30 | V37.8.2 Global finance/policy news โ 15 RSS + 14 X accounts + LLM analysis + zombie detection |
jobs/chaspark/run_chaspark.sh |
Daily 09:00 | V37.8.14 ่ถๆๅฑ็งๆ(Chaspark) โ HTML API deep analysis + KB + dual-channel |
jobs/ai_leaders_x/run_ai_leaders_x.sh |
Daily 21:00 | V34 AI Leaders X โ 15 AI researchers/founders technical insights |
jobs/ontology_sources/run_ontology_sources.sh |
10:00/20:00 | V37.1 Ontology academic RSS (W3C/JWS/DKE/KBS) + LLM summary |
run_hn_fixed.sh |
Every 3h:45 | HackerNews hot posts scraper |
jobs/freight_watcher/run_freight.sh |
08/14/20:00 | Freight intelligence โ scraping + LLM analysis |
jobs/openclaw_official/run.sh |
Daily 08:00 | OpenClaw releases watcher + LLM summary |
jobs/openclaw_official/run_discussions.sh |
Hourly:15 | GitHub Issues monitor (REST API + ETag) |
jobs/github_trending/run_github_trending.sh |
Daily 14:00 | V31 GitHub Trending ML/AI repos |
jobs/rss_blogs/run_rss_blogs.sh |
08:00/18:00 | V31 RSS blog subscriptions (็งๅญฆ็ฉบ้ด etc.) |
kb_inject.sh |
Daily 07:00 | KB daily digest for LLM context |
kb_embed.py |
Every 4h:30 | KB text vector indexing (local embedding) |
kb_evening.sh |
Daily 22:00 | Evening KB cleanup + LLM digest |
kb_dedup.py |
Daily 23:00 | KB deduplication (dry-run) |
kb_review.sh |
Fri 21:00 | Weekly KB deep review (registry-driven, LLM analysis) |
kb_dream.sh |
Daily 00:00/03:00 | V36.1 Agent Dream v2 โ MapReduce KB exploration (Map 00:00 + Reduce 03:00) |
kb_harvest_chat.py |
Daily 06:00 | V37 Conversation distiller โ MapReduce chat extraction, zero data loss |
mm_index_cron.sh |
Every 2h | Multimodal memory indexing (Gemini) |
conv_quality.py |
Daily 08:15 | Conversation quality report |
token_report.py |
Daily 08:20 | Token usage report |
health_check.sh |
Mon 09:00 | Weekly health report |
openclaw_backup.sh |
Daily 03:00 | Gateway state backup |
auto_deploy.sh |
Every 2 min | Git โ runtime auto-sync + drift detection |
job_watchdog.sh |
Every 4h:30 | Job health monitoring (19 jobs) |
wa_keepalive.sh |
Every 30 min | WhatsApp session probe + escalation to Discord |
kb_trend.py |
Sat 09:00 | Weekly AI trend report (keyword trends + LLM analysis) |
kb_status_refresh.sh |
Hourly | Status.json health refresh (three-party sync) |
governance_audit_cron.sh |
Daily 07:00 | V37.1 Governance audit โ 52 invariants + 14 meta rules |
preference_learner.py |
Daily 07:30 | User preference auto-learning |
cron_canary.sh |
Every 10 min | Cron heartbeat canary |
kb_integrity.py |
(on-demand) | KB file integrity checker (SHA256) |
| File | Description |
|---|---|
jobs_registry.yaml |
Unified job registry โ 39 jobs (35 active, 4 disabled), system cron |
check_registry.py |
Registry validator โ ID uniqueness, paths, fields |
gen_jobs_doc.py |
Auto-generate job docs from registry + drift detection |
test_providers.py |
Unit tests for providers |
test_tool_proxy.py |
Unit tests for proxy_filters |
test_check_registry.py |
Unit tests for check_registry |
test_data_clean.py |
Unit tests for data_clean |
test_adapter.py |
Unit tests for adapter |
test_kb_business.py |
Unit tests for KB business logic |
test_cron_health.py |
Unit tests for cron health |
test_status_update.py |
Unit tests for status_update |
test_audit_log.py |
Unit tests for audit_log |
test_config_slo.py |
V32 Unit tests for config_loader + slo_checker + incident_snapshot + ProxyStats SLO |
full_regression.sh |
Full regression runner โ all tests must pass before push (auto-updates status.json test_count) |
.githooks/pre-commit |
V32 Pre-commit hook โ API key/phone leak + syntax checks |
.github/workflows/ci.yml |
V32 GitHub Actions CI โ 9 test suites + config validation + security scan |
CLAUDE.md |
Project context for AI-assisted development |
Phase 3 active:
> โ declarative engine replaces hardcoded logic (V37.8.14). Roadmap: Phase 4 (domain ontology + policy engine) โ Phase 5 (pip install ontology-engine).
| File | Description |
|---|---|
ontology/engine.py |
V36.2 Tool Ontology Engine โ declarative rule inference (81 rules), classify_tool_call() semantic classification, query/validate/suggest APIs |
ontology/tool_ontology.yaml |
V36.2 Declarative tool rules โ 81 rules (filters, injections, truncation, SSE, media) |
ontology/governance_checker.py |
V36.3โV37.8 Governance execution engine โ 52 invariants + 236 checks + 14 meta rules + 5 check types (file_contains/file_not_contains/python_assert/crontab_check/runtime) + MRD auto-discovery |
ontology/governance_ontology.yaml |
V37.8.14 Governance Ontology v3.19 โ 52 invariants, 236 checks, 14 meta rules, 100% job coverage |
ontology/diff.py |
V36.2 Consistency checker โ engine vs proxy_filters (81/81 = 100%) |
ontology/CONSTITUTION.md |
V36.2 Ontology Constitution โ 6 articles + Supreme Article (project isolation) |
ontology/tests/ |
Engine + governance tests (8 test files, 249 tests) |
ontology/docs/cases/ |
V37.3โV37.8.13 15 blood lesson case studies (MR-4 silent failure ร 11 appearances) |
ontology/docs/architecture/ |
Industrial AI paradigm, target architecture (Phase 3-5 roadmap) |
| File | Description |
|---|---|
docs/compatibility_matrix.md |
V35 Provider compatibility matrix โ 7 providers, verification status, degradation paths |
docs/slo_benchmark_report.md |
V35 SLO Benchmark production report โ 5/5 PASS, p95=459ms |
docs/golden_trace.json |
V35 Golden Test Trace โ real request/response through full stack (521ms, reproducible) |
docs/strategic_review_20260403.md |
V34 Strategic review โ Stage2 positioning, V1-V3 roadmap, methodology |
docs/GUIDE.md |
Complete bilingual (CN/EN) integration guide with 26 lessons learned |
docs/config.md |
Full system configuration + historical changelog |
docs/openclaw_architecture.md |
OpenClaw upstream architecture reference (synced to v2026.3.23) |
docs/INDEX.md |
V37.8.13 Documentation navigation tree โ what to read when |
ROLLBACK.md |
(archived V37.8) Rollback guide โ pre-V27 recovery procedure |
"The stronger capabilities get, the harder the system is to control โ governance must lead, not follow."
Three-Plane Architecture:
- Control Plane (95%): Provider Compatibility Layer, SLO 5-metric monitoring, centralized thresholds, 19-check preflight, incident snapshots, circuit breaker, audit logging, 52-invariant governance
- Capability Plane (85%): 7-provider routing, multimodal (text+vision), tool governance (โค12), data cleaning, search_kb hybrid retrieval
- Memory Plane (75%): KB RAG, trend analysis, preference learning, multimodal memory, Memory Plane v2 (dedup + confidence + conflict resolution), Agent Dream v2 MapReduce
- Ontology Plane (Phase 3 active): Tool Ontology Engine (81 declarative rules, Governance Ontology v3.19 (52 invariants + 14 meta rules), 15 blood lesson cases
| Metric | Target | Actual | Status |
|---|---|---|---|
| Latency p95 | < 30s | 459ms | PASS |
| Tool success rate | > 95% | 100% | PASS |
| Degradation rate | < 5% | 0% | PASS |
| Timeout rate | < 3% | 0% | PASS |
| Auto-recovery rate | > 90% | 100% | PASS |
python3 slo_benchmark.py --save # Regenerate from live data โ docs/slo_benchmark_report.mdPrimary (e.g. Qwen3-235B, 5min timeout)
โ failure / timeout / circuit break (5 consecutive failures)
Fallback (e.g. Gemini 2.5 Flash, 1min timeout)
โ also failed
502 Error (both error messages returned)
โ 300s later: half-open, attempt recovery
All job outputs push to both WhatsApp and Discord simultaneously via notify.sh:
source notify.sh
notify "New papers found" # WhatsApp + Discord DM
notify "ArXiv digest" --topic papers # WhatsApp + Discord #papers channel
notify "Deploy alert" --topic alerts # WhatsApp + Discord #alerts channel| Discord Channel | Content |
|---|---|
| #papers | ArXiv, HF Papers, Semantic Scholar, DBLP, ACL |
| #freight | Freight intelligence reports |
| #alerts | Deploy alerts, watchdog, preflight failures |
| #daily | KB digest, health reports, reviews |
| #tech | HN, GitHub Trending, RSS blogs, OpenClaw releases |
- Tools <= 12 โ more causes model confusion
- Tool calls per task <= 2 โ timeout risk increases exponentially
- Request body <= 200KB โ buffer from the 280KB hard limit
--thinkingvalues โoff, minimal, low, medium, high, adaptive(never usenone)- Model ID in openclaw.json โ must include
qwen-local/prefix - API keys via env vars only โ never hardcode in source files
# Build index (first time, or --reindex to rebuild)
python3 kb_embed.py # 4339 chunks in ~8s on Mac Mini
# Search
python3 kb_rag.py "Qwen3 ๆจกๅ" # Top-5 results
python3 kb_rag.py --context "AI่ฎบๆ" # LLM-injectable format
python3 kb_rag.py --json "shipping" # JSON for scripting
python3 kb_rag.py --top 10 "RAG pipeline" # Custom top-K
python3 kb_rag.py --source arxiv "LLM" # Filter by source (arxiv/hf/dblp/acl/hn/notes)
python3 kb_rag.py --recent 24 # What's new in last 24 hours
# Stats
python3 kb_embed.py --statsModel: paraphrase-multilingual-MiniLM-L12-v2 (384-dim, 50+ languages)
Performance on Mac Mini M-series: single ~10ms, batch 100 ~500ms, full index 137 files in 8.1s
python3 mm_index.py # Index media files
python3 mm_search.py "็ซ็็
ง็" # Semantic search
python3 mm_search.py --stats # Index statsClaude Code โ claude/branch โ PR โ main โ auto_deploy (2 min) โ Mac Mini
โ
git pull โ test โ file sync (81 files) โ smart restart
โ
preflight_check.sh --full (19 checks)
The auto_deploy.sh script maps 81 repo files to runtime locations and only restarts services when core files change. Hourly drift detection via md5 checksums with WhatsApp + Discord alerts. Status.json exempt from drift (legitimate divergence between Claude Code snapshots and cron-refreshed runtime).
# Full regression (must ALL pass before push; auto-updates status.json test_count)
bash full_regression.sh
# Individual test suites (run full_regression.sh for totals)
python3 test_providers.py # provider/registry tests
python3 test_tool_proxy.py # proxy_filters tests
python3 test_data_clean.py # data cleaning tests
python3 test_cron_health.py # cron health tests
python3 test_kb_business.py # KB business logic tests
python3 test_adapter.py # adapter tests
python3 test_status_update.py # status update tests
python3 test_config_slo.py # config/SLO/incident tests
python3 test_audit_log.py # audit log tests
python3 test_check_registry.py # registry tests
python3 test_slo_benchmark.py # SLO benchmark tests
# SLO benchmark report (real production data)
python3 slo_benchmark.py # Markdown: 5/5 PASS, p95=459ms
python3 slo_benchmark.py --save # Save to docs/
# Provider compatibility matrix
python3 providers.py # 7-provider matrix
python3 providers.py --json # JSON for CI
# GameDay fault injection (5 scenarios)
bash gameday.sh --all
# Pre-flight check (19 automated checks, on Mac Mini)
bash preflight_check.sh --full
# Security score (7-dimension, 100 points)
python3 security_score.pyRun before every git push:
grep -r "sk-[A-Za-z0-9]\{15,\}" . --include="*.py" --include="*.sh" --include="*.md" | grep -v ".git"
grep -r "BSA[A-Za-z0-9]\{15,\}" . --include="*.py" --include="*.sh" --include="*.md" | grep -v ".git"
# All output must be empty| Evidence | File | How to reproduce |
|---|---|---|
| Golden Test Trace | docs/golden_trace.json |
bash quickstart.sh --demo |
| SLO Benchmark | docs/slo_benchmark_report.md |
python3 slo_benchmark.py --save |
| Compatibility Matrix | docs/compatibility_matrix.md |
python3 providers.py |
| 1093 Unit Tests | 37 test suites | bash full_regression.sh |
| GameDay Drill | gameday.sh |
bash gameday.sh --all |
| Security Score | security_score.py |
python3 security_score.py |
| Reliability Bench | docs/reliability_bench_report.md |
python3 reliability_bench.py --save |
| Resilience Report | docs/resilience_report.md |
7 fault injection experiments |
| Security Boundaries | docs/security_boundaries.md |
8-section security analysis |
| Governance Audit | ontology/governance_checker.py |
python3 ontology/governance_checker.py (52/52 invariants, 14 MR) |
| Tool Ontology | ontology/ |
python3 ontology/diff.py (81/81 consistency) |
| Blood Lesson Cases | ontology/docs/cases/ |
15 case studies documenting MR-4 silent failure patterns |
| Article | Language | Platform |
|---|---|---|
| Why Agent Systems Need a Control Plane | English | dev.to |
| ไธบไปไน Agent ็ณป็ป้ฆๅ ้่ฆไธไธชๆงๅถๅนณ้ข | ไธญๆ | ็ฅไน |
See docs/GUIDE.md for the complete bilingual walkthrough including 26 hard-won production lessons.
MIT
