MetaClaw README

The project's README from github.com/aiming-lab/MetaClaw. As one markdown file: README.md.

MetaClaw

Just talk to your agent — it learns and EVOLVES.

Inspired by how brains learn. Meta-learn and evolve your 🦞 from every conversation in the wild. No GPU required.
MetaClaw Architecture

Tech Report GitHub License MIT Fully Async No GPU Cluster Skill Evolution One-Click Deploy

🇨🇳 中文 • 🇯🇵 日本語 • 🇰🇷 한국어 • 🇫🇷 Français • 🇩🇪 Deutsch • 🇪🇸 Español • 🇧🇷 Português • 🇷🇺 Русский • 🇮🇹 Italiano • 🇻🇳 Tiếng Việt • 🇦🇪 العربية • 🇮🇳 हिन्दी


Overview • Quick Start • Multi-Claw Support • Configuration • Skills Mode • RL Mode • Auto Mode • Memory • Citation


Two commands. That's it.

metaclaw setup              # one-time config wizard
metaclaw start              # default: auto mode — skills + scheduled RL training
metaclaw start --mode rl    # RL without scheduler (trains immediately on full batch)
metaclaw start --mode skills_only  # skills only, no RL (no Tinker needed)
MetaClaw demo

🔥 News


🎥 Demo

https://github.com/user-attachments/assets/d86a41a8-4181-4e3a-af0e-dc453a6b8594


📖 Overview

MetaClaw is an agent that meta-learns and evolves in the wild. Just talk to your agent as you normally would — MetaClaw turns every live conversation into a learning signal, enabling the agent to continuously improve through real-world deployment rather than offline training alone.

Under the hood, it places your model behind a proxy that intercepts interactions from your personal agent (OpenClaw, CoPaw, IronClaw, PicoClaw, ZeroClaw, NanoClaw, NemoClaw, or any OpenAI-compatible client), injects relevant skills at each turn, and meta-learns from accumulated experience. For Anthropic-native agents like NanoClaw, MetaClaw also exposes a /v1/messages Anthropic-compatible endpoint so the full pipeline works without any agent-side changes. Skills are summarized automatically after each session; with RL enabled, a meta-learning scheduler defers weight updates to idle windows so the agent is never interrupted during active use.

No GPU cluster required. MetaClaw works with any OpenAI-compatible LLM API out of the box, and uses a Tinker-compatible backend for cloud-based LoRA training. Tinker is the default reference path; MinT and Weaver can be enabled through separate compatibility packages when needed.

🤖 Key Features

One-click deployment

Configure once with metaclaw setup, then metaclaw start brings up the proxy, injects skills, and wires your chosen personal agent (OpenClaw, CoPaw, or IronClaw) automatically. No manual shell scripts needed.

Three operating modes

Mode Default What it does
skills_only Proxy your LLM API. Skills injected and auto-summarized after each session. No GPU/Tinker required.
rl Skills + RL training (GRPO). Trains immediately when a batch is full. Optional OPD for teacher distillation.
auto ✅ Skills + RL + smart scheduler. RL weight updates only run during sleep/idle/meeting windows.

Long-term memory

MetaClaw can persist facts, preferences, and project history across sessions and inject relevant context at each turn — so your agent remembers what you've told it, even weeks later.

Asynchronous by design

Serving, reward modeling, and training are fully decoupled. The agent continues responding while scoring and optimization run in parallel.


🚀 Quick Start

1. Install

OpenClaw (one-click): use the v0.4.0 release—run the snippet below, then metaclaw setup and metaclaw start. More detail (Windows, mirrors, config, troubleshooting): extensions/metaclaw-openclaw/README.md.

curl -LO https://github.com/aiming-lab/MetaClaw/releases/download/v0.4.0/metaclaw-plugin.zip
unzip metaclaw-plugin.zip -d ~/.openclaw/extensions
openclaw plugins enable metaclaw-openclaw && openclaw gateway restart

pip (PyPI or this repo):

pip install -e .                        # skills_only mode (lightweight)
pip install -e ".[rl]"                  # + RL training support (torch, transformers, tinker)
pip install -e ".[evolve]"              # + skill evolution via OpenAI-compatible LLM
pip install -e ".[scheduler]"           # + Google Calendar integration for scheduler
pip install -e ".[rl,evolve,scheduler]" # recommended for full RL + scheduler setup

(Optional) WeChat integration uses the official @tencent-weixin/openclaw-weixin plugin. MetaClaw auto-installs it when WeChat is enabled:

