# TeachReplay — OpenMausBot Integration **This repository is the OpenMausBot reference integration of TeachReplay — not the main project.** > 👉 **The main project is [TeachReplay](https://github.com/Ottohere-Mourn/TeachReplay)** — > a standalone, harness-agnostic Teach-by-Demonstration engine > (`Record → Compile → Replay → Verify`) with zero OpenMausBot dependencies. ## What this integration is A thin adapter that mounts the TeachReplay Core (`@teachreplay/core` + `@teachreplay/remote` + `@teachreplay/mock`) inside OpenMausBot's harness: - **Teach Task panel** — record a demonstration, compile it into a parameterized skill, and replay it with new inputs from the OpenMausBot chat UI - **Backend selection** — SSH remote computer → the bot's cloud computer (Box) → the built-in demo computer - **SSE lifecycle** — `teach.*` event frames on OpenMausBot's existing event stream - **Persistence** — trajectories and skills under `~/.openmausbot/teach/` All record/compile/replay/verify logic lives in the TeachReplay Core; this repository contributes only `server/teach/manager.ts` (the adapter), `server/teach/backends/box.ts` (the OpenMausBot-specific cloud backend), the API routes, and the UI panel. ## How to run it ```sh pnpm install pnpm dev:server # harness server → 127.0.0.1:8799 pnpm dev # app → http://127.0.0.1:5199 ``` Create a bot, click the graduation-cap button in the chat header, and follow the panel: **Start recording → demonstrate on the demo computer → Stop → Compile & save → Replay with new inputs**. The `Simulate UI drift` button demonstrates the explicit-failure path. ## OpenMausBot-specific setup - The adapter resolves `@teachreplay/*` via `file:` dependencies on a sibling checkout of the [TeachReplay](https://github.com/Ottohere-Mourn/TeachReplay) monorepo (`pnpm build` there first). - Remote computer: `OMB_TEACH_REMOTE_HOST/PORT/USER/KEY` env vars (any SSH Linux box with the TeachReplay GUI stack — see [`scripts/teachremote/`](scripts/teachremote/)). - Cloud computer: a Box API key in App Settings; the box backend is deliberately passive (never provisions or wakes a box on its own). Full technical documentation: [`docs/teach-mode.md`](docs/teach-mode.md). ## Historical v0.1 context This repository was the development vehicle for TeachReplay **v0.1** — the first working Teach-by-Demonstration implementation, developed and validated inside OpenMausBot (released 2026-08, see the [v0.1 release](https://github.com/Ottohere-Mourn/TeachReplay-OpenMausBot/releases/tag/v0.1.0) and the recorded [mini-benchmark results](scripts/teach-benchmark-results.json)). In **v0.2**, the teach engine was extracted into the standalone [TeachReplay](https://github.com/Ottohere-Mourn/TeachReplay) monorepo, and this repository became the reference integration on top of it — the same code paths, verified by the same real-server end-to-end tests. ## Attribution Built on [OpenMausBot](https://github.com/milind-soni/OpenMausBot) by Milind Soni and contributors (Apache-2.0). The original upstream README is preserved at [docs/openmausbot-README.md](docs/openmausbot-README.md); see [LICENSE](LICENSE) and [NOTICE](NOTICE). The TeachReplay engine itself lives under [Ottohere-Mourn/TeachReplay](https://github.com/Ottohere-Mourn/TeachReplay).