bldoc4agent

Open-source project on GitHub.

Python
0 Stars
0 Forks
License: GPL-3.0
Updated: Mar 21, 2026

Blender Documentation Retrieval Toolchain

This project provides a complete pipeline to convert Blender HTML documentation into a searchable knowledge base using Markdown, SQLite FTS5, and Chroma Vector DB. It is designed to be easily integrated into AI agent workflows or packaged as an OpenClaw skill.

📁 Directory Structure

bldoc2markdown/
├── scripts/                # Python scripts
│   ├── convert_html_to_md.py
│   ├── build_chunks.py
│   ├── build_fts_db.py
│   ├── build_vector_db.py
│   ├── search_docs.py
│   ├── pipeline.py
│   └── utils.py
├── assets/                 # Data assets and templates
│   ├── data/               # Data generated by pipeline
│   │   ├── raw/            # Original HTML manuals
│   │   ├── markdown/       # Converted Markdown files
│   │   ├── chunks/         # JSONL chunks
│   │   └── indexes/        # SQLite and Chroma databases
│   └── prompts/            # Agent prompt templates
├── requirements.txt
├── SKILL.md
└── README.md

🛠️ Installation

Ensure you have Python 3.9+ installed, then run:

pip install -r requirements.txt

🚀 Usage

1. Build the Knowledge Base (Pipeline)

Run the unified pipeline to process HTML documentation all the way to search indexes. The pipeline handles everything from Markdown conversion to indexing:

python scripts/pipeline.py \
  --html-dir assets/data/raw/blender_manual \
  --embed-url http://192.168.3.234:8080/v1/embeddings \
  --recreate-vector-db

2. Search the Documentation

Query the knowledge base using different search modes. Sensible defaults are provided for the database paths:

Hybrid Search (Recommended)

python scripts/search_docs.py --query "bevel weight" --mode hybrid --json

Keyword Search (FTS)

python scripts/search_docs.py --query "Tool System" --mode fts

Vector Search

python scripts/search_docs.py --query "how to animate bones" --mode vector

🤖 Agent Integration

A prompt template for integrating this toolchain with an AI agent is provided in assets/prompts/blender_docs_agent.md.

⚙️ Configuration

All scripts support command-line arguments. Use --help on any script to see available options:

  • scripts/convert_html_to_md.py: HTML content extraction and markdown conversion.
  • scripts/build_chunks.py: Hierarchical splitting and metadata generation.
  • scripts/build_fts_db.py: SQLite FTS5 index creation.
  • scripts/build_vector_db.py: Chroma collection management and embedding generation.
  • scripts/search_docs.py: Unified search interface (FTS + Vector).