metaclaw config wechat.enabled true
metaclaw start

The plugin is installed automatically on metaclaw start. You can also install it manually:

npx -y @tencent-weixin/openclaw-weixin-cli@latest install

To switch WeChat accounts (re-login with a new QR code):

metaclaw start --wechat-relogin

If you want to run rl.backend=mint, install the MinT compatibility package separately in the same environment, for example mindlab-toolkit. Similarly, for rl.backend=weaver, install nex-weaver separately. MetaClaw keeps these dependencies out of the default package so RL users can choose Tinker, MinT, or Weaver explicitly.

2. Configure

metaclaw setup

The interactive wizard will ask you to:

  1. Choose your personal agent — openclaw, copaw, ironclaw, picoclaw, zeroclaw, nanoclaw, nemoclaw, or none (MetaClaw will auto-configure it on start)
  2. Choose your auth method — api_key (direct API) or oauth_token (CLI subprocess)
  3. Choose your LLM provider:
    • api_key: Kimi, Qwen, OpenAI, Volcano Engine, or custom → enter API base + API key
    • oauth_token: Anthropic (Claude Code), OpenAI Codex, or Gemini CLI → paste OAuth token
  4. Enter your model ID and optionally enable RL training

MetaClaw's RL path can switch explicitly between tinker, mint, and weaver. auto is the recommended default and will infer the backend from credentials, base URLs, or environment variables when the corresponding package is installed.

Tinker:

metaclaw config rl.backend tinker
metaclaw config rl.api_key sk-...
metaclaw config rl.model moonshotai/Kimi-K2.5

MinT:

metaclaw config rl.backend mint
metaclaw config rl.api_key sk-mint-...
metaclaw config rl.base_url https://mint.macaron.xin/
metaclaw config rl.model Qwen/Qwen3-4B-Instruct-2507

Weaver:

metaclaw config rl.backend weaver
metaclaw config rl.api_key sk-...
metaclaw config rl.base_url https://weaver-console.nex-agi.cn
metaclaw config rl.model Qwen/Qwen3-8B

Legacy aliases rl.tinker_api_key and rl.tinker_base_url are still accepted for backward compatibility.

3. Start

metaclaw start

That's it. MetaClaw starts the proxy, automatically configures your chosen personal agent to use it, and restarts the gateway. Open your agent and start chatting — skills are injected at every turn, and the session is automatically summarized into new skills when you're done.


🦞 Multi-Claw Support

MetaClaw works as a transparent proxy in front of any personal agent that supports an OpenAI-compatible LLM backend. The claw_type setting tells MetaClaw which agent to auto-configure when it starts.

claw_type Agent What MetaClaw does on start
openclaw OpenClaw Runs openclaw config set models.providers.metaclaw … + gateway restart. Uses the anthropic-messages API format so memory plugins (Hindsight, mem0, memory-lancedb) receive event.rawMessage correctly.
copaw CoPaw Patches ~/.copaw/config.json → models.default → openai_compatible pointing at the proxy port. CoPaw's ConfigWatcher hot-reloads automatically.
ironclaw IronClaw Patches ~/.ironclaw/.env → LLM_BACKEND=openai_compatible + LLM_BASE_URL/MODEL/API_KEY. Runs ironclaw service restart.
picoclaw PicoClaw Injects a metaclaw entry into ~/.picoclaw/config.json model_list and sets it as the default model. Runs picoclaw gateway restart.
zeroclaw ZeroClaw Patches ~/.zeroclaw/config.toml → provider = "openai-compatible" + base_url/model/api_key. Runs zeroclaw service restart.
nanoclaw NanoClaw Patches nanoclaw's .env → ANTHROPIC_BASE_URL pointing at the proxy's /v1/messages Anthropic-compatible endpoint. Restarts via launchctl (macOS) or systemctl --user (Linux).
nemoclaw NemoClaw Registers a metaclaw provider in OpenShell via openshell provider create and sets it as the active inference route via openshell inference set. Persists config to ~/.nemoclaw/config.json.
hermes Hermes Agent Injects a metaclaw entry into ~/.hermes/config.yaml custom_providers and sets model.provider: custom:metaclaw. Runs hermes gateway restart.
none — Skips auto-configuration. Point your agent at the proxy manually.

Setup

Pick your agent during metaclaw setup (the first question in the wizard):

