Universal knowledge base with Qdrant for Claude Code integration
Project description
Claude KB
Universal knowledge base with Qdrant for Claude Code integration.
Provides semantic search across:
- Claude Code conversation history
- Personal knowledge entities
- Documents and research notes
Installation
Run directly (no install)
uvx claude-kb@latest status
Install as a tool
uv tool install claude-kb
kb status
# Update to latest version
uv tool upgrade claude-kb
Development
git clone https://github.com/tenequm/claude-kb.git
cd claude-kb
uv sync --extra dev
Features
- Hybrid search: Dense (semantic) + sparse (keyword) vectors with RRF fusion
- Claude Code import: Automatically import your conversation history
- LLM-optimized CLI:
kb aicommand provides token-efficient schema for AI agents - FastEmbed/ONNX: Fast local embeddings with bge-base-en-v1.5 (768 dim, ~1s search time)
- Self-hosted: Run locally with Docker Compose
Quick Start
# Start Qdrant
docker compose up -d
# Initialize collections
kb init
# Import your Claude Code conversations
kb import claude-code-chats
# Search!
kb search "qdrant vector databases"
Usage
Search conversations
kb search "your query"
kb search "query" --collection conversations --limit 20
Get specific message
kb get msg_abc123
Check status
kb status
LLM-optimized schema (for AI agents)
kb ai
This outputs a token-efficient format that Claude Code and other LLMs can parse to understand how to use the CLI. See docs/AI_COMMAND_SPEC.md for details.
Architecture
- Simplified structure: cli.py, core.py, import_claude.py (No manual embedding code!)
- Qdrant collections: conversations, entities, documents
- Embedding: QdrantClient built-in FastEmbed with BAAI/bge-base-en-v1.5 (768 dim, ONNX-optimized)
- Search time: ~1 second total (0.7s model load + 0.3s search)
- Output format: Structured plaintext (NOT JSON) optimized for LLM parsing
Configuration
Create .env file (see .env.example):
QDRANT_URL=http://localhost:6333
EMBEDDING_MODEL=BAAI/bge-base-en-v1.5 # FastEmbed model (768 dims, ~1s search)
# Alternative models:
# EMBEDDING_MODEL=BAAI/bge-small-en-v1.5 # Faster (384 dims, ~0.5s)
# EMBEDDING_MODEL=BAAI/bge-large-en-v1.5 # Higher quality (1024 dims, ~2s)
Development
# Format + lint
ruff format . && ruff check . --fix
# Test (manual for now)
uv run kb --help
Roadmap
- Streaming search (background mode)
- Entity management (
kb add entity) - Document import (
kb add document) - Relationship traversal (
kb related) - Full hybrid search (sparse vectors)
- Token-aware context window truncation
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_kb-0.4.0.tar.gz.
File metadata
- Download URL: claude_kb-0.4.0.tar.gz
- Upload date:
- Size: 128.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48a47e502143c4cd2623ba4271dd2370a42ffadbf1a5f355f8052b73678b6f62
|
|
| MD5 |
a97d481054092d1bfd8c58c4b24f56ad
|
|
| BLAKE2b-256 |
973d8e5a573d88fcfbf6b99553731a1c9d3fefed5bfd9868dd3935d426d2a322
|
File details
Details for the file claude_kb-0.4.0-py3-none-any.whl.
File metadata
- Download URL: claude_kb-0.4.0-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24bf192a508dd83ca1488d6fdb3090790209bc7dc4b39eed0a1baa06e10af7b2
|
|
| MD5 |
840456c72c694088893c8ddee6aac4e0
|
|
| BLAKE2b-256 |
93ba96675ac61786aaee1da6ea9617e4895d1b39ccdce3e0232a69b8d315d968
|