Skip to main content
The JavaScript SDK provides a TypeScript-first VectorAIClient for VectorAI DB over gRPC, plus REST-based auth/admin helpers.

Prerequisites

RequirementVersion
Node.js18 or higher
npm9 or higher
VectorAI DBRunning at localhost:6574 by default

Install the SDK

npm install @actian/vectorai-client
With yarn:
yarn add @actian/vectorai-client

Verify installation

Requires VectorAI DB running locally. See the Docker setup guide if you haven’t done that yet. Save the following as health.ts and run it with npx tsx health.ts.
import { VectorAIClient } from '@actian/vectorai-client';

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

try {
  const health = await client.healthCheck();
  console.log(`Server: ${health.title} v${health.version}`);
} finally {
  client.close();
}
For all client configuration options, see the JavaScript SDK reference.

Project setup

Create a TypeScript project and install the SDK.
mkdir my-vectorai-app
cd my-vectorai-app
npm init -y
npm install @actian/vectorai-client
npm install --save-dev typescript tsx @types/node
npx tsc --init

Troubleshooting

IssueSolution
MODULE_NOT_FOUNDVerify the SDK is installed with npm ls @actian/vectorai-client.
gRPC connection errorsConfirm VectorAI DB is reachable at localhost:6574.
Node.js version mismatchRun node --version; the SDK requires Node.js 18 or later.
TypeScript module errorsUse an ESM-compatible setup and run examples with tsx.

Next steps

Quickstart

Create a collection, insert vectors, and run a search.

JavaScript reference

Review namespaces, client options, filters, auth, batching, and errors.