# moonclaw **Repository Path**: vcdplus/moonclaw ## Basic Information - **Project Name**: moonclaw - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-25 - **Last Updated**: 2026-03-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MoonClaw > πŸ‡ MoonBit-native agent runtime + πŸ“‘ gateway + 🧠 memory + πŸ—‚οΈ job system + πŸ€– ACP remote-agent control `MoonBit` `Agent Runtime` `Gateway` `Jobs` `ACP` `Feishu` `Weixin` `Memory` `Artifacts` `Operator UI` MoonClaw is an agent and automation system built on top of [moonbitlang/maria](https://github.com/moonbitlang/maria), inspired by [openclaw/openclaw](https://github.com/openclaw/openclaw), and shaped around a full job runtime instead of a thin chat wrapper. It is designed for: - πŸ’¬ chat-driven planning - βš™οΈ long-running background jobs - πŸ§ͺ analysis workflows - πŸ“ dedicated run workspaces with git checkpoints - 🧠 structured long-term memory - 🌐 gateway + operator UI - πŸ€– local jobs working alongside ACP remote agents ## ✨ What MoonClaw Feels Like ```text chat / CLI / Feishu / web UI -> draft a proposal -> compile to workflow -> execute as a job -> persist artifacts, memory, and workspace state -> inspect local + remote activity from one operator surface ``` MoonClaw is strongest when you want one system to handle: - πŸ› οΈ local execution - πŸ”„ async orchestration - 🧾 durable outputs - 🧭 operator control - 🀝 local-agent + remote-agent handoff ## News - `2026-03-24`: merged `opc`, `weixin`, and `canvas`; added Weixin Official Account support; upgraded the controller/company canvas; made the generic fallback a single `execute` step - `2026-03-23`: added generic worker routing with `child_profile`, `execution_mode`, and `execution_target`; routed analysis through ACP - `2026-03-20`: made job and run ids human-readable; moved run workspaces under `/moonclaw-jobs`; fixed local time display; improved Feishu progress UX - `2026-03-19`: added the research job example and test guide; made controller policy more declarative and JSON-driven - `2026-03-17`: added `acp add codex`; fixed `~/.moonclaw` defaults and ACP repeated-run handling ## Operator UX Current job behavior is designed to stay readable from chat and from the workspace: - new proposal ids are human-readable and time-prefixed instead of raw UUIDs - new run ids use a readable `run-YYYYMMDD-HHMMSS-...` format - `/job-status` and `/jobs` show job title and created time alongside ids - top-level run workspaces are created under `/moonclaw-jobs/` - child runs are created under the parent run workspace at `moonclaw-subjobs/` - run workspaces are run-owned and no longer copy workspace markdown like `AGENTS.md`, `USER.md`, `MEMORY.md`, `IDENTITY.md`, or `ROUTINES.md` - job timestamps are rendered in local time with an explicit offset ## πŸš€ Current Capabilities - πŸ–₯️ `interactive` and `tui` local modes - πŸ“‘ long-running HTTP/RPC `gateway` - πŸͺ½ Feishu integration - πŸ’¬ Weixin Official Account integration - 🧠 memory capture, retrieval, and workspace materialization - πŸ—‚οΈ per-run and per-subjob workspaces - 🌳 git-managed run history inside each workspace - πŸ“¦ artifact storage and grounded artifact Q&A - πŸ”¬ generic job workflows - πŸ€– ACP targets, sessions, and runs for remote agent control - πŸͺŸ Rabbita operator UI with: - local job expansion - ACP remote-agent lane - mixed local↔remote lineage view - controller/company board lanes - transcript and case export ## 🧩 Main Subsystems - `agent` core conversation and execution runtime - `gateway` long-running service, HTTP/RPC surface, channels, ACP control - `job` planning, compilation, execution, artifacts, memory, workspace integration - `workspace` configured workspace runtime plus dedicated run workspaces - `security` session scope, approval, pairing, command policy - `acp` remote-agent control plane and Codex-oriented execution bridge - `ui/rabbita-job` operator UI for local + remote execution ## ⚑ Quick Start From the repo root: ```bash cd ~/Workspace/moonclaw ``` Run onboarding status: ```bash moon run cmd/main -- onboard status --home ~/.moonclaw ``` Use Codex OAuth and switch the primary model automatically: ```bash moon run cmd/main -- onboard auth codex --home ~/.moonclaw ``` Provision a Codex ACP target that the gateway can launch later: ```bash moon run cmd/main -- acp add codex --home ~/.moonclaw ``` If you want multiple ACP targets, add them with explicit ids: ```bash moon run cmd/main -- acp add codex --home ~/.moonclaw --id codex-review --workspace ~/Workspace/review-scratch --model gpt-5 ``` Configure Feishu: ```bash moon run cmd/main -- onboard configure \ --home ~/.moonclaw \ --enable-feishu \ --feishu-app-id \ --feishu-app-secret ``` Start the gateway: ```bash moon run cmd/main -- gateway start --home ~/.moonclaw ``` Important: - `--home ~/.moonclaw` stores MoonClaw runtime state such as jobs, runs, memories, and gateway data. - `gateway start` now falls back to the configured `agents.defaults.cwd` and `gateway.port` from `moonclaw.json`. - `acp add codex` now falls back to `agents.defaults.workspace` for the target workspace and `agents.defaults.cwd` for the target cwd. - `--cwd` still overrides the writable workspace explicitly when you want to point the gateway somewhere else. - If you point `--cwd` at a git repo, MoonClaw may create or edit files inside that repo. - Use a separate workspace if you do not want generated files mixed into your source tree. Example with an isolated workspace instead of the repo: ```bash mkdir -p ~/.moonclaw/workspace moon run cmd/main -- gateway start --home ~/.moonclaw --cwd ~/.moonclaw/workspace ``` With that setup, new run workspaces will appear under: ```text ~/.moonclaw/workspace/moonclaw-jobs/ ``` instead of being hidden under a nested `.moonclaw/job-workspaces/` path. Open the operator UI: ```text http://localhost:18123/ui ``` If `/ui` says the Rabbita bundle is missing, build it from the repo: ```bash cd ~/Workspace/moonclaw/ui/rabbita-job npm install npm run build ``` The gateway serves the bundle at `/ui` and also serves the built `/assets/...` files that the bundle references. ## 🧭 Onboarding Flow Useful onboarding commands: ```bash moon run cmd/main -- onboard status --home ~/.moonclaw moon run cmd/main -- onboard auth status --home ~/.moonclaw moon run cmd/main -- onboard auth codex --home ~/.moonclaw moon run cmd/main -- onboard auth copilot --home ~/.moonclaw moon run cmd/main -- onboard models --home ~/.moonclaw moon run cmd/main -- onboard switch codex --home ~/.moonclaw moon run cmd/main -- onboard print-config --home ~/.moonclaw ``` Current behavior: - πŸ” `onboard auth codex` connects Codex OAuth and updates the primary model to `codex/gpt-5.4` - πŸ” `onboard auth copilot` connects Copilot OAuth and updates the primary model to `copilot/gpt-5.2` - 🎯 `onboard switch ` changes the active primary model explicitly - πŸͺ½ Feishu is built-in through `channels.feishu`, not through a plugin entry ACP target provisioning is separate from onboarding: ```bash moon run cmd/main -- acp add codex --home ~/.moonclaw moon run cmd/main -- acp add codex --home ~/.moonclaw --id codex-review --workspace ~/Workspace/review-scratch ``` Current ACP behavior: - `acp add codex` adds or updates a named Codex ACP target in `moonclaw.json` - use `--id` when you want more than one ACP target on the same machine - if `agents.defaults.workspace` is configured, `acp add codex` uses it as the default ACP workspace - if `agents.defaults.cwd` is configured, `acp add codex` uses it as the default ACP cwd - the command preserves unrelated config and only writes the target entry it manages - if ACP can attach but `codex exec ""` fails only from the gateway, pin `acp.targets..command` to the absolute path from `which codex` Local/controller analysis can also run through ACP when a step carries: - `execution_mode: "acp"` - `execution_target: ""` Example: ```bash which codex ``` Then set the ACP target command in `~/.moonclaw/moonclaw.json` to that exact path, for example: ```json { "acp": { "targets": { "codex-main": { "command": "/absolute/path/to/codex" } } } } ``` ## Research Job Example A concrete research-style controller profile is available at [research_job_moonclaw.json](/Users/kq/Workspace/moonclaw/docs/examples/research_job_moonclaw.json), with a matching test guide at [research_job_test_guide.md](/Users/kq/Workspace/moonclaw/docs/examples/research_job_test_guide.md). This is the intended way to test research ability right now: - copy the example `moonclaw.jobs.json` into an isolated workspace - start the gateway against that workspace - run `/plan-job` with a real literature-review style prompt - confirm it and inspect `/job-status` - inspect the generated run workspace under `/moonclaw-jobs/` - verify that behavior changes when you edit the JSON profile, without changing MoonBit code ## OPC Job Example A concrete one-person-company controller profile is available at [opc_moonclaw.jobs.json](/Users/kq/Workspace/moonclaw/docs/examples/opc_moonclaw.jobs.json), with a matching test guide at [opc_job_test_guide.md](/Users/kq/Workspace/moonclaw/docs/examples/opc_job_test_guide.md). This example is meant to prove the extension boundary: - MoonClaw core stays generic - OPC behavior comes from `moonclaw.jobs.json` - role behavior comes from workspace `skills/` - controller bookkeeping, delegation, artifacts, and notifications are reused The recommended architecture for keeping research and OPC side by side is documented in [extension_packs.md](/Users/kq/Workspace/moonclaw/docs/extension_packs.md). The Rabbita jobs surface can now render controller runs as a company-style board with: - split / merge anchors - horizontal role lanes - company health strip - lane sequence and handoff cards If a profile wants to control the board explicitly, step metadata can set: - `board_lane` - `board_order` otherwise the UI falls back to heuristics such as OPC skill and worker-role names. ## Weixin Usage MoonClaw can now run Feishu and Weixin together in one gateway instance. Weixin is currently implemented as a webhook-driven Official Account channel: - callback path: `/webhook/weixin` - plaintext text messages in the current slice - replies sent through the custom-service API See [openclaw_weixin_reference.md](/Users/kq/Workspace/moonclaw/docs/openclaw_weixin_reference.md). ## πŸͺ½ Feishu Usage Once Feishu is configured and the gateway is running, the important commands are: - `/plan-job ` - `/confirm ` - `/revise ` - `/reject ` - `/job-status ` - `/jobs` - `/job-stop ` - `/job-force-stop ` - `/remember ` - `/memory-search ` ## πŸ€– Operator UI The Rabbita UI exposes three main surfaces: - 🧩 `Jobs` generative local workflow expansion - 🌐 `ACP` remote-agent targets, sessions, runs, stdout/stderr, cancel/reset/detach - πŸ”€ `Overview` mixed local↔remote lineage, handoffs, and case export Exports currently include: - πŸ“„ ACP run transcript - πŸ“š ACP session transcript - πŸ•°οΈ ACP session timeline transcript - πŸ”— focused mixed-lineage transcript - 🧳 combined case export ## πŸ› οΈ Local Modes Run local chat: ```bash moon run cmd/main -- interactive ``` Run the terminal UI: ```bash moon run cmd/main -- tui ``` ## πŸ“š Docs Start here: - [docs/system_architecture.md](docs/system_architecture.md) - [docs/job_system_architecture.md](docs/job_system_architecture.md) - [docs/GATEWAY_USAGE.md](docs/GATEWAY_USAGE.md) - [docs/expected_behaviors/README.md](docs/expected_behaviors/README.md) Behavior docs: - [docs/expected_behaviors/chat_and_job_flow.md](docs/expected_behaviors/chat_and_job_flow.md) - [docs/expected_behaviors/workspace_and_memory.md](docs/expected_behaviors/workspace_and_memory.md) - [docs/expected_behaviors/use_cases.md](docs/expected_behaviors/use_cases.md) - [docs/expected_behaviors/operator_ui.md](docs/expected_behaviors/operator_ui.md) ## πŸ”§ Development MoonClaw is a MoonBit project. Useful commands: ```bash moon check moon test moon info moon fmt ``` ## πŸ’‘ Positioning MoonClaw is not trying to be only: - a simple chat bot - a bare CLI coding wrapper - a single-step prompt runner It is trying to be: - 🧠 an agent runtime - πŸ—‚οΈ a durable job system - πŸͺ΅ a workspace-centric execution environment - πŸ“‘ an operator-controlled gateway - πŸ€– a local + remote multi-surface control plane ## Star Growth _Last updated: 2026-03-25_ | Date | Stars | Delta | | --- | ---: | ---: | | 2026-03-24 | 21 | β€” | | 2026-03-25 | 22 | +1 |