📚

Clawd Docs

Verified

by aranej

Intelligent access to ClawdBot documentation with a 3-layer architecture: local search index for instant keyword lookup, cached Golden Snippets for common queries, and on-demand web_fetch for full pages. Reduces token usage by 80-90% for common documentation queries.

documentationdocssearchcacheutilities
View on GitHub

Clawd-Docs v2.0 - Smart Documentation Access

Intelligent access to ClawdBot documentation with:

  • Local search index - instant keyword lookup (0 tokens)
  • Cached snippets - pre-fetched common answers (~300-500 tokens)
  • On-demand fetch - full page when needed (~8-12k tokens)
  • Freshness tracking - TTL per page type

Quick Start

Step 1: Check Golden Snippets First

Before fetching anything, check if a Golden Snippet exists:

ls ~/clawd/data/docs-snippets/

Available snippets:

| Snippet | Query matches |

|---------|---------------|

| telegram-setup.md | "telegram setup" |

| telegram-allowfrom.md | "allowFrom", "access control" |

| oauth-troubleshoot.md | "token expired", "oauth error" |

| update-procedure.md | "update clawdbot" |

| restart-gateway.md | "restart", "stop/start" |

| config-basics.md | "config", "configuration" |

| config-providers.md | "add provider", "discord setup" |

| memory-search.md | "memory", "vector search", "embeddings" |

Step 2: Search Index

Check ~/clawd/data/docs-index.json for page suggestions.

Step 3: Check Full Page Cache

ls ~/clawd/data/docs-cache/ | grep "concepts_memory"
cat ~/clawd/data/docs-cache/concepts_memory.md

Step 4: Fetch Page (only if NOT in cache)

Use native web_fetch tool:

web_fetch({ url: "https://docs.clawd.bot/{path}", extractMode: "markdown" })

TTL Strategy

| Page Category | TTL | Why |

|---------------|-----|-----|

| install/updating | 1 day | Always current |

| gateway/* | 7 days | Config changes |

| channels/* | 7 days | Provider updates |

| tools/* | 7 days | Features added |

| concepts/* | 14 days | Rarely changes |

| reference/* | 30 days | Stable templates |

Fallback: Full Index Refresh

web_fetch({ url: "https://docs.clawd.bot/llms.txt", extractMode: "markdown" })

Data Locations

~/clawd/data/
├── docs-index.json       # Search index
├── docs-stats.json       # Usage tracking
├── docs-snippets/        # Cached Golden Snippets
└── docs-cache/           # Full page cache