From f72214725d6bdde8ff6bc0550524a113555a0664 Mon Sep 17 00:00:00 2001 From: Vignesh Natarajan Date: Mon, 2 Feb 2026 21:10:10 -0800 Subject: [PATCH] chore: restore OpenClaw branding --- docs/concepts/memory.md | 40 ++++++++++++++++----------------- src/agents/system-prompt.ts | 24 ++++++++++---------- src/agents/tools/memory-tool.ts | 8 +++---- src/memory/search-manager.ts | 4 ++-- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/concepts/memory.md b/docs/concepts/memory.md index 33cb00f18e..ca0c7cdd65 100644 --- a/docs/concepts/memory.md +++ b/docs/concepts/memory.md @@ -1,5 +1,5 @@ --- -summary: "How Moltbot memory works (workspace files + automatic memory flush)" +summary: "How OpenClaw memory works (workspace files + automatic memory flush)" read_when: - You want the memory file layout and workflow - You want to tune the automatic pre-compaction memory flush @@ -7,7 +7,7 @@ read_when: # Memory -Moltbot memory is **plain Markdown in the agent workspace**. The files are the +OpenClaw memory is **plain Markdown in the agent workspace**. The files are the source of truth; the model only "remembers" what gets written to disk. Memory search tools are provided by the active memory plugin (default: @@ -37,7 +37,7 @@ These files live under the workspace (`agents.defaults.workspace`, default ## Automatic memory flush (pre-compaction ping) -When a session is **close to auto-compaction**, Moltbot triggers a **silent, +When a session is **close to auto-compaction**, OpenClaw triggers a **silent, agentic turn** that reminds the model to write durable memory **before** the context is compacted. The default prompts explicitly say the model _may reply_, but usually `NO_REPLY` is the correct response so the user never sees this turn. @@ -77,14 +77,14 @@ For the full compaction lifecycle, see ## Vector memory search -Moltbot can build a small vector index over `MEMORY.md` and `memory/*.md` so +OpenClaw can build a small vector index over `MEMORY.md` and `memory/*.md` so semantic queries can find related notes even when wording differs. Defaults: - Enabled by default. - Watches memory files for changes (debounced). -- Uses remote embeddings by default. If `memorySearch.provider` is not set, Moltbot auto-selects: +- Uses remote embeddings by default. If `memorySearch.provider` is not set, OpenClaw auto-selects: 1. `local` if a `memorySearch.local.modelPath` is configured and the file exists. 2. `openai` if an OpenAI key can be resolved. 3. `gemini` if a Gemini key can be resolved. @@ -92,7 +92,7 @@ Defaults: - Local mode uses node-llama-cpp and may require `pnpm approve-builds`. - Uses sqlite-vec (when available) to accelerate vector search inside SQLite. -Remote embeddings **require** an API key for the embedding provider. Moltbot +Remote embeddings **require** an API key for the embedding provider. OpenClaw resolves keys from auth profiles, `models.providers.*.apiKey`, or environment variables. Codex OAuth only covers chat/completions and does **not** satisfy embeddings for memory search. For Gemini, use `GEMINI_API_KEY` or @@ -103,7 +103,7 @@ set `memorySearch.remote.apiKey` (and optional `memorySearch.remote.headers`). Set `memory.backend = "qmd"` to swap the built-in SQLite indexer for [QMD](https://github.com/tobi/qmd): a local-first search sidecar that combines -BM25 + vectors + reranking. Markdown stays the source of truth; Moltbot shells +BM25 + vectors + reranking. Markdown stays the source of truth; OpenClaw shells out to QMD for retrieval. Key points: **Prereqs** @@ -129,20 +129,20 @@ out to QMD for retrieval. Key points: memory files) into `index.yml`, then `qmd update` + `qmd embed` run on boot and on a configurable interval (`memory.qmd.update.interval`, default 5 m). - Searches run via `qmd query --json`. If QMD fails or the binary is missing, - Moltbot automatically falls back to the builtin SQLite manager so memory tools + OpenClaw automatically falls back to the builtin SQLite manager so memory tools keep working. - **First search may be slow**: QMD may download local GGUF models (reranker/query expansion) on the first `qmd query` run. - - Moltbot sets `XDG_CONFIG_HOME`/`XDG_CACHE_HOME` automatically when it runs QMD. - - If you want to pre-download models manually (and warm the same index Moltbot + - OpenClaw sets `XDG_CONFIG_HOME`/`XDG_CACHE_HOME` automatically when it runs QMD. + - If you want to pre-download models manually (and warm the same index OpenClaw uses), run a one-off query with the agent’s XDG dirs. - Moltbot’s QMD state lives under your **state dir** (usually `~/.openclaw`, or + OpenClaw’s QMD state lives under your **state dir** (usually `~/.openclaw`, or legacy dirs like `~/.clawdbot` and `~/.moltbot`). You can point `qmd` at the exact same index - by exporting the same XDG vars Moltbot uses: + by exporting the same XDG vars OpenClaw uses: ```bash - # Pick the same state dir Moltbot uses + # Pick the same state dir OpenClaw uses STATE_DIR="${OPENCLAW_STATE_DIR:-${CLAWDBOT_STATE_DIR:-$HOME/.openclaw}}" if [ -d "$HOME/.clawdbot" ] && [ ! -d "$HOME/.openclaw" ] \ && [ -z "${OPENCLAW_STATE_DIR:-}" ] && [ -z "${CLAWDBOT_STATE_DIR:-}" ]; then @@ -181,7 +181,7 @@ out to QMD for retrieval. Key points: - Snippets sourced outside the workspace show up as `qmd//` in `memory_search` results; `memory_get` understands that prefix and reads from the configured QMD collection root. -- When `memory.qmd.sessions.enabled = true`, Moltbot exports sanitized session +- When `memory.qmd.sessions.enabled = true`, OpenClaw exports sanitized session transcripts (User/Assistant turns) into a dedicated QMD collection under `~/.openclaw/agents//qmd/sessions/`, so `memory_search` can recall recent conversations without touching the builtin SQLite index. @@ -349,16 +349,16 @@ Local mode: - File type: Markdown only (`MEMORY.md`, `memory/**/*.md`). - Index storage: per-agent SQLite at `~/.clawdbot/memory/.sqlite` (configurable via `agents.defaults.memorySearch.store.path`, supports `{agentId}` token). - Freshness: watcher on `MEMORY.md` + `memory/` marks the index dirty (debounce 1.5s). Sync is scheduled on session start, on search, or on an interval and runs asynchronously. Session transcripts use delta thresholds to trigger background sync. -- Reindex triggers: the index stores the embedding **provider/model + endpoint fingerprint + chunking params**. If any of those change, Moltbot automatically resets and reindexes the entire store. +- Reindex triggers: the index stores the embedding **provider/model + endpoint fingerprint + chunking params**. If any of those change, OpenClaw automatically resets and reindexes the entire store. ### Hybrid search (BM25 + vector) -When enabled, Moltbot combines: +When enabled, OpenClaw combines: - **Vector similarity** (semantic match, wording can differ) - **BM25 keyword relevance** (exact tokens like IDs, env vars, code symbols) -If full-text search is unavailable on your platform, Moltbot falls back to vector-only search. +If full-text search is unavailable on your platform, OpenClaw falls back to vector-only search. #### Why hybrid? @@ -425,7 +425,7 @@ agents: { ### Embedding cache -Moltbot can cache **chunk embeddings** in SQLite so reindexing and frequent updates (especially session transcripts) don't re-embed unchanged text. +OpenClaw can cache **chunk embeddings** in SQLite so reindexing and frequent updates (especially session transcripts) don't re-embed unchanged text. Config: @@ -486,7 +486,7 @@ agents: { ### SQLite vector acceleration (sqlite-vec) -When the sqlite-vec extension is available, Moltbot stores embeddings in a +When the sqlite-vec extension is available, OpenClaw stores embeddings in a SQLite virtual table (`vec0`) and performs vector distance queries in the database. This keeps search fast without loading every embedding into JS. @@ -511,7 +511,7 @@ Notes: - `enabled` defaults to true; when disabled, search falls back to in-process cosine similarity over stored embeddings. -- If the sqlite-vec extension is missing or fails to load, Moltbot logs the +- If the sqlite-vec extension is missing or fails to load, OpenClaw logs the error and continues with the JS fallback (no vector table). - `extensionPath` overrides the bundled sqlite-vec path (useful for custom builds or non-standard install locations). diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index 02959bc326..e8345cdb95 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -95,7 +95,7 @@ function buildMessagingSection(params: { "## Messaging", "- Reply in current session → automatically routes to the source channel (Signal, Telegram, etc.)", "- Cross-session messaging → use sessions_send(sessionKey, message)", - "- Never use exec/curl for provider messaging; Moltbot handles all routing internally.", + "- Never use exec/curl for provider messaging; OpenClaw handles all routing internally.", params.availableTools.has("message") ? [ "", @@ -130,12 +130,12 @@ function buildDocsSection(params: { docsPath?: string; isMinimal: boolean; readT if (!docsPath || params.isMinimal) return []; return [ "## Documentation", - `Moltbot docs: ${docsPath}`, + `OpenClaw docs: ${docsPath}`, "Mirror: https://docs.molt.bot", "Source: https://github.com/moltbot/moltbot", "Community: https://discord.com/invite/clawd", "Find new skills: https://clawdhub.com", - "For Moltbot behavior, commands, config, or architecture: consult local docs first.", + "For OpenClaw behavior, commands, config, or architecture: consult local docs first.", "When diagnosing issues, run `moltbot status` yourself when possible; only ask the user if you lack access (e.g., sandboxed).", "", ]; @@ -213,7 +213,7 @@ export function buildAgentSystemPrompt(params: { nodes: "List/describe/notify/camera/screen on paired nodes", cron: "Manage cron jobs and wake events (use for reminders; when scheduling a reminder, write the systemEvent text as something that will read like a reminder when it fires, and mention that it is a reminder depending on the time gap between setting and firing; include recent context in reminder text if appropriate)", message: "Send messages and channel actions", - gateway: "Restart, apply config, or run updates on the running Moltbot process", + gateway: "Restart, apply config, or run updates on the running OpenClaw process", agents_list: "List agent ids allowed for sessions_spawn", sessions_list: "List other sessions (incl. sub-agents) with filters/last", sessions_history: "Fetch history for another session/sub-agent", @@ -344,11 +344,11 @@ export function buildAgentSystemPrompt(params: { // For "none" mode, return just the basic identity line if (promptMode === "none") { - return "You are a personal assistant running inside Moltbot."; + return "You are a personal assistant running inside OpenClaw."; } const lines = [ - "You are a personal assistant running inside Moltbot.", + "You are a personal assistant running inside OpenClaw.", "", "## Tooling", "Tool availability (filtered by policy):", @@ -380,8 +380,8 @@ export function buildAgentSystemPrompt(params: { "Keep narration brief and value-dense; avoid repeating obvious steps.", "Use plain human language for narration unless in a technical context.", "", - "## Moltbot CLI Quick Reference", - "Moltbot is controlled via subcommands. Do not invent commands.", + "## OpenClaw CLI Quick Reference", + "OpenClaw is controlled via subcommands. Do not invent commands.", "To manage the Gateway daemon service (start/stop/restart):", "- moltbot gateway status", "- moltbot gateway start", @@ -392,13 +392,13 @@ export function buildAgentSystemPrompt(params: { ...skillsSection, ...memorySection, // Skip self-update for subagent/none modes - hasGateway && !isMinimal ? "## Moltbot Self-Update" : "", + hasGateway && !isMinimal ? "## OpenClaw Self-Update" : "", hasGateway && !isMinimal ? [ "Get Updates (self-update) is ONLY allowed when the user explicitly asks for it.", "Do not run config.apply or update.run unless the user explicitly requests an update or config change; if it's not explicit, ask first.", "Actions: config.get, config.schema, config.apply (validate + write full config, then restart), update.run (update deps or git, then restart).", - "After restart, Moltbot pings the last active session automatically.", + "After restart, OpenClaw pings the last active session automatically.", ].join("\n") : "", hasGateway && !isMinimal ? "" : "", @@ -467,7 +467,7 @@ export function buildAgentSystemPrompt(params: { userTimezone, }), "## Workspace Files (injected)", - "These user-editable files are loaded by Moltbot and included below in Project Context.", + "These user-editable files are loaded by OpenClaw and included below in Project Context.", "", ...buildReplyTagsSection(isMinimal), ...buildMessagingSection({ @@ -558,7 +558,7 @@ export function buildAgentSystemPrompt(params: { heartbeatPromptLine, "If you receive a heartbeat poll (a user message matching the heartbeat prompt above), and there is nothing that needs attention, reply exactly:", "HEARTBEAT_OK", - 'Moltbot treats a leading/trailing "HEARTBEAT_OK" as a heartbeat ack (and may discard it).', + 'OpenClaw treats a leading/trailing "HEARTBEAT_OK" as a heartbeat ack (and may discard it).', 'If something needs attention, do NOT include "HEARTBEAT_OK"; reply with the alert text instead.', "", ); diff --git a/src/agents/tools/memory-tool.ts b/src/agents/tools/memory-tool.ts index dd4d2eb125..3f793e3641 100644 --- a/src/agents/tools/memory-tool.ts +++ b/src/agents/tools/memory-tool.ts @@ -1,5 +1,5 @@ import { Type } from "@sinclair/typebox"; -import type { MoltbotConfig } from "../../config/config.js"; +import type { OpenClawConfig } from "../../config/config.js"; import type { MemoryCitationsMode } from "../../config/types.memory.js"; import type { MemorySearchResult } from "../../memory/types.js"; import type { AnyAgentTool } from "./common.js"; @@ -23,7 +23,7 @@ const MemoryGetSchema = Type.Object({ }); export function createMemorySearchTool(options: { - config?: MoltbotConfig; + config?: OpenClawConfig; agentSessionKey?: string; }): AnyAgentTool | null { const cfg = options.config; @@ -84,7 +84,7 @@ export function createMemorySearchTool(options: { } export function createMemoryGetTool(options: { - config?: MoltbotConfig; + config?: OpenClawConfig; agentSessionKey?: string; }): AnyAgentTool | null { const cfg = options.config; @@ -126,7 +126,7 @@ export function createMemoryGetTool(options: { }; } -function resolveMemoryCitationsMode(cfg: MoltbotConfig): MemoryCitationsMode { +function resolveMemoryCitationsMode(cfg: OpenClawConfig): MemoryCitationsMode { const mode = cfg.memory?.citations; if (mode === "on" || mode === "off" || mode === "auto") { return mode; diff --git a/src/memory/search-manager.ts b/src/memory/search-manager.ts index 719e0df7fe..5eca68501d 100644 --- a/src/memory/search-manager.ts +++ b/src/memory/search-manager.ts @@ -1,4 +1,4 @@ -import type { MoltbotConfig } from "../config/config.js"; +import type { OpenClawConfig } from "../config/config.js"; import type { ResolvedQmdConfig } from "./backend-config.js"; import type { MemoryEmbeddingProbeResult, @@ -17,7 +17,7 @@ export type MemorySearchManagerResult = { }; export async function getMemorySearchManager(params: { - cfg: MoltbotConfig; + cfg: OpenClawConfig; agentId: string; }): Promise { const resolved = resolveMemoryBackendConfig(params);