Personal agent to configure (openclaw/copaw/ironclaw/picoclaw/zeroclaw/nanoclaw/nemoclaw/hermes/none) [openclaw]:

Or set it directly at any time:

metaclaw config claw_type copaw      # switch to CoPaw
metaclaw config claw_type ironclaw   # switch to IronClaw
metaclaw config claw_type picoclaw   # switch to PicoClaw
metaclaw config claw_type zeroclaw   # switch to ZeroClaw
metaclaw config claw_type nanoclaw   # switch to NanoClaw
metaclaw config claw_type nemoclaw   # switch to NemoClaw
metaclaw config claw_type hermes     # switch to Hermes Agent
metaclaw config claw_type none       # manual / custom agent

Then run metaclaw start as usual — the proxy comes up and the chosen agent is wired automatically.

Manual wiring (claw_type=none)

Point any OpenAI-compatible client at the MetaClaw proxy:

base_url: http://127.0.0.1:30000/v1
api_key:  metaclaw          # or whatever proxy.api_key is set to
model:    <your model id>

For Anthropic-native clients (e.g. the Claude SDK or NanoClaw's credential proxy), use the Anthropic-compatible endpoint instead:

ANTHROPIC_BASE_URL: http://127.0.0.1:30000
ANTHROPIC_API_KEY:  metaclaw

⚙️ Configuration

Configuration lives in ~/.metaclaw/config.yaml, created by metaclaw setup.

CLI commands:

metaclaw setup                  # Interactive first-time configuration wizard
metaclaw start                  # Start MetaClaw (default: auto mode)
metaclaw start --mode rl        # Force RL mode (no scheduler) for this session
metaclaw start --mode skills_only  # Force skills-only mode for this session
metaclaw stop                   # Stop a running MetaClaw instance
metaclaw status                 # Check proxy health, running mode, and scheduler state
metaclaw config show            # View current configuration
metaclaw config KEY VALUE       # Set a config value
metaclaw config llm.oauth_token TOKEN        # Store OAuth token for current CLI provider
metaclaw auth paste-token --provider anthropic      # Store OAuth token (anthropic | openai-codex | gemini)
metaclaw auth status                                # Show all stored auth profiles
metaclaw uninstall              # Remove all MetaClaw data, OpenClaw extension, and pip package

When you start MetaClaw, the command waits until the local proxy becomes healthy before returning. Use metaclaw status to verify readiness and metaclaw stop to stop the background process.

Full config reference (click to expand)
mode: auto                 # "auto" | "rl" | "skills_only"
claw_type: openclaw        # "openclaw" | "copaw" | "ironclaw" | "picoclaw" | "zeroclaw" | "nanoclaw" | "nemoclaw" | "hermes" | "none"

llm:
  auth_method: api_key      # "api_key" | "oauth_token"
  provider: kimi            # kimi | qwen | openai | minimax | novita | openrouter | volcengine | custom
  model_id: moonshotai/Kimi-K2.5
  api_base: https://api.moonshot.cn/v1
  api_key: sk-...
  # oauth_token example (token stored via `metaclaw auth paste-token`):
  # auth_method: oauth_token
  # provider: anthropic     # anthropic | openai-codex | gemini
  # model_id: claude-sonnet-4-6

proxy:
  port: 30000
  api_key: ""              # optional bearer token for the local MetaClaw proxy

skills:
  enabled: true
  dir: ~/.metaclaw/skills   # your skill library
  retrieval_mode: template  # template | embedding
  top_k: 6
  task_specific_top_k: 10   # cap task-specific skills (default 10)
  auto_evolve: true         # auto-summarize skills after each session

rl:
  enabled: false            # set to true to enable RL training
  backend: auto             # "auto" | "tinker" | "mint" | "weaver"
  model: moonshotai/Kimi-K2.5
  api_key: ""
  base_url: ""              # optional backend endpoint, e.g. https://mint.macaron.xin/ for MinT or https://weaver-console.nex-agi.cn for Weaver
  tinker_api_key: ""        # legacy alias for api_key
  tinker_base_url: ""       # legacy alias for base_url
  prm_url: https://api.openai.com/v1
  prm_model: gpt-5.2
  prm_api_key: ""
  lora_rank: 32
  batch_size: 4
  resume_from_ckpt: ""      # optional checkpoint path to resume training
  evolver_api_base: ""      # leave empty to reuse llm.api_base
  evolver_api_key: ""
  evolver_model: gpt-5.2

opd:
  enabled: false            # set to true to enable OPD (teacher distillation)
  teacher_url: ""           # teacher model base URL (OpenAI-compatible /v1/completions)
  teacher_model: ""         # teacher model name (e.g., Qwen/Qwen3-32B)
  teacher_api_key: ""       # teacher model API key
  kl_penalty_coef: 1.0      # KL penalty coefficient for OPD

max_context_tokens: 20000   # prompt token cap before truncation; 0 = no truncation (recommended
                            # for skills_only mode with large-context cloud models)
context_window: 0           # context window advertised to the agent (e.g. OpenClaw compaction
                            # threshold); 0 = auto (200 000 in skills_only, 32 768 in rl/auto)

scheduler:                  # v0.3: meta-learning scheduler (auto-enabled in auto mode)
  enabled: false            # auto mode enables this automatically; set manually for rl mode
  sleep_start: "23:00"
  sleep_end: "07:00"
  idle_threshold_minutes: 30
  min_window_minutes: 15
  calendar:
    enabled: false
    credentials_path: ""
    token_path: ""

💪 Skills Mode

metaclaw start --mode skills_only

The lightest mode. No GPU, no RL backend needed. MetaClaw places your LLM behind a proxy that injects relevant skills at every turn, then auto-summarizes new skills after each conversation.

For OpenAI-compatible custom providers, set llm.api_base to the full chat API base (usually ending in /v1, for example https://your-gateway.example/v1). In skills_only mode, MetaClaw reuses that same endpoint for prompt compression and related helper LLM calls unless you configure a separate evolver endpoint.

Skills are short Markdown instructions stored in ~/.metaclaw/skills/ as individual SKILL.md files. The library grows automatically with your usage.

To pre-load the built-in skill bank (40+ skills across coding, security, agentic tasks, etc.):

cp -r memory_data/skills/* ~/.metaclaw/skills/

🔬 RL Mode

metaclaw start --mode rl

Everything in Skills Mode, plus continuous RL fine-tuning from live conversations. Each conversation turn is tokenized and submitted as a training sample. A judge LLM (PRM) scores responses asynchronously, and a Tinker-compatible backend (Tinker cloud, MinT, or Weaver

MetaClaw (aiming-lab/MetaClaw)

Searching Database…

这是什么?MetaClaw 位于你的个人 AI 智能体与其大模型之间,把每一次对话都变成学习信号:它在每一轮注入相关技能,还可以选择运行强化学习微调,让智能体在实际使用中不断进步,基础模式无需 GPU。
这是编程框架,还是我运行的后台服务?它是由 metaclaw CLI 控制的本地代理服务,不是导入代码的库——它以透明方式拦截智能体的大模型流量。
怎么让它跑起来?用 pip 安装(来自 PyPI 或本仓库),运行交互式的 metaclaw setup 向导来选择智能体和大模型提供商,然后执行 metaclaw start——它会自动接好你选的智能体。
安装上有什么需要留意的坑吗?默认 Tinker 之外的强化学习后端不随包附带:要用 MinT 需另外安装 mindlab-toolkit,要用 Weaver 需安装 nex-weaver,而且都要装在与 MetaClaw 相同的环境中。
它支持哪些个人智能体和操作系统?它可以为 OpenClaw、CoPaw、IronClaw、PicoClaw、ZeroClaw、NanoClaw、NemoClaw、Hermes Agent 或任何 OpenAI 兼容客户端做代理,并通过 macOS 上的 launchctl 或 Linux 上的 systemctl 重启服务(Windows 的安装方式另行提供文档)。
自动模式和 RL 模式有什么不同?自动模式执行与 RL 模式相同的技能注入和强化学习训练,但会把模型权重更新推迟到睡眠、空闲或日历会议时段,训练绝不会打断正在进行的聊天。
长期记忆功能是怎么工作的?MetaClaw 的 Contexture 层跨会话持久保存事实、偏好和项目历史,默认每隔几轮就提取并保存一次,再把相关上下文注入到之后的提示中。
MetaClaw 能和微信一起用吗?可以——启用微信集成时,它会自动安装官方的 @tencent-weixin/openclaw-weixin 插件,还支持用新二维码重新登录来切换账号。
What are similar projects?OpenClaw-RL, unsloth, reef, Raven, brigade, codeAgent, ART, EverOS
Creator
aiming-lab
Size
76.5 MB
Stars
3.5K
Age
7mo
Commits · 90 Days