Русский | English
npm

Qdrant API on YDB

Qdrant‑compatible REST API service for storing and searching vectors in YDB with exact or approximate KNN search — no separate vector database cluster.

Public demo Qdrant base URL: http://ydb-qdrant.tech:8080Checking…

Ideal as a drop‑in Qdrant base URL for IDE agents (Roo Code, Cline) and RAG services on YDB.

Why YDB‑Qdrant

Persistent storage

All data is written to YDB's distributed storage and survives restarts. No in-memory-only mode — your vectors are safe.

Transactional & consistent

Built on YDB's distributed ACID transactions with Serializable isolation, so vectors live next to your source‑of‑truth data.

Single data platform

Store business rows, events, and vector embeddings together — queries use YQL, vectors stored directly in YDB.

Reliability & operations

Reuse YDB's multi‑AZ setups, backup/restore, and disaster recovery instead of operating a separate Qdrant cluster.

Self-healing collections

Collections auto-recreate if dropped. The service tracks last access time per collection for tenant lifecycle management.

Flexible integration

Use either the hosted HTTP endpoint or the ydb-qdrant Node.js package directly inside your backend services.

Comparison: YDB-Qdrant vs. Standalone Qdrant

FeatureYDB-QdrantStandalone Qdrant
Storage EngineYDB (Distributed SQL)RocksDB / In-memory
ConsistencyStrong (ACID Serializable)Eventual / Tunable
ScalabilityHorizontal (YDB native)Sharding (manual/managed)
Query LanguageQdrant REST API (YQL internal)Qdrant API (gRPC/REST)
Operational ComplexityLow (Reuse YDB ops)Medium (Separate cluster)

Where it fits best

  • Prototyping and experiments with vector search on YDB.
  • Datasets roughly up to 10K–50K vectors per collection.
  • IDE agents (Roo Code, Cline) expecting a Qdrant API.
  • Apps that already use YDB and need a quick vector API (HTTP or in‑process via the ydb-qdrant Node.js package).

Plans

  • Stronger per-tenant authentication (IAM/OAuth binding, per‑collection ACLs) beyond the existing X‑Tenant‑Id header and forTenant() API.
  • Quotas and rate limiting per tenant (collections, RPS, payload and batch sizes) plus richer audit logging.
  • Support for larger collections (>100K vectors) via index tuning and YDB auto-partitioning optimizations.
  • Better support for high‑throughput, multi‑million‑vector search with tighter latency through scaling patterns.
  • Extending Qdrant API coverage on YDB (filters, facets, recommend/discover, batch search and other advanced modes).
  • Hybrid search combining vector similarity with payload filtering for more precise retrieval.
How it works under the hood
Request flow: IDE/Agent → ydb-qdrant (Node.js) → YDB vectors + index

Docs

Getting started

Configure in Roo Code/Kilo Code

Hosted demo endpoint for IDEs: http://ydb-qdrant.tech:8080Checking…

Public demo Qdrant base URL for IDEs: http://ydb-qdrant.tech:8080 (paste into your IDE/agent as the Qdrant base URL).

Configure self‑hosted (Node.js)

  1. Clone and install: npm install
  2. Set env: YDB_ENDPOINT, YDB_DATABASE
  3. Auth via env: YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS | YDB_METADATA_CREDENTIALS | YDB_ACCESS_TOKEN_CREDENTIALS | YDB_ANONYMOUS_CREDENTIALS
  4. Run: npm run dev (dev) or npm start (prod)
  5. Point client to http://localhost:8080

Or run as a container (Docker or docker-compose) using the published image ghcr.io/astandrik/ydb-qdrant:latest.

Run via Docker / docker-compose

  1. Pull image: docker pull ghcr.io/astandrik/ydb-qdrant:latest
  2. Run with Docker: docker run -d --name ydb-qdrant -p 8080:8080 ghcr.io/astandrik/ydb-qdrant:latest
  3. Or with docker-compose: docker-compose up -d using the sample config from the README.

Details and full examples: GitHub README

Use as Node.js library

  1. Install: npm install ydb-qdrant
  2. Usage:
    import { createYdbQdrantClient } from "ydb-qdrant";
    
    const client = await createYdbQdrantClient({
      endpoint: "grpcs://ydb.serverless.yandexcloud.net:2135",
      database: "/ru-central1/...",
      defaultTenant: "myapp",
      // Auth via YDB_*_CREDENTIALS env vars
    });

See npm package for more details.

All-in-One local YDB + ydb-qdrant (Docker)

  1. Run a single container with embedded local YDB:
    docker run -d --name ydb-qdrant-local \
      -p 8080:8080 -p 8765:8765 \
      ghcr.io/astandrik/ydb-qdrant-local:latest
  2. Ports: 8080 — ydb-qdrant API, 8765 — YDB Embedded UI
  3. Point client to http://localhost:8080

Ideal for local development without an external YDB cluster. See GitHub README for details.

API at a glance

Purpose

Use as a Qdrant base URL for IDE agents or apps; vectors persist in YDB.

Key features

  • Qdrant‑compatible endpoints (collections, points, search)
  • Two search modes: exact (default) and approximate (bit‑quantized)
  • Batch upserts and batch deletes for bulk operations
  • Per‑tenant isolation via X‑Tenant‑Id header
  • Collection last access tracking for tenant management
  • Self‑host or use public demo endpoint
  • Also available as Node.js library (createYdbQdrantClient)

Use as HTTP server

curl -X PUT http://ydb-qdrant.tech:8080/collections/mycol \
-H 'Content-Type: application/json' \
-d '{"vectors":{"size":384,"distance":"Cosine","data_type":"float"}}'
curl -X POST http://ydb-qdrant.tech:8080/collections/mycol/points/upsert \
-H 'Content-Type: application/json' \
-d '{"points":[{"id":"1","vector":[0.1,0.2,...384 vals...]}]}'
curl -X POST http://ydb-qdrant.tech:8080/collections/mycol/points/search \
-H 'Content-Type: application/json' \
-d '{"vector":[0.1,0.2,...],"limit":5,"with_payload":true}'

Use as Node.js library

// Install: npm install ydb-qdrant
import { createYdbQdrantClient } from "ydb-qdrant";
async function main() {
// defaultTenant is optional; defaults to "default"
const client = await createYdbQdrantClient({
defaultTenant: "myapp",
endpoint: "grpcs://lb.etn01g9tcilcon2mrt3h.ydb.mdb.yandexcloud.net:2135",
database: "/ru-central1/b1ge4v9r1l3h1q4njclp/etn01g9tcilcon2mrt3h",
});
// Switch tenant dynamically (returns a new client instance)
const otherClient = client.forTenant("other-tenant");
await client.createCollection("documents", {
vectors: {
size: 1536,
distance: "Cosine",
data_type: "float",
},
});
await client.upsertPoints("documents", {
points: [
{ id: "doc-1", vector: [/* embedding */], payload: { title: "Doc 1" } },
],
});
const result = await client.searchPoints("documents", {
vector: [/* query embedding */],
top: 10,
with_payload: true,
});
console.log(result.points);
}
Health: GET /health → {"status":"ok"}