OpenClaw Integration — index1

← Back

# OpenClaw Integration

One-click setup for index1, adding project knowledge base search to OpenClaw AI Agent.

1Installation Method
Standard Python package install, works in most environments
2Create Skill Shortcuts?
Create /reindex, /isearch, /doctor shortcut commands
3CJK Search Support?
Install jieba tokenizer for CJK search in BM25 mode

Copy the script below and run it in the terminal at your project root:

🔌 Shared Configuration with Claude Code
The generated `.mcp.json` and `.claude/CLAUDE.md` work with both OpenClaw and Claude Code. No need to maintain separate configs.
⚠️ Container Environment?
pip inside OpenClaw Docker containers requires root: `docker exec -u root <container> pip3 install index1 --break-system-packages`
✅ Verification
After restarting OpenClaw, type: `Use docs_status to check index status`
If AI calls docs_status → Setup successful
If AI says tools not found → Check .mcp.json path
Notes
Auto Fallback When Ollama Unavailable
index1 automatically falls back to BM25-only mode when Ollama is unavailable:
• BM25 full-text search is fully functional, with ~60-80ms latency
• Vector semantic search is unavailable (cross-language search limited)
• No crashes or errors, only informational messages
To enable vector search: `curl -fsSL https://ollama.com/install.sh | sh && ollama pull nomic-embed-text`
SQLite Version Compatibility
index1 uses FTS5 `contentless_delete` (requires SQLite ≥ 3.43.0); older versions fall back automatically.

Environment | SQLite | Behavior
--- | --- | ---
macOS 14+ / Python 3.12+ | 3.43+ | Full functionality
Debian Bookworm (Docker) | 3.40 | Auto fallback
Ubuntu 22.04 | 3.37 | Auto fallback

v0.1.0+ handles this automatically. If you see `contentless_delete` errors on older versions, please upgrade.
Python Version Requirements
Minimum Python 3.10, recommended 3.11+. OpenClaw containers ship with Python 3.11.
CJK Search Requires jieba
CJK search in BM25 mode requires jieba tokenizer: `pip install index1[chinese]`
Without jieba, CJK BM25 search may return 0 results; English search is unaffected.
Verify: `index1 doctor` (Check 6 shows CJK support status)
Troubleshooting

Problem | Cause | Solution
--- | --- | ---
Tools not showing | MCP config error | Check `.mcp.json`
AI doesn't use docs_search | Search rules not added | Check `.claude/CLAUDE.md`
`command not found` | index1 not in PATH | Use `which index1` to get full path
`contentless_delete` error | Outdated version | `pip install --upgrade index1`
No search results | Not indexed | `index1 index ./src ./docs`
CJK search returns 0 | No jieba | `pip install index1[chinese]`
Vector search unavailable | No Ollama | Install Ollama and pull model