Moon gives OpenClaw persistent, cited memory. One Rust binary and one SQLite database store evidence, memories, sources, topics and search indexes. Local keyword and vector search assemble context for the current question.
| Your situation | Guide |
|---|---|
| First installation | Getting started |
| Existing installation | Upgrade checklist |
| Agent instructions | Refresh SKILL.md and its guides |
| Check recall or learning | Verification |
| Capture articles or notes | Source capture and review |
| Combine reviewed sources | Topic synthesis |
Moon 2.9.4 updates SKILL.md. Refresh every separately installed copy,
including Codex or other agent folders. The updater refreshes its managed
OpenClaw skill. The six-file compatibility bundle omits the supporting guides.
Copy the guides from the same release using the
skill update instructions.
During a signed update, let Moon finish its Gateway readiness checks and any rollback before starting another update.
The OpenClaw main model selected for each chat turn decides whether to use saved
facts, request original messages, flag an ambiguous reference or skip recall. It
can split a question across up to three subjects. Moon checks the available
sources and readers before retrieval. Planning takes one tool-free call to the
chat model. When Moon finds eligible candidates, a second call selects
supporting record IDs. Moon supplies those exact records to the answer. When
optional recall finds no support, the replying model can use a relevant skill.
An opt-out makes no stored memory or history reads. Each newly recorded private
chat turn keeps the verified sender ID, question owners and potential readers.
Confirmed replies have separate delivery owners. L1 interprets the current turn
and proposes memories worth keeping. A lasting preference keeps the topic or
circumstances supported by the speaker's words. Optional daily L2 can reconcile
a correction across several original messages. L2 can also interpret a short
human acceptance of a standing proposal when Moon can verify the immediately
preceding delivered reply and both sources' owners. The models judge meaning.
Moon checks exact citations, privacy scope and current targets, saves linked
changes together, and drains local embedding work. L1 and L2 have independent
model and reasoning settings in ~/.moon/moon.toml. L2 is disabled by
default. OpenClaw owns authentication and model execution.
With OpenClaw's native memory disabled, Moon can recall a user's private memories in a verified one-to-one Discord DM. The session must be isolated to the bot account and the user. In ordinary guild text rooms, Moon can still learn from a verified post for its author while using public context for replies. See the privacy rules.
The adapter can give one personal OpenClaw profile a private Moon memory across linked accounts. It can also save new messages from external bots for that person in Discord rooms they can read. The bot remains the recorded author. See profile setup and supported chat routes.
The new public collection starts empty. Assign a known owner or review legacy global memories using the audience and migration guide.
Daily L2 gives rejected session evidence one routine retry on a later occurrence. Evidence that still lacks support stays pending. Fresh records take priority. Retry and review policy
Source learning and topic compilation are explicit workflows. Capturing a source does not make it trusted or recallable. Eligible sources queue recoverable jobs; L1 can propose verbatim claims and L2 can propose typed topic statements. Separate review and exact-result acceptance are required. Withdrawal immediately removes source support and invalidates dependent topics. No automatic source/topic worker is installed.
The CLI and adapter default packet cap is 3,500 characters. The measured
recommendation for source/topic use is 8,000, explicitly configured with
adapter maxChars or CLI --max-chars. Packet capacity and stored reference
count are separate limits. See packet comparison and
retrieval measurements.
- Runtime:
~/.moon; database:~/.moon/state/moon.sqlite. - Moon 2.9.4 accepts schemas 6–21 and migrates transactionally to schema 21. A human citation can link to the verified Discord reply it accepts. Keep the schema-20 backup and matching executable for rollback to 2.9.0.
- SQLite uses WAL with
synchronous=FULL. Unix runtime directories and data files are owner-only. healthand source/topic inspection do not create or migrate storage. Normal write commands can migrate it. Back up using the installed pre-upgrade binary.- Bundled SQLite 3.54.1 and refreshed TLS dependencies address the security findings discovered during release validation.
- Markdown is an intake/export format, not another writable knowledge store.
- Retrieved text is untrusted. Citations establish where text occurred; review remains necessary for meaning and truth.
- Local search needs no provider login. First hybrid use downloads its local embedding model. Model calls use OpenClaw's configured providers.
Read Security for trust and deletion boundaries. Development and
tests must pass an explicit temporary --home; never test writes on ~/.moon.
- How Moon works: evidence, memories, references and packets.
- Learning: L1/L2 models, scheduling and recovery.
- Source storage: intake, claims, review and lifecycle.
- Topics: compilation, acceptance and freshness.
- Migration: schema changes, backup rehearsal and legacy imports.
- Updating: signed releases, skill refresh and recovery.
- Architecture: invariants and ownership boundaries.
- Model canary: isolated real-model validation.
- Recall evaluation, topic baseline and packet comparison: evidence and limitations.
- Compaction: optional host-owned transcript summarisation.
- Support, contributing and releasing.
SKILL.md is the operating guide for agents. Read it before
maintenance, then open the detailed guide relevant to the task.
Rust stable and Cargo build the self-contained binary. Deno 2 runs adapter and developer-tool tests; it is not a Moon runtime dependency.
cargo fmt --all -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets --all-features
cargo build --locked --release
sh tools/test-openclaw-adapter.sh "$PWD/target/release/moon"Offline, isolated smoke test:
moon_test_home="$(mktemp -d /tmp/moon-test.XXXXXX)"
target/release/moon --home "$moon_test_home" --database "$moon_test_home/state/moon.sqlite" init
target/release/moon --home "$moon_test_home" --database "$moon_test_home/state/moon.sqlite" remember \
--kind decision --scope example --content "Moon uses one SQLite database."
target/release/moon --home "$moon_test_home" --database "$moon_test_home/state/moon.sqlite" context \
--scope example --query "SQLite database" --mode lexicalUse moon --help for exact options. The deterministic hash embedding provider
is for plumbing tests; production hybrid recall uses local multilingual E5. See
Contributing for the full validation commands.