AGENT SKILL

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

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 or qdrant-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 plus api_key for remote server workflows.
  • Read references/repo-provenance.md before deciding whether this skill is current for a checkout, and read references/troubleshooting.md for cross-cutting install/import/service failures.
  • Run scripts/qdrant_client_smoke.py --mode local after installation when you need a safe import/local/async/conversion check.

Route By Task

  • Use sub-skills/client-operations/SKILL.md for sync QdrantClient collection, point, query, payload, index, alias, snapshot, facet, matrix search, batching, and cluster-adjacent method choices.
  • Use sub-skills/local-mode/SKILL.md for QdrantClient(":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.md for url, host, prefix, Qdrant Cloud api_key, REST versus gRPC, auth headers, compatibility checks, timeouts, pooling, raw clients, and close lifecycle.
  • Use sub-skills/async-client/SKILL.md for AsyncQdrantClient, awaited collection/point/query/payload/snapshot operations, async local mode, and async lifecycle pitfalls.
  • Use sub-skills/inference/SKILL.md for 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.md for upload_collection, upload_points, batching, parallel, wait, prefer_grpc, retry behavior, and migrate workflows.
  • Use sub-skills/models-and-conversions/SKILL.md for qdrant_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 use client-operations or migration-and-upload for calls.
  • Treat models.Document and models.Image as inference routes. They may require FastEmbed locally or cloud_inference=True remotely.
  • Prefer from qdrant_client import models for 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.py checks 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.md to 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

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351