qdrant-client
Use the Python qdrant-client package for Qdrant vector database connections, local mode, sync and async operations, inference inputs, uploads, migrations, and REST/gRPC model conversion workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- qdrant-client
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use the Python qdrant-client package for Qdrant vector database connections, local mode, sync and async operations, inference inputs, uploads, migrations, and REST/gRPC model conversion workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/native-verification.md1.9 KB
- 参考文档references/repo-provenance.md2.7 KB
- 参考文档references/repo-routing-metadata.json328 B
- 参考文档references/troubleshooting.md2.4 KB
- 脚本scripts/qdrant_client_smoke.py3.5 KB
03 SKILL.md 正文
Qdrant Client
Use this repo skill when a task involves the Python qdrant-client package, QdrantClient, AsyncQdrantClient, qdrant_client.models, local mode, Qdrant Cloud/server connections, FastEmbed or Cloud inference inputs, bulk upload, migration, or REST/gRPC model conversion.
Start Here
- Install with
pip install qdrant-client; add exactly one optional inference extra only when needed:qdrant-client[fastembed]for CPU FastEmbed orqdrant-client[fastembed-gpu]for GPU FastEmbed. - Verify basic import with
from qdrant_client import QdrantClient, AsyncQdrantClient, models. - Use
QdrantClient(":memory:")for deterministic local examples and tests that do not require a running Qdrant server. - Use
QdrantClient(url="http://localhost:6333")or a Qdrant Cloud URL plusapi_keyfor remote server workflows. - Read
references/repo-provenance.mdbefore deciding whether this skill is current for a checkout, and readreferences/troubleshooting.mdfor cross-cutting install/import/service failures. - Run
scripts/qdrant_client_smoke.py --mode localafter installation when you need a safe import/local/async/conversion check.
Route By Task
- Use
sub-skills/client-operations/SKILL.mdfor syncQdrantClientcollection, point, query, payload, index, alias, snapshot, facet, matrix search, batching, and cluster-adjacent method choices. - Use
sub-skills/local-mode/SKILL.mdforQdrantClient(":memory:"), persistent local stores, local dense/sparse/named/multivector queries, local locks, and local-to-server migration boundaries. - Use
sub-skills/connection-and-transport/SKILL.mdforurl,host,prefix, Qdrant Cloudapi_key, REST versus gRPC, auth headers, compatibility checks, timeouts, pooling, raw clients, and close lifecycle. - Use
sub-skills/async-client/SKILL.mdforAsyncQdrantClient, awaited collection/point/query/payload/snapshot operations, async local mode, and async lifecycle pitfalls. - Use
sub-skills/inference/SKILL.mdfor FastEmbed local inference, Qdrant Cloud remote inference,models.Document,models.Image, dense/sparse/hybrid model helpers, and optional dependency troubleshooting. - Use
sub-skills/migration-and-upload/SKILL.mdforupload_collection,upload_points, batching,parallel,wait,prefer_grpc, retry behavior, andmigrateworkflows. - Use
sub-skills/models-and-conversions/SKILL.mdforqdrant_client.models, strict pydantic model construction, REST/gRPC structures,RestToGrpc,GrpcToRest, filters, query requests, sparse vectors, and conversion debugging.
Common Entry Points
from qdrant_client import QdrantClient, AsyncQdrantClient, models
client = QdrantClient(":memory:")
client.create_collection(
collection_name="demo",
vectors_config=models.VectorParams(size=4, distance=models.Distance.COSINE),
)
client = QdrantClient(
url="https://example-cluster.region.cloud.qdrant.io:6333",
api_key="<api-key>",
)
client.upload_collection(
collection_name="demo",
vectors=[[0.1, 0.2, 0.3, 0.4]],
payload=[{"source": "example"}],
ids=[1],
wait=True,
)
Decision Rules
- Start with local mode for examples unless the user explicitly needs a server, Cloud features, distributed behavior, snapshots from a real service, or transport-specific debugging.
- Keep transport setup separate from API operation guidance: configure the client with
connection-and-transport, then useclient-operationsormigration-and-uploadfor calls. - Treat
models.Documentandmodels.Imageas inference routes. They may require FastEmbed locally orcloud_inference=Trueremotely. - Prefer
from qdrant_client import modelsfor user-facing code instead of importing generated REST or gRPC modules directly. - Do not run examples that require credentials, model downloads, a Qdrant server, or large benchmark data unless the user asks for that environment explicitly.
Bundled Helpers
scripts/qdrant_client_smoke.pychecks importability, local create/upsert/query, REST-to-gRPC conversion, and optional async local behavior without a server.- Sub-skill scripts provide narrower checks: local-mode smoke, async local smoke, transport constructor probing, optional inference dependency reporting, upload shape validation, and conversion smoke examples.
Refresh And Verification
- Use
references/repo-provenance.mdto compare this skill with a source checkout before refreshing. - Verification artifacts and native test selections are summarized outside runtime skill content; runtime instructions never require opening the original repository checkout.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).