Qdrant
Qdrant is the vector store for indexed connector content and research vectors.
What It Owns
Section titled “What It Owns”- Local development runs
qdrant/qdrant:v1.16.2fromdocker-compose.yml. apps/apiregisters 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, andmetadata.contentIdbefore 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.
Architecture Decision
Section titled “Architecture Decision”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.
How To Upgrade
Section titled “How To Upgrade”-
Check Qdrant release notes, snapshot compatibility, and deployment docs for the target version.
-
Update the Docker image tag in
docker-compose.yml. -
If the Mastra Qdrant adapter changes, update the API package as part of the Mastra package family:
Terminal window # from apps/apibun update @mastra/qdrant -
For stored vector data, create a migration or rebuild plan before changing collection schema, vector dimensions, payload indexes, or distance configuration.
-
Verify indexed connector and retrieval behavior:
Terminal window bun run test:api:connectors:e2e:ephemeralbun run test:api:chat:runtime-smokebun run test:api:chat:review
Current Limits
Section titled “Current Limits”- 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.
Canonical Sources
Section titled “Canonical Sources”docker-compose.ymlapps/api/src/mastra/index.tsapps/api/src/mastra/runtimeStorage.tsapps/api/src/connectors/docs/features/connectors/spec.mddocs/features/ingestion/spec.mddocs/features/chat/spec.md