Prerequisites
Before you begin, make sure you have the following installed.| Requirement | Version |
|---|---|
| Node.js | 18 or higher (LTS recommended) |
| npm | 9 or higher (or yarn 1.22+) |
| VectorAI DB | Running instance (default: localhost:50051) |
Install the SDK
Add the VectorAI DB JavaScript SDK to your project using npm.Install from source
You can also install the SDK directly from the repository.Verify installation
Test that the SDK is installed correctly by connecting to the server over gRPC onlocalhost:50051 and running a health check. Save the following as health.ts and run it with npx ts-node health.ts.
Project setup
Create a dedicated project directory for your VectorAI DB application.- TypeScript (recommended)
- JavaScript
Troubleshooting
If you run into problems during installation, check the table below for common issues and solutions.Common issues
The following table lists common installation issues and their solutions.| Issue | Solution |
|---|---|
MODULE_NOT_FOUND | Verify the SDK is installed in the correct project. Run npm ls @actian/cortex-client. |
| gRPC connection errors | Confirm that VectorAI DB is running and accessible on the expected port. |
| Node.js version mismatch | Check your version with node --version. The SDK requires Node.js 18 or later. |
| TypeScript compilation errors | Ensure tsconfig.json targets ES2020 or later and enables esModuleInterop. |
Next steps
Now that the SDK is installed, explore these resources to start building.Quickstart
Build your first application with the JavaScript SDK.
Core concepts
Learn about collections, vectors, and payloads.
Tutorials
Follow step-by-step tutorials.