-
Notifications
You must be signed in to change notification settings - Fork 175
Description
Bug Description
After a successful bm reindex --embeddings, bm project info still reports "sqlite-vec is unavailable" and shows Indexed 0/N, Chunks 0. The embedding stats are never displayed even though embeddings are fully built.
Steps To Reproduce
- Install basic-memory 0.19.2 via
uv tool - Run
bm reindex --embeddings— completes successfully:
❯ bm reindex --embeddings
Project: main
Building vector embeddings...
Embedding entities... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
✓ Embeddings complete: 333 entities embedded, 0 skipped, 0 errors
Reindex complete!
- Run
bm project info main
Expected Behavior
project info shows correct embedding counts (333 indexed, chunk count, etc.) since sqlite-vec is installed and reindex succeeded.
Actual Behavior
❯ bm project info main
╭──────────────────────────────────────────────────────── main ────────────────────────────────────────────────────────╮
│ Knowledge Graph Embeddings │
│ Entities 333 ● Semantic Search Enabled │
│ Observations 9231 Provider fastembed │
│ Relations 815 Model bge-small-en-v1.5 │
│ Unresolved 128 Indexed ░░░░░░░░░░░░░░░░░░░░ 0/334 │
│ Isolated 55 Chunks 0 │
│ ● Status Reindex recommended │
│ Reason SQLite vector tables exist but sqlite-vec is │
│ unavailable in this Python environment — │
│ install/update basic-memory, then run: bm reindex │
│ --embeddings │
╰──────────────────────────────────────────────── Basic Memory 0.19.2 ─────────────────────────────────────────────────╯
The message says sqlite-vec is unavailable, but it is installed and works — bm reindex --embeddings just used it successfully.
Environment
- OS: Windows 11 Pro 10.0.26200
- Python version: 3.13 (via uv)
- Basic Memory version: 0.19.2
- Installation method:
uv tool
Additional Context
sqlite-vec is installed and loadable in the same Python environment that basic-memory uses:
❯ uv tool run --from basic-memory python -c "
import sqlite3, sqlite_vec
db = sqlite3.connect(':memory:')
db.enable_load_extension(True)
sqlite_vec.load(db)
print(db.execute('select vec_version()').fetchone()[0])
"
v0.1.6Looking at the code, get_embedding_status in project_service.py queries vec0 virtual tables through ProjectRepository.execute_query, which opens a plain session without loading the sqlite-vec extension first. SQLite raises no such module: vec0, and the except SAOperationalError block reports it as "unavailable."
The reindex --embeddings path seems to work because it goes through SQLiteSearchRepository._ensure_sqlite_vec_loaded(), which explicitly loads the extension on the connection before running vec0 queries.