AGENT SKILL

async-client

Use AsyncQdrantClient for awaitable Qdrant collection, point, query, payload, alias, snapshot, and lifecycle workflows.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
async-client
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use AsyncQdrantClient for awaitable Qdrant collection, point, query, payload, alias, snapshot, and lifecycle workflows.
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

Async Client

Use this sub-skill when a task needs Qdrant's Python async client rather than the sync QdrantClient.

Read First

  • Use AsyncQdrantClient from qdrant_client when the caller already has an event loop, needs non-blocking Qdrant I/O, or is converting a sync recipe to async.
  • Await collection, point, query, payload, alias, snapshot, and cluster methods. End remote and persistent-local workflows with await client.close().
  • Async local mode supports the same client entry point: AsyncQdrantClient(":memory:") for ephemeral tests and AsyncQdrantClient(path="...") for persisted local data.
  • Remote async supports REST and gRPC modes through the same constructor options as the sync client, including url, host, port, grpc_port, prefer_grpc, api_key, timeout, pool_size, and headers.
  • Keep sync-only examples in ../client-operations/, local storage details in ../local-mode/, transport/auth setup in ../connection-and-transport/, and embedding/inference details in ../inference/.

Common Patterns

import asyncio
from qdrant_client import AsyncQdrantClient, models

async def main() -> None:
    client = AsyncQdrantClient(":memory:")
    try:
        await client.create_collection(
            collection_name="items",
            vectors_config=models.VectorParams(size=3, distance=models.Distance.COSINE),
        )
        await client.upsert(
            collection_name="items",
            points=[models.PointStruct(id=1, vector=[0.1, 0.2, 0.3], payload={"kind": "demo"})],
        )
        result = await client.query_points(collection_name="items", query=[0.1, 0.2, 0.3], limit=1)
        print(result.points[0].id)
    finally:
        await client.close()

asyncio.run(main())

For deeper async API coverage, read:

  • references/async-client.md for lifecycle, initialization parity, awaited operations, local/server differences, and generated parity caveats.
  • references/troubleshooting.md for coroutine, close, transport, event-loop, snapshot, and alias diagnostics.
  • scripts/async_local_smoke.py for a deterministic in-memory smoke check that future agents can copy or run.

Acceptance Checks

  • Every async Qdrant method call in examples is awaited unless the method is intentionally synchronous, such as upload_points or upload_collection.
  • Client cleanup uses await client.close() in a finally block or equivalent shutdown hook.
  • Local examples avoid credentials and server dependencies; remote examples make service and credential requirements explicit.
  • Maintainer async-generation scripts are treated as implementation provenance only, not runtime tools for users of this skill.

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