Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt

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

Welcome to the VectoriaDB API reference. This section documents all public classes, methods, interfaces, and error types.

Main Classes

VectoriaDB

The main vector database class for semantic search

TFIDFVectoria

Zero-dependency TF-IDF variant for keyword search

Storage Adapters

FileStorageAdapter

Persist to local disk

RedisStorageAdapter

Distributed Redis cache

MemoryStorageAdapter

In-memory (default)

Interfaces

Configuration

VectoriaConfig and related options

Documents

DocumentMetadata and DocumentEmbedding

Search

SearchOptions and SearchResult

Storage

Storage adapter interfaces

Error Classes

Error Reference

All VectoriaDB error types with codes and handling examples

Quick Reference

VectoriaDB Methods

MethodDescription
initialize()Initialize database and load cache
add()Add a single document
addMany()Add multiple documents
search()Semantic search
get()Get document by ID
has()Check if document exists
update()Update document
updateMetadata()Update metadata only
remove()Remove document
removeMany()Remove multiple documents
clear()Clear all documents
size()Get document count
getStats()Get database statistics
saveToStorage()Persist to storage
clearStorage()Clear storage cache

Imports

import {
  // Main classes
  VectoriaDB,
  TFIDFVectoria,

  // Storage adapters
  FileStorageAdapter,
  RedisStorageAdapter,
  MemoryStorageAdapter,

  // Utilities
  SerializationUtils,

  // Interfaces
  VectoriaConfig,
  DocumentMetadata,
  SearchOptions,
  SearchResult,

  // Errors
  VectoriaError,
  VectoriaNotInitializedError,
  DocumentValidationError,
  DocumentNotFoundError,
  DocumentExistsError,
  QueryValidationError,
  StorageError,
  ConfigurationError,
} from 'vectoriadb';