[BREAKGLASS] Append-only mirror of github.com/openclaw/ask-molty
Go to file
Peter Steinberger 2773649326
Some checks failed
CI / check (push) Has been cancelled
fix: route docs host through ask molty worker
2026-05-06 22:10:11 +01:00
.github/workflows ci: use gitcrawl fixture 2026-05-06 04:49:44 +01:00
scripts feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
src fix: mirror docs auth status for head requests 2026-05-06 21:20:15 +01:00
.gitignore feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
.oxfmtrc.json feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
.oxlintrc.json feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
LICENSE Initial commit 2026-05-06 04:33:53 +01:00
package-lock.json feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
package.json ci: scope lint to ask molty 2026-05-06 04:51:18 +01:00
README.md feat: accept ClawHub docs auth 2026-05-06 21:08:47 +01:00
tsconfig.base.json feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
tsconfig.scripts.json feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
tsconfig.worker.json feat: build Ask Molty docs agent 2026-05-06 04:47:26 +01:00
wrangler.toml fix: route docs host through ask molty worker 2026-05-06 22:10:11 +01:00

Ask Molty

Ask Molty is the OpenClaw documentation agent.

It owns:

  • the Cloudflare Worker behind docs-chat.openclaw.ai
  • the system prompt and tool loop
  • static workspace export for docs, source, and GitHub issues/PRs
  • retrieval artifacts consumed by the Worker

The docs mirror stays focused on publishing documentation. Ask Molty owns the agent runtime.

Architecture

scripts/export-workspace.ts builds a flat, read-only workspace:

dist/ask-molty/
  docs-search.jsonl
  source-search.jsonl
  github-search.jsonl
  workspace-manifest.json
  workspace/
    docs/*.md
    source/*.md
    github/*.md

The Worker does deterministic candidate retrieval, mounts the best docs/source/GitHub files into a small in-memory workspace, then lets the model call:

  • search_workspace
  • read_workspace
  • list_workspace
  • run_shell

Docs are canonical. Source is implementation truth. GitHub issues/PRs are discussion and status evidence.

run_shell is deliberately fake and read-only. It supports rg, grep, cat, head, ls, and find over mounted files only. No pipes, redirects, writes, network, or process execution.

Local Build

npm install
npm run check

The exporter defaults to sibling/local paths:

  • docs mirror: ../docs-openclaw
  • OpenClaw source: ../clawdbot5
  • gitcrawl store DB: ~/.config/gitcrawl/stores/gitcrawl-store/data/openclaw__openclaw.sync.db

Override with:

ASK_MOLTY_DOCS_REPO=../docs-openclaw \
ASK_MOLTY_SOURCE_REPO=../clawdbot5 \
ASK_MOLTY_GITCRAWL_DB=~/.config/gitcrawl/stores/gitcrawl-store/data/openclaw__openclaw.sync.db \
npm run export

The generated workspace can be large because GitHub threads are sharded into markdown files. The Worker never downloads all of it per request; it loads small JSONL indexes, selects candidates, and only mounts the best matching docs/source/GitHub files.

Deploy

The Worker expects OPENAI_API_KEY as a Cloudflare Worker secret. The default model is chat-latest, which OpenAI maps to GPT-5.5 Instant in the API.

Docs chat auth is brokered through ClawHub:

  • CLAWHUB_AUTH_URL sends users to https://hub.openclaw.ai/docs/auth.
  • CLAWHUB_SESSION_VERIFY_URL verifies the ClawHub Convex Auth token once.
  • ASK_MOLTY_AUTH_SECRET is optional; when set, it signs the docs-only session cookie.
npm run deploy