ɳClaw includes a built-in knowledge base of the ɳSelf platform. When you ask a question about the CLI, plugins, or architecture, ɳClaw searches the knowledge base and injects the most relevant documentation into its context before responding.
The knowledge base is versioned alongside the ɳSelf CLI. It ships as TOML files inside the nself-claw plugin and is loaded at startup.
Every incoming message is scored against a short list of ɳSelf-related signals. If the message looks like a platform question, ɳClaw runs a BM25 search over the knowledge base, collects the top matching chunks, and prepends them as context before calling the AI.
The AI never sees raw TOML. It sees a structured context block listing the relevant documentation sections, their CLI commands, and any operator notes you have attached.
Expert mode adds a system prompt preamble that declares the AI an ɳSelf expert. It replaces the generic assistant prompt with a version-specific, platform-aware framing:
# Enable expert mode
nself config set claw.nself_expert_mode trueExpert mode is most useful when your team runs a dedicated ɳClaw instance for answering platform questions. For general-purpose chat deployments, leave it off.
The knowledge base version is stored in knowledge/version.toml inside the plugin. It includes a version field that matches the ɳSelf CLI version it was authored for. ɳClaw logs a warning if the running CLI version differs from the knowledge base version by more than a minor version.
You can attach notes to any knowledge chunk. Notes are stored in the database and merged into search results at query time. Use them to document your own conventions, warn about known issues, or link to internal runbooks.
# Find the chunk ID first
nself claw knowledge list plugins
# Add a note
nself claw knowledge note add \
--chunk nself-plugin-install \
--note "Internal policy: always install ai + mux + claw together."/note add nself-plugin-install Internal policy: always install ai + mux + claw together.# Search from the terminal
nself claw knowledge search "how do I restart a service"
# Filter by category
nself claw knowledge search "plugin" --category plugins
# Get JSON output
nself claw knowledge search "init" --json
# Show version info
nself claw knowledge versionnself claw knowledge search <query> [--category <cat>] [--top N] [--json]Runs a BM25 search and prints formatted results. Use --json for machine-readable output.
nself claw knowledge list [<category>]Lists all chunks in the knowledge base, optionally filtered to a category.
nself claw knowledge versionShows the knowledge base version, schema version, total chunk count, and available categories.
# Add a note
nself claw knowledge note add --chunk <chunk-id> --note "<text>"
# List all notes (or notes for a specific chunk)
nself claw knowledge note list [--chunk <chunk-id>]
# Delete a note
nself claw knowledge note delete --id <uuid>The ɳClaw iOS/Android app shows a book icon button on the home screen when connected to a server. Tap it to open the knowledge search sheet with real-time BM25 results, category filters, expandable result cards, and one-tap command copying.
The web app shows a Docs button in the sidebar. Click it to open the knowledge search panel inline. The panel includes a settings section to toggle knowledge injection and expert mode.
Assistant messages that used knowledge context show a small docs used badge below the response.
nself plugin install ai claw mux