Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 43 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,13 @@ Serving, reward modeling, and training are fully decoupled. The agent continues
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 mindlab-toolkit # + optional MinT compatibility backend
pip install -e ".[scheduler]" # + Google Calendar integration for scheduler
pip install -e ".[rl,evolve,scheduler]" # recommended for full RL + scheduler setup
```

Use `mindlab-toolkit` only if you want `rl.backend=mint`. MinT docs: [overview](https://mint-doc.macaron.im/), [Tinker compatibility](https://mint-doc.macaron.im/using-the-api/tinker-compatibility), [model lineup](https://mint-doc.macaron.im/using-the-api/model-lineup), [GitHub](https://github.com/MindLab-Research/mindlab-toolkit).

### 2. Configure

```bash
Expand All @@ -166,6 +169,19 @@ metaclaw setup

The interactive wizard will ask you to choose your LLM provider (Kimi, Qwen, MiniMax, or custom), enter your API key, and optionally enable RL training.

MetaClaw's RL path keeps Tinker as the default reference backend. `rl.backend=auto` is the recommended default: it works with Tinker out of the box, and can also infer MinT from MinT-like credentials/base URLs when the MinT package is installed. If you want to point the same workflow at MinT, you can set:

```bash
metaclaw config rl.backend mint
metaclaw config rl.api_key sk-mint-...
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # China mainland; use https://mint.macaron.xin/ otherwise
metaclaw config rl.model Qwen/Qwen3-4B-Instruct-2507
```

Use `https://mint-cn.macaron.xin/` for mainland China or `https://mint.macaron.xin/` otherwise.

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

### 3. Start

```bash
Expand Down Expand Up @@ -193,7 +209,9 @@ metaclaw config KEY VALUE # Set a config value

```bash
metaclaw config rl.enabled true # Enable RL training
metaclaw config rl.tinker_api_key sk-... # Set Tinker key
metaclaw config rl.backend auto # auto | tinker | mint
metaclaw config rl.api_key sk-... # Set RL backend key
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # MinT mainland China endpoint; use https://mint.macaron.xin/ otherwise
metaclaw config skills.auto_evolve false # Disable auto skill summarization
metaclaw config proxy.port 31000 # Change proxy port
```
Expand Down Expand Up @@ -226,8 +244,12 @@ skills:

rl:
enabled: false # set to true to enable RL training
backend: auto # "auto" | "tinker" | "mint"
model: moonshotai/Kimi-K2.5
tinker_api_key: ""
api_key: ""
base_url: "" # optional backend endpoint, e.g. https://mint-cn.macaron.xin/ (mainland China) or https://mint.macaron.xin/ for MinT
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: ""
Expand Down Expand Up @@ -277,22 +299,33 @@ cp -r memory_data/skills/* ~/.metaclaw/skills/

## 🔬 Advanced: RL Mode

Enable RL training to continuously fine-tune the model from live conversations:
Enable RL training to continuously fine-tune the model from live conversations. Tinker remains the default reference path, and MetaClaw can also target MinT as a Tinker-compatible alternative:

```bash
metaclaw config rl.enabled true
metaclaw config rl.tinker_api_key sk-...
metaclaw config rl.backend auto
metaclaw config rl.api_key sk-...
metaclaw config rl.prm_url https://api.openai.com/v1
metaclaw config rl.prm_api_key sk-...
metaclaw start
```

If you want to run the same workflow on MinT, switch the backend and set the MinT endpoint/model:

```bash
metaclaw config rl.backend mint
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # China mainland; use https://mint.macaron.xin/ otherwise
metaclaw config rl.model Qwen/Qwen3-4B-Instruct-2507
```

In RL mode:
- Each conversation turn is tokenized and submitted as a training sample
- A judge LLM (PRM) scores responses asynchronously
- Tinker cloud runs LoRA fine-tuning; updated weights are hot-swapped every `batch_size` samples
- Tinker cloud handles LoRA fine-tuning by default; MetaClaw can also work with a compatible alternative such as MinT, and updated weights are hot-swapped every `batch_size` samples
- A dedicated evolver LLM extracts new skills from failed episodes

If you stay on Tinker, `rl.backend=auto` or `rl.backend=tinker` keeps the default path. If you use MinT, switch to `rl.backend=mint` and provide the MinT endpoint.

**Programmatic rollout** (no OpenClaw TUI needed): set `openclaw_env_data_dir` to a directory of JSONL task files:

```json
Expand Down Expand Up @@ -356,14 +389,17 @@ Each `ConversationSample` is tagged with a `skill_generation` version. When skil

