# MetaClaw

> A local proxy that makes a personal agent learn from every conversation — skills, memory and optional RL

- Category: Agents & Automation / Agent Memory
- Language: Python
- Licence: MIT
- Repository: https://github.com/aiming-lab/MetaClaw
- Canonical page: https://ai-tldr.dev/tools/metaclaw/
- Updated: 2026-04-11

## In short

MetaClaw is an open-source layer from AIMING Lab that lets a personal AI agent improve from ordinary use. It sits in the Agent Memory category of the Agents & Automation tools and is open-source, written in Python and licensed MIT. To get started: install from the repository.

## Overview

MetaClaw is an open-source layer from AIMING Lab that lets a personal AI agent improve from ordinary use. You keep talking to your agent as usual; MetaClaw places the model behind a local proxy that intercepts each interaction, injects relevant skills at every turn, and turns the finished conversation into new skills. It works with OpenClaw, CoPaw, IronClaw, PicoClaw, ZeroClaw, NanoClaw, NemoClaw and Hermes Agent, or with any OpenAI-compatible client pointed at the proxy by hand.

It runs in three modes. `skills_only` just proxies your LLM API, retrieves skills from a library of Markdown `SKILL.md` files and auto-summarises new ones after each session — no GPU and no training backend needed. `rl` adds continuous reinforcement-learning fine-tuning: each turn becomes a training sample, a judge LLM scores responses asynchronously, and a Tinker-compatible cloud backend (Tinker, MinT or Weaver) runs LoRA updates with hot-swapped weights. `auto`, the default, adds a scheduler that holds those weight updates until you are asleep, idle at the keyboard or in a Google Calendar meeting, because the hot-swap pauses the agent for several minutes.

Since v0.4.0 MetaClaw also keeps long-term memory alongside skills: skills capture how to do things, memory captures what has happened — episodic events, facts about you and your projects, preferences, project state and a rolling working summary — and retrieves the relevant units into the prompt on the next turn. Serving, reward scoring and training are decoupled, so the agent keeps answering while learning runs in the background. The approach is described in the team's technical report on arXiv (2603.17187).

## What it does

- Transparent proxy for personal agents: `metaclaw start` brings up the proxy and auto-configures OpenClaw, CoPaw, IronClaw, PicoClaw, ZeroClaw, NanoClaw, NemoClaw or Hermes Agent
- OpenAI-compatible `/v1` endpoint plus an Anthropic-compatible `/v1/messages` endpoint for Anthropic-native agents
- Skill library of Markdown `SKILL.md` files, injected per turn by template or embedding retrieval and grown automatically after each session, with a built-in bank of 40+ skills to pre-load
- Long-term memory with episodic, semantic, preference, project-state and working-summary units, keyword/semantic/hybrid retrieval, background consolidation and an optional memory sidecar service
- Optional online RL (GRPO) with cloud LoRA fine-tuning on Tinker, MinT or Weaver, a judge LLM for rewards, and optional on-policy distillation from a larger teacher model
- Meta-learning scheduler that defers weight updates to sleep hours, keyboard inactivity or calendar meetings, saving a partial batch if you come back mid-update

## Getting started

MetaClaw is a Python package with a `metaclaw` CLI. Skills-only mode needs nothing but an LLM API key; RL needs an account with a Tinker-compatible training backend. OpenClaw users can alternatively install the one-click plugin from the v0.4.0 release.

1. Install from the repository

   The base install is skills-only; extras add RL training, LLM-driven skill evolution and the calendar-aware scheduler.

```bash
git clone https://github.com/aiming-lab/MetaClaw.git
cd MetaClaw
pip install -e .                        # skills_only mode (lightweight)
pip install -e ".[rl,evolve,scheduler]" # recommended for full RL + scheduler setup
```

2. Or install the OpenClaw plugin

   For OpenClaw, the README's one-click path drops the release plugin into OpenClaw's extensions folder.

```bash
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
```

3. Run the setup wizard

   The wizard asks which personal agent to wire up, whether to authenticate with an API key or an OAuth token, which LLM provider and model to use, and whether to enable RL. Configuration is written to `~/.metaclaw/config.yaml`.

```bash
metaclaw setup
```

4. Start it

   `metaclaw start` launches the proxy in auto mode, points your chosen agent at it and restarts the agent's gateway. Pick a lighter mode per session if you have no training backend.

```bash
metaclaw start                     # default: auto mode — skills + scheduled RL training
metaclaw start --mode skills_only  # skills only, no RL (no Tinker needed)
metaclaw status                    # check proxy health, running mode, and scheduler state
```

5. Turn on long-term memory

   Memory is off by default; one config key enables it, after which facts and preferences from past sessions are retrieved into the prompt.

```bash
metaclaw config memory.enabled true
```

6. Wire a custom client manually (optional)

   With `claw_type` set to `none`, point any OpenAI-compatible client at the local proxy.

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

## When to use it

- Give an OpenClaw-family personal agent skills and memory that accumulate from your own conversations instead of a fixed prompt
- Personalise a hosted model to how you work through LoRA fine-tuning on a cloud backend, without running a GPU cluster
- Keep training out of the way by scheduling weight updates for nights, idle time or meetings
- Research continual, in-the-wild agent learning with a reproducible proxy, scheduler and the accompanying MetaClaw-Bench

## Version history

- 2026-04-11 v0.4.1: Incremental memory ingestion: the memory layer buffers turns and flushes them every N turns (default 5) instead of only at session end, shrinking the mid-session memory blackout window.
- 2026-03-25 v0.4.0: Adds the Contexture layer: cross-session memory for users and projects, with automatic retrieval into prompts, an adaptive memory policy, background consolidation and an optional memory sidecar service.
