← 返回
AI智能

Local Self-Healing Machine Learning

A fully local machine learning engine that makes your OpenClaw agent smart over time — without ever calling home, revealing your machine ID, or exposing any...
完全本地的机器学习引擎,让OpenClaw代理随时间变聪明,无需回连服务器、不泄露机器ID及任何隐私。
josephtandle
AI智能 clawhub v2.0.1 1 版本 99869.6 Key: 无需
★ 0
Stars
📥 766
下载
💾 34
安装
1
版本
#ai#embeddings#latest#local#machine-learning#self-healing

概述

Local Self-Healing Machine Learning

"Your agent learns from its own mistakes — without ever calling home, revealing your machine ID, or exposing any security holes."

A fully local machine learning engine that makes your OpenClaw agent smart over time. It watches your agent's runtime history, detects recurring failures, clusters similar errors using semantic embeddings, and autonomously evolves fix strategies — all running 100% on your machine with zero network calls.

The engine uses a feedback loop that tracks whether each fix actually works: after 3 clean cycles a fix is marked "proven", and if the error comes back within 5 cycles it's marked "failed". A k-NN predictor learns from these outcomes and gets better at picking the right fix over time. Lessons compound in a persistent knowledge base that never decays — the longer it runs, the smarter it gets.

Every evolution is auditable through the GEP (Genetic Evolution Protocol), which produces structured, content-hashed assets: genes (reusable fix strategies), capsules (successful evolution records), and an append-only event log. You can inspect exactly what changed, why it changed, and whether it worked.

No telemetry. No fingerprinting. No cloud dependencies. No data leaves your device.

ML Capabilities

  • Feedback Loop: Tracks whether fixes actually work. After 3 clean cycles, a fix is "proven". If the error recurs within 5 cycles, the fix is marked "failed".
  • Embedding-Based Error Clustering: Uses Ollama + llama3.2:3b to generate semantic embeddings for error messages. Similar errors are clustered together instead of matched by regex.
  • Success Predictor: k-NN classifier trained on feedback data. Predicts which gene will fix a given error cluster. Gets better over time.
  • Persistent Knowledge Base: Lessons compound forever. No decay. Confidence scores adjust with each outcome.

Dashboard

View your ML engine's status, training progress, and knowledge base in a local web dashboard:

node index.js --dashboard

Opens at http://localhost:8420. Shows feedback loop stats, predictor training progress, error clusters, knowledge base health, and recent evolution events. No external dependencies — runs entirely in your browser.

Optional: Ollama Integration

For semantic error matching (recommended but not required):

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Pull the embedding model
ollama pull llama3.2:3b

Without Ollama, the engine falls back to regex-based heuristics. Everything still works — you just get smarter matching with it.

Usage

Standard Run (Automated)

node index.js

Review Mode (Human-in-the-Loop)

node index.js --review

Continuous Loop

node index.js --loop

Configuration

Environment VariableDefaultDescription
---------
EVOLVE_ALLOW_SELF_MODIFYfalseAllow evolution to modify its own source code. Not recommended.
EVOLVE_LOAD_MAX2.0Maximum 1-minute load average before backing off.
EVOLVE_STRATEGYbalancedStrategy: balanced, innovate, harden, repair-only, early-stabilize, steady-state, or auto.
OLLAMA_URLhttp://localhost:11434Ollama API endpoint for embeddings.
OLLAMA_EMBED_MODELllama3.2:3bModel to use for embeddings.
LSHML_DASHBOARD_PORT8420Port for the standalone dashboard server.

How It Works

  1. Signal Extraction: Scans logs for errors, feature requests, performance issues (19 signal types, 4 languages)
  2. ML Clustering: Groups similar errors using embedding vectors (or regex fallback)
  3. Gene Selection: Picks the best fix strategy using knowledge base + k-NN predictor
  4. Evolution: Applies the fix with blast radius protection, validation, and rollback
  5. Feedback: Monitors subsequent cycles to verify the fix holds
  6. Learning: Records outcomes to knowledge base — proven fixes get higher confidence

Data Files

All data stays local in memory/:

FilePurpose
------
feedback.jsonlFix outcome tracking (append-only)
embeddings-cache.jsonCached embedding vectors
knowledge.jsonPersistent lessons (no decay)
predictor.jsonTrained model weights
cluster-registry.jsonSemantic error cluster map

GEP Protocol (Auditable Evolution)

Every evolution produces structured, auditable assets:

  • assets/gep/genes.json: Reusable fix strategies
  • assets/gep/capsules.json: Successful evolution records
  • assets/gep/events.jsonl: Append-only audit trail

Safety

  • Blast radius limits (max files/lines changed per cycle)
  • Critical path protection (cannot modify itself or core configs)
  • Validation commands run before committing
  • Canary check (index.js must still load)
  • Ethics committee (blocks dangerous patterns)
  • Full rollback on any failure

Author

Built by Joe Che

License

MIT

版本历史

共 1 个版本

  • v2.0.1 当前
    2026-03-19 09:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,694
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,055 📥 795,847
communication-collaboration

Claude Code Switchboard

josephtandle
管理OpenClaw将Telegram消息路由至不同Claude模型后端的方式,通过简单的配置更改即可在CLI和API提供商之间切换。
★ 0 📥 755