Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vectoraidb.actian.com/llms.txt

Use this file to discover all available pages before exploring further.

The JavaScript SDK package is @actian/vectorai-client. It exports a TypeScript-first VectorAIClient.

Client

import { VectorAIClient } from '@actian/vectorai-client';

const client = new VectorAIClient('localhost:6574', {
  restUrl: 'http://localhost:6573',
  timeout: 30,
  maxRetries: 3,
});
OptionPurpose
tls, tlsCaCert, tlsClientCert, tlsClientKeyEnable TLS or mutual TLS.
accessToken, tokenProviderAdd static or dynamic Bearer authentication.
restUrlREST base URL for auth/admin operations.
timeout, maxRetries, retryConfigControl deadlines and retry behavior.
metadata, grpcOptionsAdd static metadata or gRPC channel options.
poolSizeUse multiple gRPC channels.
enableTracing, enableLogging, loggerAdd request metadata and logging.
circuitBreaker, backpressureIntegrate resilience helpers.

Namespaces

NamespacePurpose
client.collectionsCreate, list, inspect, update, delete, recreate, and get-or-create collections.
client.pointsUpsert, retrieve, delete, update vectors and payloads, search, query, count, and scroll points.
client.vdeOpen and close collections, inspect state and stats, rebuild indexes, optimize, compact, flush, and import datasets.
client.authLogin, create, list, rotate, and delete API keys through REST-backed admin operations.

Collections and points

import { VectorAIClient } from '@actian/vectorai-client';

const client = new VectorAIClient('localhost:6574');

await client.collections.create('products', {
  dimension: 128,
  distanceMetric: 'COSINE',
});

await client.points.upsert('products', [
  { id: 1, vector: Array(128).fill(0.1), payload: { category: 'books' } },
]);

const results = await client.points.search('products', Array(128).fill(0.1), {
  limit: 5,
});

Filters

Use Field, Filter, and FilterBuilder to build typed payload filters.
import { Field, Filter, FilterBuilder, hasId, isEmpty } from '@actian/vectorai-client';

const filter = Filter.and(
  Field.of('category').eq('books'),
  Field.of('price').lte(50),
);

const built = new FilterBuilder()
  .must(filter)
  .should(hasId([1, 2, 3]))
  .build();

await client.points.search('products', queryVector, { filter: built, limit: 10 });

Auth

Use static tokens, token providers, or the REST-backed auth manager.
const client = new VectorAIClient('localhost:6574', {
  accessToken: process.env.ACTIAN_VECTORAI_ACCESS_TOKEN,
});

await client.auth.login('admin-password');
const key = await client.auth.createApiKey({
  name: 'service-key',
  permission: 'read,write',
});

Hybrid search, batching, and resilience

The SDK exports reciprocal rank fusion, distribution-based score fusion, smart batching, circuit breaker, backpressure, retry, TLS, and typed error utilities.
import { reciprocalRankFusion, SmartBatcher } from '@actian/vectorai-client';

const merged = reciprocalRankFusion([denseResults, sparseResults]);
Use client.uploadPoints(...) for simple bulk upload or SmartBatcher when you need configurable auto-flushing.

Errors

Failures are exposed through typed errors such as authentication, validation, collection, point, dimension, timeout, server, and resilience errors. Catch the most specific error type your workflow can recover from.