## 🙏 Acknowledgements

MetaClaw builds on top of the following open-source projects:
MetaClaw builds on top of the following open-source projects and collaborations:

- [OpenClaw](https://openclaw.ai) – the core agent framework.
- [SkillRL](https://github.com/aiming-lab/SkillRL) – our skill-augmented RL framework.
- [Tinker](https://www.thinkingmachines.ai/tinker/) – used for online RL training.
- [Tinker](https://www.thinkingmachines.ai/tinker/) – the primary reference backend for online RL training in MetaClaw.
- [MinT](https://mint-doc.macaron.im/) – a Tinker-compatible alternative from [Mind Lab](https://macaron.im/mindlab), available via [`mindlab-toolkit`](https://github.com/MindLab-Research/mindlab-toolkit). Its current supported models are listed on the [official model lineup page](https://mint-doc.macaron.im/using-the-api/model-lineup).
- [OpenClaw-RL](https://github.com/Gen-Verse/OpenClaw-RL) – inspiration for our RL design.
- [awesome-openclaw-skills](https://github.com/VoltAgent/awesome-openclaw-skills) – provides the foundation for our skill bank.

The MinT compatibility work in this repository is one result of a collaboration between the MetaClaw project team and [Mind Lab](https://macaron.im/mindlab). In that collaboration, Mind Lab has focused on infrastructure research and LoRA RL algorithm optimization in support of the broader MetaClaw effort.

---

## 📄 License
Expand Down
50 changes: 43 additions & 7 deletions assets/README_DE.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,13 @@ Serving, Reward Modeling und Training sind vollständig entkoppelt. Der Agent an
pip install -e . # skills_only-Modus (leichtgewichtig)
pip install -e ".[rl]" # + RL-Trainingsunterstützung (torch, transformers, tinker)
pip install -e ".[evolve]" # + Skill-Evolution via OpenAI-kompatibler LLM
pip install mindlab-toolkit # + optionales MinT-Kompatibilitäts-Backend
pip install -e ".[scheduler]" # + Google Calendar Integration für Scheduler
pip install -e ".[rl,evolve,scheduler]" # empfohlen: vollständiges RL + Scheduler-Setup
```

`mindlab-toolkit` wird nur benötigt, wenn du `rl.backend=mint` verwenden willst. MinT-Links: [Überblick](https://mint-doc.macaron.im/), [Tinker-Kompatibilität](https://mint-doc.macaron.im/using-the-api/tinker-compatibility), [Modellliste](https://mint-doc.macaron.im/using-the-api/model-lineup), [GitHub](https://github.com/MindLab-Research/mindlab-toolkit).

### 2. Konfiguration

```bash
Expand All @@ -168,6 +171,19 @@ metaclaw setup

Der interaktive Assistent führt dich durch die Auswahl des LLM-Anbieters (Kimi, Qwen, MiniMax oder benutzerdefiniert), API-Schlüssel und optionale RL-Aktivierung.

Der RL-Pfad von MetaClaw behält Tinker als Standard-Referenzbackend. `rl.backend=auto` ist die empfohlene Voreinstellung und kann bei installiertem MinT-Kompatibilitätspaket auch MinT anhand Mint-typischer Credentials oder Base-URLs erkennen. Wenn du denselben Workflow auf MinT richten willst, kannst du Folgendes setzen:

```bash
metaclaw config rl.backend mint
metaclaw config rl.api_key sk-mint-...
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # Festlandchina; sonst https://mint.macaron.xin/
metaclaw config rl.model Qwen/Qwen3-4B-Instruct-2507
```

Nutze `https://mint-cn.macaron.xin/` für Festlandchina oder `https://mint.macaron.xin/` andernfalls.

Die Legacy-Aliase `rl.tinker_api_key` und `rl.tinker_base_url` werden aus Kompatibilitätsgründen weiterhin akzeptiert.

### 3. Start

```bash
Expand Down Expand Up @@ -195,7 +211,9 @@ metaclaw config KEY VALUE # Konfigurationswert setzen

```bash
metaclaw config rl.enabled true # RL-Training aktivieren
metaclaw config rl.tinker_api_key sk-... # Tinker-Schlüssel setzen
metaclaw config rl.backend auto # auto | tinker | mint
metaclaw config rl.api_key sk-... # Schlüssel für das RL-Backend setzen
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # MinT-Endpunkt für Festlandchina; sonst https://mint.macaron.xin/
metaclaw config skills.auto_evolve false # Automatische Skill-Zusammenfassung deaktivieren
metaclaw config proxy.port 31000 # Proxy-Port ändern
```
Expand Down Expand Up @@ -228,8 +246,12 @@ skills:

rl:
enabled: false # auf true setzen, um RL-Training zu aktivieren
backend: auto # "auto" | "tinker" | "mint"
model: moonshotai/Kimi-K2.5
tinker_api_key: ""
api_key: ""
base_url: "" # optionaler Backend-Endpunkt, z. B. https://mint-cn.macaron.xin/ (Festlandchina) oder https://mint.macaron.xin/ für MinT
tinker_api_key: "" # Legacy-Alias für api_key
tinker_base_url: "" # Legacy-Alias für base_url
prm_url: https://api.openai.com/v1
prm_model: gpt-5.2
prm_api_key: ""
Expand Down Expand Up @@ -279,22 +301,33 @@ cp -r memory_data/skills/* ~/.metaclaw/skills/

## 🔬 Erweitert: RL-Modus

RL-Training aktivieren, um das Modell kontinuierlich aus Live-Gesprächen feinabzustimmen:
RL-Training aktivieren, um das Modell kontinuierlich aus Live-Gesprächen feinabzustimmen. Tinker bleibt der Standard-Referenzpfad, und MetaClaw kann denselben Workflow auch auf MinT als Tinker-kompatible Alternative richten:

```bash
metaclaw config rl.enabled true
metaclaw config rl.tinker_api_key sk-...
metaclaw config rl.backend auto
metaclaw config rl.api_key sk-...
metaclaw config rl.prm_url https://api.openai.com/v1
metaclaw config rl.prm_api_key sk-...
metaclaw start
```

Wenn du denselben Workflow auf MinT ausführen willst, ergänze Backend, Endpunkt und Modell:

```bash
metaclaw config rl.backend mint
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # Festlandchina; sonst https://mint.macaron.xin/
metaclaw config rl.model Qwen/Qwen3-4B-Instruct-2507
```

Im RL-Modus:
- Jeder Gesprächszug wird tokenisiert und als Trainingsbeispiel eingereicht
- Ein Richter-LLM (PRM) bewertet Antworten asynchron
- Tinker Cloud führt LoRA-Fine-Tuning durch; aktualisierte Gewichte werden alle `batch_size` Samples hot-geswappt
- Standardmäßig übernimmt Tinker Cloud das LoRA-Fine-Tuning; MetaClaw kann aber auch mit einer kompatiblen Alternative wie MinT arbeiten, und aktualisierte Gewichte werden alle `batch_size` Samples hot-geswappt
- Ein dediziertes Evolver-LLM extrahiert neue Skills aus fehlgeschlagenen Episoden

Wenn du bei Tinker Cloud bleiben willst, nutze `rl.backend=auto` oder `rl.backend=tinker`. Für MinT setze `rl.backend=mint` und konfiguriere den entsprechenden Endpunkt.

**Programmatisches Rollout** (keine OpenClaw TUI nötig): `openclaw_env_data_dir` auf ein Verzeichnis mit JSONL-Aufgabendateien setzen:

```json
Expand Down Expand Up @@ -358,14 +391,17 @@ Jedes `ConversationSample` wird mit einer `skill_generation`-Version getaggt. We

## 🙏 Danksagungen

MetaClaw baut auf folgenden Open-Source-Projekten auf:
MetaClaw baut auf folgenden Open-Source-Projekten und Kollaborationen auf:

- [OpenClaw](https://openclaw.ai) — das zentrale Agent-Framework.
- [SkillRL](https://github.com/aiming-lab/SkillRL) — unser skill-erweitertes RL-Framework.
- [Tinker](https://www.thinkingmachines.ai/tinker/) — für Online-RL-Training verwendet.
- [Tinker](https://www.thinkingmachines.ai/tinker/) — das primäre Referenz-Backend für Online-RL-Training in MetaClaw.
- [MinT](https://mint-doc.macaron.im/) — eine Tinker-kompatible Alternative von [Mind Lab](https://macaron.im/mindlab), verfügbar über [`mindlab-toolkit`](https://github.com/MindLab-Research/mindlab-toolkit); unterstützte Modelle stehen auf der [offiziellen Modellliste](https://mint-doc.macaron.im/using-the-api/model-lineup).
- [OpenClaw-RL](https://github.com/Gen-Verse/OpenClaw-RL) — Inspiration für unser RL-Design.
- [awesome-openclaw-skills](https://github.com/VoltAgent/awesome-openclaw-skills) — stellt die Grundlage für unsere Skill-Bank bereit.

Die MinT-Kompatibilitätsarbeit in diesem Repository ist ein Ergebnis der Zusammenarbeit zwischen dem MetaClaw-Projektteam und [Mind Lab](https://macaron.im/mindlab). Mind Lab konzentriert sich in dieser Zusammenarbeit vor allem auf Infrastrukturforschung und LoRA-RL-Algorithmusoptimierung.

---

## 📄 Lizenz
Expand Down
50 changes: 43 additions & 7 deletions assets/README_ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,13 @@ El serving, el modelado de recompensas y el entrenamiento están completamente d
pip install -e . # modo skills_only (ligero)
pip install -e ".[rl]" # + soporte de entrenamiento RL (torch, transformers, tinker)
pip install -e ".[evolve]" # + evolución de skills via LLM compatible con OpenAI
pip install mindlab-toolkit # + backend de compatibilidad MinT opcional
pip install -e ".[scheduler]" # + integración Google Calendar para planificador
pip install -e ".[rl,evolve,scheduler]" # recomendado: configuración completa RL + planificador
```

Usa `mindlab-toolkit` solo si quieres `rl.backend=mint`. Enlaces de MinT: [overview](https://mint-doc.macaron.im/), [compatibilidad con Tinker](https://mint-doc.macaron.im/using-the-api/tinker-compatibility), [lista de modelos](https://mint-doc.macaron.im/using-the-api/model-lineup), [GitHub](https://github.com/MindLab-Research/mindlab-toolkit).

### 2. Configuración

```bash
Expand All @@ -168,6 +171,19 @@ metaclaw setup

El asistente interactivo te pedirá que elijas tu proveedor de LLM (Kimi, Qwen, MiniMax o personalizado), tu clave API y si deseas activar el entrenamiento RL.

La ruta RL de MetaClaw mantiene a Tinker como backend de referencia por defecto. `rl.backend=auto` es el valor recomendado y también puede detectar MinT a partir de credenciales o base URLs estilo Mint cuando el paquete de compatibilidad de MinT está instalado. Si quieres apuntar el mismo flujo a MinT, puedes configurar:

```bash
metaclaw config rl.backend mint
metaclaw config rl.api_key sk-mint-...
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # China continental; fuera de China usa https://mint.macaron.xin/
metaclaw config rl.model Qwen/Qwen3-4B-Instruct-2507
```

Usa `https://mint-cn.macaron.xin/` para China continental o `https://mint.macaron.xin/` en otros casos.

Los alias heredados `rl.tinker_api_key` y `rl.tinker_base_url` siguen siendo válidos por compatibilidad.

### 3. Inicio

```bash
Expand Down Expand Up @@ -195,7 +211,9 @@ metaclaw config KEY VALUE # Establecer un valor de configuración

```bash
metaclaw config rl.enabled true # Activar entrenamiento RL
metaclaw config rl.tinker_api_key sk-... # Establecer clave Tinker
metaclaw config rl.backend auto # auto | tinker | mint
metaclaw config rl.api_key sk-... # Establecer clave del backend RL
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # Endpoint de MinT para China continental; fuera de China usa https://mint.macaron.xin/
metaclaw config skills.auto_evolve false # Desactivar resumen automático de skills
metaclaw config proxy.port 31000 # Cambiar puerto del proxy
```
Expand Down Expand Up @@ -228,8 +246,12 @@ skills:

rl:
enabled: false # poner a true para activar entrenamiento RL
backend: auto # "auto" | "tinker" | "mint"
model: moonshotai/Kimi-K2.5
tinker_api_key: ""
api_key: ""
base_url: "" # endpoint opcional del backend, p. ej. https://mint-cn.macaron.xin/ (China continental) o https://mint.macaron.xin/ para MinT
tinker_api_key: "" # alias heredado de api_key
tinker_base_url: "" # alias heredado de base_url
prm_url: https://api.openai.com/v1
prm_model: gpt-5.2
prm_api_key: ""
Expand Down Expand Up @@ -279,22 +301,33 @@ cp -r memory_data/skills/* ~/.metaclaw/skills/

## 🔬 Avanzado: Modo RL

Activa el entrenamiento RL para afinar continuamente el modelo a partir de conversaciones en vivo:
Activa el entrenamiento RL para afinar continuamente el modelo a partir de conversaciones en vivo. Tinker sigue siendo la ruta de referencia por defecto, y MetaClaw también puede apuntar a MinT como alternativa compatible con Tinker:

```bash
metaclaw config rl.enabled true
metaclaw config rl.tinker_api_key sk-...
metaclaw config rl.backend auto
metaclaw config rl.api_key sk-...
metaclaw config rl.prm_url https://api.openai.com/v1
metaclaw config rl.prm_api_key sk-...
metaclaw start
```

Si quieres ejecutar el mismo flujo sobre MinT, añade backend, endpoint y modelo:

```bash
metaclaw config rl.backend mint
metaclaw config rl.base_url https://mint-cn.macaron.xin/ # China continental; fuera de China usa https://mint.macaron.xin/
metaclaw config rl.model Qwen/Qwen3-4B-Instruct-2507
```

En modo RL:
- Cada turno de conversación se tokeniza y se envía como muestra de entrenamiento
- Un LLM juez (PRM) puntúa las respuestas de forma asíncrona
- Tinker Cloud ejecuta el fine-tuning LoRA; los pesos actualizados se hot-swap cada `batch_size` muestras
- Por defecto, Tinker Cloud ejecuta el fine-tuning LoRA; MetaClaw también puede funcionar con una alternativa compatible como MinT, y los pesos actualizados se hot-swap cada `batch_size` muestras
- Un LLM evolucionador dedicado extrae nuevos skills de los episodios fallidos

Si te quedas con Tinker Cloud, usa `rl.backend=auto` o `rl.backend=tinker`. Si usas MinT, cambia a `rl.backend=mint` y configura el endpoint correspondiente.

**Rollout programático** (sin TUI de OpenClaw): establece `openclaw_env_data_dir` en un directorio de archivos JSONL de tareas:

```json
Expand Down Expand Up @@ -358,14 +391,17 @@ Cada `ConversationSample` se etiqueta con una versión `skill_generation`. Cuand

## 🙏 Agradecimientos

MetaClaw se construye sobre los siguientes proyectos de código abierto:
MetaClaw se construye sobre los siguientes proyectos de código abierto y colaboraciones:

- [OpenClaw](https://openclaw.ai) — el framework central de agentes.
- [SkillRL](https://github.com/aiming-lab/SkillRL) — nuestro framework RL aumentado con skills.
- [Tinker](https://www.thinkingmachines.ai/tinker/) — usado para entrenamiento RL en línea.
- [Tinker](https://www.thinkingmachines.ai/tinker/) — el backend de referencia principal para el entrenamiento RL en línea de MetaClaw.
- [MinT](https://mint-doc.macaron.im/) — una alternativa compatible con Tinker de [Mind Lab](https://macaron.im/mindlab), disponible vía [`mindlab-toolkit`](https://github.com/MindLab-Research/mindlab-toolkit); los modelos soportados están en la [página oficial](https://mint-doc.macaron.im/using-the-api/model-lineup).
- [OpenClaw-RL](https://github.com/Gen-Verse/OpenClaw-RL) — inspiración para nuestro diseño RL.
- [awesome-openclaw-skills](https://github.com/VoltAgent/awesome-openclaw-skills) — proporciona la base de nuestro banco de skills.

El trabajo de compatibilidad con MinT en este repositorio es uno de los resultados de la colaboración entre el equipo del proyecto MetaClaw y [Mind Lab](https://macaron.im/mindlab). En esa colaboración, Mind Lab se ha centrado principalmente en la investigación de infraestructura y en la optimización de algoritmos LoRA RL.

---

## 📄 Licencia
Expand Down
Loading