MCPcopy
hub / github.com/aiming-lab/MetaClaw

github.com/aiming-lab/MetaClaw @v0.4.1 sqlite

repository ↗ · DeepWiki ↗ · release v0.4.1 ↗
2,869 symbols 14,564 edges 169 files 1,588 documented · 55%
README

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🇦🇪 العربية🇮🇳 हिन्दी

OverviewQuick StartMulti-Claw SupportConfigurationSkills ModeRL ModeAuto ModeMemoryCitation


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

  • [04/11/2026] v0.4.1 — Incremental memory ingestion: the memory layer now extracts and persists turns every N turns (default 5) instead of only at session end, shrinking the mid-session memory blackout window. Adds new /buffer_turn and /flush_session sidecar endpoints, a benchmark harness with a --buffer-turns flag, and experiment comparison reports.
  • [03/25/2026] v0.4.0 — Contexture layer: MetaClaw now persists cross-session memory for users and projects. Relevant facts, preferences, and project history are automatically retrieved and injected into prompts. Includes adaptive memory policy, background consolidation, and an optional memory sidecar service.
  • [03/24/2026] v0.3.3 — One-click OpenClaw plugin: MetaClaw now ships as a native OpenClaw extension — drop the folder into OpenClaw's extensions, run one command, and everything is set up automatically.
  • [03/18/2026] Our technical report "MetaClaw: Just Talk -- An Agent That Meta-Learns and Evolves in the Wild" is out! 🏆 Ranked No. 1 on HuggingFace Daily Papers! Check it out!
  • [03/16/2026] v0.3.2 — Multi-claw support: IronClaw, PicoClaw, ZeroClaw, CoPaw, NanoClaw, and NemoClaw now supported alongside OpenClaw. NanoClaw connected via new /v1/messages Anthropic-compatible endpoint; NemoClaw via OpenShell inference routing. Added OpenRouter as a supported LLM platform.
  • [03/13/2026] v0.3.1 — MinT backend support: RL training now works with both Tinker and MinT. Configurable via rl.backend (auto/tinker/mint).
  • [03/13/2026] v0.3 — Continual meta-learning support: slow RL updates now only run during sleep hours, idle time, or Google Calendar meetings. Added support/query set separation to prevent stale reward signals from polluting model updates.
  • [03/11/2026] v0.2 — One-click deployment via metaclaw CLI. Skills enabled by default, RL is now opt-in.
  • [03/09/2026] We release MetaClaw — Just talk to your agent and let it evolve automatically. NO GPU deployment required; just plug into the API.

🎥 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 agentopenclaw, copaw, ironclaw, picoclaw, zeroclaw, nanoclaw, nemoclaw, or none (MetaClaw will auto-configure it on start) 2. Choose your auth methodapi_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.jsonmodels.defaultopenai_compatible pointing at the proxy port. CoPaw's ConfigWatcher hot-reloads automatically.
ironclaw IronClaw Patches ~/.ironclaw/.envLLM_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.tomlprovider = "openai-compatible" + base_url/model/api_key. Runs zeroclaw service restart.
nanoclaw NanoClaw Patches nanoclaw's .envANTHROPIC_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 automa

Extension points exported contracts — how you extend this code

PluginConfig (Interface)
(no doc)
openclaw-metaclaw-memory/src/types.ts
MemoryUnit (Interface)
(no doc)
openclaw-metaclaw-memory/src/types.ts
SearchResult (Interface)
(no doc)
openclaw-metaclaw-memory/src/types.ts
RetrieveResponse (Interface)
(no doc)
openclaw-metaclaw-memory/src/types.ts
IngestResponse (Interface)
(no doc)
openclaw-metaclaw-memory/src/types.ts

Core symbols most depended-on inside this repo

get
called by 904
metaclaw/config_store.py
close
called by 609
metaclaw/memory/store.py
add_memories
called by 314
metaclaw/memory/store.py
info
called by 313
benchmark/data/metaclaw-bench/workspaces/shared/day18/log_handler.py
to_metaclaw_config
called by 145
metaclaw/config_store.py
list_active
called by 143
metaclaw/memory/store.py
from_config
called by 110
metaclaw/memory/manager.py
warning
called by 79
benchmark/data/metaclaw-bench/workspaces/shared/day18/log_handler.py

Shape

Method 1,507
Function 934
Class 355
Route 60
Interface 13

Languages

Python97%
TypeScript3%

Modules by API surface

tests/test_memory_system.py745 symbols
metaclaw/memory/manager.py187 symbols
metaclaw/cli.py186 symbols
openclaw-metaclaw-memory/sidecar/metaclaw/memory/manager.py182 symbols
metaclaw/api_server.py83 symbols
openclaw-metaclaw-memory/sidecar/metaclaw/memory/store.py82 symbols
metaclaw/memory/store.py82 symbols
benchmark/tests/test_infer.py48 symbols
openclaw-metaclaw-memory/sidecar/metaclaw_memory_sidecar/server.py45 symbols
openclaw-metaclaw-memory/sidecar/metaclaw/memory/self_upgrade.py39 symbols
metaclaw/memory/self_upgrade.py39 symbols
benchmark/tests/test_scoring.py38 symbols

Dependencies from manifests, versioned

@sinclair/typebox0.32.0 · 1×
@types/node20.0.0 · 1×
typescript5.4.0 · 1×
celery5.2.7 · 1×
click8.0 · 1×
fastapi0.100 · 1×
flask2.3.2 · 1×
prometheus-client0.16.0 · 1×
pydantic2.0.3 · 1×
pyyaml6.0 · 1×
redis4.5.5 · 1×
requests2.31.0 · 1×

For agents

$ claude mcp add MetaClaw \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact