https://github.com/openclaw/ask-molty
https://github.com/openclaw/ask-molty
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/openclaw/ask-molty
- Owner: openclaw
- License: mit
- Created: 2026-05-06T03:33:52.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-06T21:10:22.000Z (about 1 month ago)
- Last Synced: 2026-05-10T10:11:27.986Z (about 1 month ago)
- Language: TypeScript
- Size: 104 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```text
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
```bash
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:
```bash
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.
```bash
npm run deploy
```