// CONTENTS Part 05 · Services

// PART 05

Cache and vector database

Chapter 22 / 60 2 min read English Part 05 of 15

Two services answer the “fast” questions: Valkey keeps ephemeral state, Qdrant keeps searchable knowledge. Both are optional in the desktop editions but standard on the server.

Services around botserver

Cache — Valkey

The component is cache, pinned at Valkey 9.1.3 (Redis-compatible, valkey-9.1.3-jammy-x86_64.tar.gz with an arm64 variant and published checksums). Windows has no bundled cache service: the server provides a built-in RESP cache on the loopback interface, and an external Redis/Valkey is used only when CACHE_URL/REDIS_URL/VALKEY_URL is set.

  • Credentials: Vault secret/gbo/cache (host, port, password, url).
  • What lives here: session state, suggestion keys (suggestions:{bot}:{session}), per-session initialization flags, queue state.
  • Check: ./botserver status cache; from inside the stack, valkey-cli --scan --pattern "suggestions:*" shows live keys.
  • Cache data is rebuildable — it is the one service you may restart freely.

Vector database — Qdrant

The component is vector_db, pinned at Qdrant 1.20.0 (the musl build is statically linked because the gnu build needs GLIBC 2.39, which older desktop hosts lack). Endpoint and key come from Vault secret/gbo/vectordb (url, api_key); environment fallbacks are QDRANT_URL/QDRANT_API_KEY and VECTORDB_URL/VECTORDB_API_KEY.

From folders to collections

Vector collections emerge automatically from the folder structure within a bot’s .gbkb directory. Each folder becomes a distinct collection, indexed separately and activated independently; the folder name is the collection identifier used with the USE KB keyword. When botserver processes a .gbkb folder it scans documents in supported formats (PDF, DOCX, TXT, HTML, Markdown), extracts text, embeds it, and stores a record carrying the file path, type, bucket and tags.

Accuracy note (September 2026). Documents are indexed as whole-file records. There is no text chunking step and no overlap, which is why long documents can lose precision — see Retrieval and RAG in the Dev book.

The indexer skips any file larger than 10 MiB regardless of type (drive_vectordb.rs::should_index returns false above that size), and the type is matched against an allow-list at the same point, so an unsupported type is skipped rather than truncated. Limits: 100,000 documents per bot (MAX_KB_DOCUMENTS_PER_BOT), 50 MiB per document (MAX_KB_DOCUMENT_SIZE_BYTES).

Operations

./botserver install cache && ./botserver install vector_db
./botserver status cache; ./botserver status vector_db
curl -s http://127.0.0.1:6333/healthz        # Qdrant health

Qdrant data is not rebuilt automatically from Drive: re-indexing a .gbkb folder requires re-triggering the indexer (a Drive change on the folder does it). Include the Qdrant storage directory in backups if you cannot afford a re-index.

Found a mistake? Open an issue · All books

// SEARCH ESC
Pagefind · 236 pages · 4 books Enter to open ↑ ↓ to move