Skip to content

Qdrant

Qdrant is the vector store for indexed connector content and research vectors.

  • Local development runs qdrant/qdrant:v1.16.2 from docker-compose.yml.
  • apps/api registers Qdrant-backed vector stores through Mastra.
  • Indexed connector ingestion writes embeddings, extracted chunk text, and permission/provenance payloads used by retrieval.
  • Connector collection setup creates keyword payload indexes for metadata.permissions, metadata.connectorIds, and metadata.contentId before first vector upsert, filtered vector delete, or payload reconciliation.
  • Destructive connector vector deletes filter by content id plus the expected connector and permission scope when canonical access bindings provide that scope.

Decision: keep MongoDB authoritative for metadata, ownership, and authorization, and use Qdrant only for vector retrieval.

Qdrant payloads store the retrieved chunk text plus source and chunk metadata needed for retrieval. That chunk text is intentionally retained for indexed RAG latency. Qdrant must not become the source of truth for connector permissions, ownership, or readiness; API/MongoDB remains authoritative and must verify access before grounding or citations are emitted.

  1. Check Qdrant release notes, snapshot compatibility, and deployment docs for the target version.

  2. Update the Docker image tag in docker-compose.yml.

  3. If the Mastra Qdrant adapter changes, update the API package as part of the Mastra package family:

    Terminal window
    # from apps/api
    bun update @mastra/qdrant
  4. For stored vector data, create a migration or rebuild plan before changing collection schema, vector dimensions, payload indexes, or distance configuration.

  5. Verify indexed connector and retrieval behavior:

    Terminal window
    bun run test:api:connectors:e2e:ephemeral
    bun run test:api:chat:runtime-smoke
    bun run test:api:chat:review
  • Qdrant is not the permission authority. API/MongoDB checks must happen before grounding or citations.
  • Snapshot restores have version constraints. Qdrant docs say collection snapshots restore to clusters sharing the same minor version.
  • Indexed connector mode stores extracted chunk text in Qdrant payloads. Live-only mode is the path that avoids embedding sync and indexed artifact retention for user-selectable providers.
  • docker-compose.yml
  • apps/api/src/mastra/index.ts
  • apps/api/src/mastra/runtimeStorage.ts
  • apps/api/src/connectors/
  • docs/features/connectors/spec.md
  • docs/features/ingestion/spec.md
  • docs/features/chat/spec.md