What is QdrantConfig?
QdrantConfig is the structured bag CrewAI passes into set_rag_config so every vector-backed feature — knowledge retrieval, QdrantVectorSearchTool, and any internal RAG helpers — targets the same cluster, collection, and credentials. Point qdrant_url at Qdrant Cloud, a self-hosted Docker endpoint, or localhost during development; supply qdrant_api_key whenever the cluster enforces auth.
collection_name is your logical corpus boundary: mixing unrelated documents in one collection without metadata filters yields noisy recall, while over-sharding collections increases cold-start embed cost. Align embedding models with whatever produced the vectors already stored — swapping embedders without re-indexing is the fastest way to get nonsense cosine scores.
Treat this object like database connection settings: load from environment variables, fail fast if URLs lack TLS in production, and monitor Qdrant latency separately from LLM latency because slow vector rounds feel exactly like slow models in traces.
When to Use
Production or staging stacks that already run Qdrant and want CrewAI retrieval to share that cluster.
Use Cases
- • Production RAG with Qdrant
- • Shared collections across multiple crews
- • Hybrid local dev + cloud staging
Key Features
- ✓ Cluster URL + API key wiring
- ✓ Named collection targeting
- ✓ Pairs with set_rag_config
- ✓ Compatible with QdrantVectorSearchTool
When NOT to Use
Greenfield demos where the default local vector store is enough — skip extra infra until recall quality matters.
Notes
TLS and network path
Qdrant Cloud requires HTTPS and correct regional endpoints. Misconfigured URLs surface as generic connection errors — verify DNS, corporate proxies, and outbound firewall rules before blaming retrieval quality.
Collection vs embedding model
Vectors in a collection were produced with a specific embedding model and dimensionality. Changing Crew.embedder without re-embedding yields empty or misleading hits. Track model name + dimension in collection metadata.
API key hygiene
Never commit keys beside QdrantConfig literals. Use environment variables or secret managers and rotate keys when engineers leave the project — leaked keys grant full read access to stored embeddings.
Operational limits
Large collections need RAM and disk planning on the Qdrant side. CrewAI only routes queries; capacity planning, backups, and replication remain your platform team's responsibility.
Import
from crewai.rag.qdrant.config import QdrantConfig
Key Parameters
| Parameter | Type | Default | Purpose |
|---|---|---|---|
| qdrant_url | str | — | Cluster URL. |
| qdrant_api_key | str | None | None | API key. |
| collection_name | str | — | Vector collection. |
Code Examples
Qdrant Cloud with global config
import os
from crewai.rag.config.utils import set_rag_config
from crewai.rag.qdrant.config import QdrantConfig
set_rag_config(
QdrantConfig(
qdrant_url=os.environ['QDRANT_URL'],
qdrant_api_key=os.environ['QDRANT_API_KEY'],
collection_name='support_kb_v3',
)
)
Local docker endpoint for development
from crewai.rag.config.utils import set_rag_config
from crewai.rag.qdrant.config import QdrantConfig
set_rag_config(
QdrantConfig(
qdrant_url='http://localhost:6333',
qdrant_api_key=None,
collection_name='dev_playground',
)
)
Pair with knowledge tutorial pattern
from crewai.rag.config.utils import set_rag_config
from crewai.rag.qdrant.config import QdrantConfig
set_rag_config(QdrantConfig(
qdrant_url='https://xyz.eu.cloud.qdrant.io',
qdrant_api_key='***',
collection_name='docs',
))
Common Mistakes
❌ Pointing multiple unrelated products at one collection without metadata filters
✅ Partition by collection or enforce payload filters at query time.
❌ Mixing embedders across environments
✅ Pin embedder config per environment and re-index when upgrading models.
QdrantConfig FAQ
What is QdrantConfig in CrewAI?
Configuration object for the Qdrant vector store — used by QdrantVectorSearchTool and RAG client. QdrantConfig is the structured bag CrewAI passes into set_rag_config so every vector-backed feature — knowledge retrieval, QdrantVectorSearchTool, and any internal RAG helpers — targets the same cluster, collection, and credentials. Point qdrant_url at Qdrant Cloud, a self-hosted Docker endpoint, or localhost during development; supply qdrant_api_key whenever the cluster enforces auth. collection_name is your logical corpus boundary: mixing unrelated documents in one collect…
Which package defines the CrewAI class QdrantConfig?
DevShelfHub maps QdrantConfig to Python module crewai.rag.qdrant.config (package path crewai.rag.qdrant.config in this reference). Pin your installed crewai version and match imports to the snippet on this page.
When should I use QdrantConfig?
Production or staging stacks that already run Qdrant and want CrewAI retrieval to share that cluster.
When should I avoid using QdrantConfig?
Greenfield demos where the default local vector store is enough — skip extra infra until recall quality matters.
How do I import QdrantConfig in Python?
from crewai.rag.qdrant.config import QdrantConfig
Where can I explore more CrewAI API reference pages?
Open the CrewAI API reference index on DevShelfHub to search 58 classes, 30 methods, and 16 decorators, each with runnable examples, parameters, common mistakes, and cross-links.