Aetherfy Logo

Quick Start

Get started with VectorsDB in under 5 minutes. Build your first AI agent memory system.

1

Install the SDK

Add VectorsDB to your project

npm install @aetherfy/vectorsdb
2

Initialize the client

Get your API key from the dashboard

import { VectorsDB } from '@aetherfy/vectorsdb'

const client = new VectorsDB({
  apiKey: process.env.VECTORSDB_API_KEY
})
3

Create a collection

Set up a collection for your vectors

await client.createCollection('agent-memory', {
  vector_size: 1536,  // OpenAI ada-002 dimensions
  distance: 'cosine'
})
4

Insert vectors

Add vectors with metadata to your collection

await client.upsert('agent-memory', {
  id: 'memory-001',
  vector: embeddings,  // Your vector embeddings
  metadata: {
    agent_id: 'assistant',
    content: 'User prefers morning meetings',
    timestamp: Date.now()
  }
})
5

Search vectors

Find similar vectors with filtering

const results = await client.search('agent-memory', {
  vector: queryEmbedding,
  limit: 5,
  filter: { agent_id: 'assistant' }
})

console.log(results) // Returns in <100ms globally