connection-and-transport
Configure qdrant-client server and cloud connections, REST versus gRPC transport, authentication headers, timeouts, pooling, and connection lifecycle without relying on local mode.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- connection-and-transport
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Configure qdrant-client server and cloud connections, REST versus gRPC transport, authentication headers, timeouts, pooling, and connection lifecycle without relying on local mode.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/connection-reference.md7.2 KB
- 参考文档references/troubleshooting.md5.6 KB
- 脚本scripts/transport_config_probe.py4.7 KB
03 SKILL.md 正文
Connection and Transport
Use this sub-skill when a task is about constructing a QdrantClient or QdrantRemote for a running Qdrant server or Qdrant Cloud cluster, choosing REST or gRPC transport, setting URL/host/prefix details, adding authentication, validating timeouts/pooling options, inspecting raw clients, or closing a client cleanly.
Route elsewhere when the task is primarily about:
:memory:or file-backed local storage: uselocal-mode.- Collection, point, search, query, or payload calls after the client exists: use
client-operations. AsyncQdrantClientremote lifecycle and async token-provider details: useasync-client.- Cloud inference or embedding model configuration: use
inference. - Upload helpers, batch migration, or parallel ingestion: use
migration-and-upload. - REST/gRPC model conversion types and generated schemas: use
models-and-conversions.
Start Here
- Choose the address style from
references/connection-reference.md:urlfor complete endpoints and Qdrant Cloud, orhostplusportfor simple server endpoints. - Set
check_compatibility=Falseonly for offline config validation, tests without a server, or startup paths where the background server-version probe is intentionally skipped. - Use
prefer_grpc=Truefor API methods that support gRPC when low latency or high-throughput server access matters; keep REST as the safe default for full API coverage. - Use
api_keyfor Qdrant Cloud and API-key deployments. Do not duplicateapi-keyinheaders; the constructor intentionally overrides that header withapi_key. - Close remote clients with
client.close()when the process, worker, or request scope ends. Do not reuse a closed client.
Common Patterns
from qdrant_client import QdrantClient
client = QdrantClient(url="http://localhost:6333")
from qdrant_client import QdrantClient
client = QdrantClient(
url="https://example-cluster.region.cloud.qdrant.io:6333",
api_key="<qdrant-api-key>",
headers={"x-trace-id": "request-123"},
)
from qdrant_client import QdrantClient
client = QdrantClient(
host="qdrant.internal",
port=6333,
grpc_port=6334,
prefer_grpc=True,
timeout=30,
check_compatibility=False,
)
For safe, no-network configuration checks, run the bundled probe:
python sub-skills/connection-and-transport/scripts/transport_config_probe.py --url http://localhost:6333 --prefix api/v1
Raw Access and Lifecycle
client.httpexposes the REST API wrapper for direct REST calls when a high-level method is unavailable.client.grpc_points,client.grpc_collections,client.grpc_snapshots, andclient.grpc_rootinitialize gRPC channels lazily on first access.client.close()closes HTTP resources and any initialized gRPC channel pool; accessing remote gRPC after close can raiseRuntimeError.- Use one client per process, worker, tenant, or credential scope rather than rebuilding clients for every request.
References
references/connection-reference.mdcovers constructor decisions, examples, REST/gRPC selection, authentication, context headers, pooling, raw access, and close lifecycle.references/troubleshooting.mdcovers compatibility warnings, insecure auth warnings, prefix conflicts, unsupported gRPC compression, closed clients, pool/limits conflicts, and token-provider pitfalls.
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).